org::gel::mauve::SeqFeatureData Class Reference

Utility class for data specific to sequence navigator involving genomes and their features. More...

Inheritance diagram for org::gel::mauve::SeqFeatureData:

Inheritance graph
[legend]
Collaboration diagram for org::gel::mauve::SeqFeatureData:

Collaboration graph
[legend]
List of all members.

Static Public Member Functions

long centerOfFeature (Feature feature)
 finds the center sequence coordinate of a feature

Genome[] convertIndexToSequence (Vector choices, int index)
 returns an array representing the user selected genomes.

LinkedList[] findFeatures (Genome[] nomes, String[][] data)
 Finds all features associated with specified genomes matching the specified key value pairs.

FeatureFilter getFilter (String[][] data)
 Returns a filter that will accept annotations matching the desired keys and values.

String getTypeFromFilter (FeatureFilter filter)
 Parses a FeatureFilter to see if it contains a filter that is associated with a particular type of Feature.

String getTypeFromFilterSpec (FilterCacheSpec spec)
 Parses a FilterCacheSpec to see if it contains a filter that is associated with a particular type of Feature.

String readToActual (String field)
 converts spaces in string to underscores

void removeLocationDuplicates (LinkedList feats)
 Removes multiple features with the same location, so only one is displayed in the tree.

StringTokenizer separateFields (String fields)
 returns a tokenizer with string separated at '/'

Vector userSelectableGenomes (BaseViewerModel model, boolean all_ok, boolean needs_annotations)
 constructs an array of all possible genomes a user should be able to pick from.

Genome[] userSelectedGenomes (Component parent, BaseViewerModel model, boolean all_ok, boolean needs_annotations)
 Pops up a dialog box that allows a user to choose a specific (or all) genome/s.


Static Public Attributes

FeatureComparator feature_comp = new FeatureComparator ()

Private Member Functions

 SeqFeatureData ()
 private constructor prevents instantiation; all static


Detailed Description

Utility class for data specific to sequence navigator involving genomes and their features.

Author:
rissman

Definition at line 27 of file SeqFeatureData.java.


Constructor & Destructor Documentation

org::gel::mauve::SeqFeatureData::SeqFeatureData  )  [inline, private]
 

private constructor prevents instantiation; all static

Definition at line 35 of file SeqFeatureData.java.


Member Function Documentation

long org::gel::mauve::SeqFeatureData::centerOfFeature Feature  feature  )  [inline, static]
 

finds the center sequence coordinate of a feature

Parameters:
feature The feature whose center should be found
Returns:
A long representing the sequence position of the center of the feature

Definition at line 185 of file SeqFeatureData.java.

Genome [] org::gel::mauve::SeqFeatureData::convertIndexToSequence Vector  choices,
int  index
[inline, static]
 

returns an array representing the user selected genomes.

If the first choices in the

Parameters:
choices The vector of possible genomes
index The index selected from the vector of choices
Returns:
An array of 1 containing the selected sequence unless the user chose all sequences, in which case the array will return all of them

Definition at line 300 of file SeqFeatureData.java.

LinkedList [] org::gel::mauve::SeqFeatureData::findFeatures Genome[]  nomes,
Stringdata  [][]
[inline, static]
 

Finds all features associated with specified genomes matching the specified key value pairs.

Parameters:
nomes An array of which genomes whose features should be searched.
data An array of arrays containing desired key-value pairs, indeces specified in MauveConstants
Returns:
An array of LinkedLists. The first value in each list is the genome the list corresponds to; all other values are features associated with that genome

Definition at line 89 of file SeqFeatureData.java.

References org::gel::mauve::Genome::getAnnotationSequence(), getFilter(), and org::gel::mauve::Genome::length.

FeatureFilter org::gel::mauve::SeqFeatureData::getFilter Stringdata  [][]  )  [inline, static]
 

Returns a filter that will accept annotations matching the desired keys and values.

