## org.biojava.bio.seq.impl
Class SimpleSimilarityPairFeature

    java.lang.Object
      org.biojava.utils.AbstractChangeable
          org.biojava.bio.seq.impl.SimpleFeature
              org.biojava.bio.seq.impl.SimpleStrandedFeature
                  org.biojava.bio.seq.impl.SimpleSimilarityPairFeature

All Implemented Interfaces:
  Serializable, Annotatable, Feature, FeatureHolder, SimilarityPairFeature, RealizingFeatureHolder, StrandedFeature, Changeable

    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/interfaces inherited from interface org.biojava.bio.seq.homol.SimilarityPairFeature
`SimilarityPairFeature.EmptyPairwiseAlignment, SimilarityPairFeature.Template`

Nested classes/interfaces inherited from interface org.biojava.bio.seq.StrandedFeature
`StrandedFeature.Strand`

Nested classes/interfaces inherited from interface org.biojava.bio.seq.Feature
`Feature.ByLocationComparator`

Nested classes/interfaces inherited from interface org.biojava.bio.seq.FeatureHolder
`FeatureHolder.EmptyFeatureHolder`

Nested classes/interfaces inherited from interface 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, STRAND, UNKNOWN`

Fields inherited from interface org.biojava.bio.seq.Feature
`byLocationOrder, LOCATION, PROPERTY_DATA_KEY, SOURCE, SOURCETERM, TYPE, TYPETERM`

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.
`String` `toString()`

Methods inherited from class org.biojava.bio.seq.impl.SimpleStrandedFeature
`fillTemplate, getStrand, getSymbols, setStrand`

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, getSourceTerm, getType, getTypeTerm, hashCode, realizeFeature, removeFeature, setLocation, setSource, setSourceTerm, setType, setTypeTerm`

Methods inherited from class org.biojava.utils.AbstractChangeable
`addChangeListener, addChangeListener, generateChangeSupport, hasListeners, 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, setStrand`

Methods inherited from interface org.biojava.bio.seq.Feature
`features, getLocation, getParent, getSequence, getSource, getSourceTerm, getType, getTypeTerm, setLocation, setSource, setSourceTerm, setType, setTypeTerm`

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`

Methods inherited from interface org.biojava.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

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`.
  Throws:
    `IllegalAlphabetException`

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`
  Returns:
    a new Template that would make a feature like this one

### fillTemplate

    protected void fillTemplate(SimilarityPairFeature.Template ft)

### toString

    public String toString()

  Overrides:
    `toString` in class `SimpleStrandedFeature`