calhoun.analysis.crf.features.interval29
Class GeneConstraintsInterval29

java.lang.Object
  extended by calhoun.analysis.crf.AbstractFeatureManager<java.lang.Character>
      extended by calhoun.analysis.crf.features.interval29.GeneConstraintsInterval29
All Implemented Interfaces:
FeatureManager<java.lang.Character>, FeatureManagerEdge<java.lang.Character>, FeatureManagerNode<java.lang.Character>, java.io.Serializable

public class GeneConstraintsInterval29
extends AbstractFeatureManager<java.lang.Character>
implements FeatureManagerEdge<java.lang.Character>, FeatureManagerNode<java.lang.Character>

Implements basic constraints on gene calls. 1) Intergenic - start must occur at ATG 2) Splice sites must be canonical GT/AG or GC/AG 3) Exon-stop must be followed by a start codon

See Also:
Serialized Form

Constructor Summary
GeneConstraintsInterval29()
           
 
Method Summary
 void evaluateEdge(InputSequence<? extends java.lang.Character> seq, int pos, int prevState, int state, FeatureList result)
          Evaluates the set of features managed by this object for the given arguments.
 void evaluateNode(InputSequence<? extends java.lang.Character> seq, int pos, int state, FeatureList result)
          Evaluates the set of features managed by this object for the given arguments.
 CacheStrategySpec getCacheStrategy()
          caching strategy that the CacheProcessor should use to cache values for this feature.
 java.lang.String getFeatureName(int featureIndex)
          Returns a human identifiable name for the feature referenced by a given index.
 int getNumFeatures()
          This is a constraint class, so we don't return features
 void train(int startingIndex, ModelManager modelInfo, java.util.List<? extends TrainingSequence<? extends java.lang.Character>> data)
          Provides access to the entire training set so that FeatureManager can compute global properties and assign feature indices.
 
Methods inherited from class calhoun.analysis.crf.AbstractFeatureManager
getInputComponent, setInputComponent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface calhoun.analysis.crf.FeatureManager
getInputComponent, setInputComponent
 
Methods inherited from interface calhoun.analysis.crf.FeatureManager
getInputComponent, setInputComponent
 

Constructor Detail

GeneConstraintsInterval29

public GeneConstraintsInterval29()
Method Detail

getFeatureName

public java.lang.String getFeatureName(int featureIndex)
Description copied from interface: FeatureManager
Returns a human identifiable name for the feature referenced by a given index. Used for display purposes only.

Specified by:
getFeatureName in interface FeatureManager<java.lang.Character>
Parameters:
featureIndex - the index of this feature
Returns:
the human readable name of this feature

getNumFeatures

public int getNumFeatures()
This is a constraint class, so we don't return features

Specified by:
getNumFeatures in interface FeatureManager<java.lang.Character>
Returns:
number of features managed by this FeatureManager

train

public void train(int startingIndex,
                  ModelManager modelInfo,
                  java.util.List<? extends TrainingSequence<? extends java.lang.Character>> data)
Description copied from interface: FeatureManager
Provides access to the entire training set so that FeatureManager can compute global properties and assign feature indices. This will be called before any evaluations are requested. If the FeatureManager can have a variable number of features, this must be fixed within this method.

Specified by:
train in interface FeatureManager<java.lang.Character>
Parameters:
startingIndex - the feature index of the first feature owned by this FeatureManager. Each FeatureManager must use up consecutive indexes, so the last index used will be startingIndex + numFeatures - 1.
modelInfo - the model that contains this feature
data - the full list of training sequences to use to train the feature

evaluateEdge

public void evaluateEdge(InputSequence<? extends java.lang.Character> seq,
                         int pos,
                         int prevState,
                         int state,
                         FeatureList result)
Description copied from interface: FeatureManagerEdge
Evaluates the set of features managed by this object for the given arguments.

Specified by:
evaluateEdge in interface FeatureManagerEdge<java.lang.Character>

evaluateNode

public void evaluateNode(InputSequence<? extends java.lang.Character> seq,
                         int pos,
                         int state,
                         FeatureList result)
Description copied from interface: FeatureManagerNode
Evaluates the set of features managed by this object for the given arguments.

Specified by:
evaluateNode in interface FeatureManagerNode<java.lang.Character>

getCacheStrategy

public CacheStrategySpec getCacheStrategy()
Description copied from interface: FeatureManager
caching strategy that the CacheProcessor should use to cache values for this feature. This is only a hint, the cache processor is not required to use this (or any) caching strategy. This base class defaults to the UNSPECIFIED cache strategy.

Specified by:
getCacheStrategy in interface FeatureManager<java.lang.Character>
Overrides:
getCacheStrategy in class AbstractFeatureManager<java.lang.Character>
Returns:
cache strategy specification appropriate for this feature.