Parameters:
data An array of length 3 arrays, each corresponding to a key, value, and whether the value is exact (array indeces specified in MauveConstants)
Returns:
A filter that can be used to accept matching features

Definition at line 48 of file SeqFeatureData.java.

References readToActual().

Referenced by findFeatures().

String org::gel::mauve::SeqFeatureData::getTypeFromFilter FeatureFilter  filter  )  [inline, static]
 

Parses a FeatureFilter to see if it contains a filter that is associated with a particular type of Feature.

Will only return one type; so will not work for some or filters.

Parameters:
filter The filter to search
Returns:
A string corresponding to the type associated with the filter, or MauveConstants.ANY_FEATURE

Definition at line 217 of file SeqFeatureData.java.

Referenced by getTypeFromFilterSpec().

String org::gel::mauve::SeqFeatureData::getTypeFromFilterSpec FilterCacheSpec  spec  )  [inline, static]
 

Parses a FilterCacheSpec to see if it contains a filter that is associated with a particular type of Feature.

Will only return one type; so will not work for some or filters.

Parameters:
spec The spec to search
Returns:
A string corresponding to the type associated with the spec, or MauveConstants.ANY_FEATURE

Definition at line 200 of file SeqFeatureData.java.

References org::gel::mauve::FilterCacheSpec::getFilter(), and getTypeFromFilter().

String org::gel::mauve::SeqFeatureData::readToActual String  field  )  [inline, static]
 

converts spaces in string to underscores

Parameters:
field The human readible version of the field
Returns:
The qualifier name as it appears in data

Definition at line 168 of file SeqFeatureData.java.

Referenced by getFilter().

void org::gel::mauve::SeqFeatureData::removeLocationDuplicates LinkedList  feats  )  [inline, static]
 

Removes multiple features with the same location, so only one is displayed in the tree.

Parameters:
feats The list of features that might contain duplicates

Definition at line 112 of file SeqFeatureData.java.

References org::gel::mauve::SeqFeatureData::FeatureComparator::compare(), and feature_comp.

StringTokenizer org::gel::mauve::SeqFeatureData::separateFields String  fields  )  [inline, static]
 

returns a tokenizer with string separated at '/'

Parameters:
fields 
Returns:

Definition at line 157 of file SeqFeatureData.java.

Vector org::gel::mauve::SeqFeatureData::userSelectableGenomes BaseViewerModel  model,
boolean  all_ok,
boolean  needs_annotations
[inline, static]
 

constructs an array of all possible genomes a user should be able to pick from.

Will have an "All" option depending on parameters

Parameters:
model The model whose genomes are possible user selections
all_ok True if user should have the option to choose "All Genomes".
needs_annotations True if a genome should only be selectable if it has annotations loaded
Returns:
An vector of genomes a user can choose between

Definition at line 271 of file SeqFeatureData.java.

References org::gel::mauve::Genome::getAnnotationSequence(), and org::gel::mauve::BaseViewerModel::getGenomes().

Referenced by userSelectedGenomes().

Genome [] org::gel::mauve::SeqFeatureData::userSelectedGenomes Component  parent,
BaseViewerModel  model,
boolean  all_ok,
boolean  needs_annotations
[inline, static]
 

Pops up a dialog box that allows a user to choose a specific (or all) genome/s.

Parameters:
parent The frame the JDialogs for user input should block
model The BaseViewerModel containing all possible genome choices
all_ok True if user should have the option to choose "All Genomes".
needs_annotations True if a genome should only be selectable if it has annotations loaded
Returns:
An array of genomes that contains all genomes the user picked.

Definition at line 245 of file SeqFeatureData.java.

References userSelectableGenomes().


Member Data Documentation

FeatureComparator org::gel::mauve::SeqFeatureData::feature_comp = new FeatureComparator () [static]
 

Definition at line 29 of file SeqFeatureData.java.

Referenced by removeLocationDuplicates().


The documentation for this class was generated from the following file:
Generated on Mon Aug 19 06:03:48 2013 for Mauve by doxygen 1.3.6