org.biojava.bio.seq.impl
Class SimpleSimilarityPairFeature

java.lang.Object
  extended byorg.biojava.utils.AbstractChangeable
      extended byorg.biojava.bio.seq.impl.SimpleFeature
          extended byorg.biojava.bio.seq.impl.SimpleStrandedFeature
              extended byorg.biojava.bio.seq.impl.SimpleSimilarityPairFeature
All Implemented Interfaces:
Annotatable, Changeable, Feature, FeatureHolder, RealizingFeatureHolder, java.io.Serializable, SimilarityPairFeature, StrandedFeature

public class SimpleSimilarityPairFeature
extends SimpleStrandedFeature
implements SimilarityPairFeature

SimpleSimilarityPairFeature represents a similarity between a query sequence and a subject sequence as produced by a search program.

Since:
1.2
Author:
Keith James
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.biojava.bio.seq.homol.SimilarityPairFeature
SimilarityPairFeature.EmptyPairwiseAlignment, SimilarityPairFeature.Template
 
Nested classes inherited from class org.biojava.bio.seq.StrandedFeature
StrandedFeature.Strand
 
Nested classes inherited from class org.biojava.bio.seq.Feature
Feature.ByLocationComparator
 
Nested classes inherited from class org.biojava.bio.seq.FeatureHolder
FeatureHolder.EmptyFeatureHolder
 
Nested classes inherited from class org.biojava.bio.Annotatable
Annotatable.AnnotationForwarder
 
Field Summary
 
Fields inherited from interface org.biojava.bio.seq.homol.SimilarityPairFeature
EMPTY_PAIRWISE, QUERY_LABEL, SIBLING, SUBJECT_LABEL
 
Fields inherited from interface org.biojava.bio.seq.StrandedFeature
NEGATIVE, POSITIVE, UNKNOWN
 
Fields inherited from interface org.biojava.bio.seq.Feature
byLocationOrder, LOCATION, PROPERTY_DATA_KEY, SOURCE, TYPE
 
Fields inherited from interface org.biojava.bio.seq.FeatureHolder
EMPTY_FEATURE_HOLDER, FEATURES, SCHEMA
 
Fields inherited from interface org.biojava.bio.Annotatable
ANNOTATION
 
Constructor Summary
SimpleSimilarityPairFeature(Sequence sourceSeq, FeatureHolder parent, SimilarityPairFeature.Template template)
          Creates a new SimpleSimilarityPairFeature.
 
Method Summary
protected  void fillTemplate(SimilarityPairFeature.Template ft)
           
 Alignment getAlignment()
          getAlignment returns the alignment between the two features.
 double getScore()
          getScore returns the alignment score.
 SimilarityPairFeature getSibling()
          getSibling returns the sibling feature of the pair.
 Feature.Template makeTemplate()
          Create a new Template that could be used to generate a feature identical to this one.
 void setSibling(SimilarityPairFeature sibling)
          setSibling sets the sibling feature of the pair.
 java.lang.String toString()
           
 
Methods inherited from class org.biojava.bio.seq.impl.SimpleStrandedFeature
fillTemplate, getStrand, getSymbols
 
Methods inherited from class org.biojava.bio.seq.impl.SimpleFeature
containsFeature, countFeatures, createFeature, equals, featureHolderAllocated, features, fillTemplate, filter, filter, getAnnotation, getChangeSupport, getFeatureHolder, getLocation, getParent, getSchema, getSequence, getSource, getType, hashCode, realizeFeature, removeFeature, setLocation, setSource, setType
 
Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.biojava.bio.seq.StrandedFeature
getStrand, getSymbols
 
Methods inherited from interface org.biojava.bio.seq.Feature
features, getLocation, getParent, getSequence, getSource, getType, setLocation, setSource, setType
 
Methods inherited from interface org.biojava.bio.seq.FeatureHolder
containsFeature, countFeatures, createFeature, filter, filter, getSchema, removeFeature
 
Methods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
 
Methods inherited from interface org.biojava.bio.Annotatable
getAnnotation
 

Constructor Detail

SimpleSimilarityPairFeature

public SimpleSimilarityPairFeature(Sequence sourceSeq,
                                   FeatureHolder parent,
                                   SimilarityPairFeature.Template template)
                            throws IllegalAlphabetException
Creates a new SimpleSimilarityPairFeature.

Parameters:
sourceSeq - a Sequence.
parent - a FeatureHolder.
template - a SimilarityPairFeature.Template.
Method Detail

getSibling

public SimilarityPairFeature getSibling()
getSibling returns the sibling feature of the pair.

Specified by:
getSibling in interface SimilarityPairFeature
Returns:
a Feature.

setSibling

public void setSibling(SimilarityPairFeature sibling)
                throws ChangeVetoException
Description copied from interface: SimilarityPairFeature
setSibling sets the sibling feature of the pair. This is used to set the reciprocal SimilarityPairFeature as both cannot be set using the Template.

Specified by:
setSibling in interface SimilarityPairFeature
Throws:
ChangeVetoException

getAlignment

public Alignment getAlignment()
getAlignment returns the alignment between the two features.

Specified by:
getAlignment in interface SimilarityPairFeature
Returns:
an Alignment.

getScore

public double getScore()
getScore returns the alignment score.

Specified by:
getScore in interface SimilarityPairFeature
Returns:
a double.

makeTemplate

public Feature.Template makeTemplate()
Description copied from interface: Feature
Create a new Template that could be used to generate a feature identical to this one. The fields of the template can be edited without changing the feature.

Specified by:
makeTemplate in interface Feature
Overrides:
makeTemplate in class SimpleStrandedFeature

fillTemplate

protected void fillTemplate(SimilarityPairFeature.Template ft)

toString

public java.lang.String toString()
Overrides:
toString in class SimpleStrandedFeature