Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.search
Class SimpleSeqSimilaritySearchSubHit

    java.lang.Object
      org.biojava.utils.AbstractChangeable
          org.biojava.bio.search.SimpleSeqSimilaritySearchSubHit

All Implemented Interfaces:
  Annotatable, SeqSimilaritySearchSubHit, Changeable

    public class SimpleSeqSimilaritySearchSubHit

extends AbstractChangeable
implements SeqSimilaritySearchSubHit

`SimpleSeqSimilaritySearchSubHit` objects represent sub-hits which make up a hit. In the case of Blast these correspond to HSPs.

Since:
  1.1
Author:
  Keith James, Gerald Loeffler

Nested Class Summary

Nested classes/interfaces inherited from interface org.biojava.bio.search.SeqSimilaritySearchSubHit
`SeqSimilaritySearchSubHit.ByScoreComparator, SeqSimilaritySearchSubHit.BySubjectStartComparator`

Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
`Annotatable.AnnotationForwarder`

Field Summary
`protected ChangeForwarder` | `annotationForwarder`

Fields inherited from interface org.biojava.bio.search.SeqSimilaritySearchSubHit
`byScore, bySubjectStart, QUERY_LABEL`

Fields inherited from interface org.biojava.bio.Annotatable
`ANNOTATION`

Constructor Summary
`SimpleSeqSimilaritySearchSubHit(double score, double eValue, double pValue, int queryStart, int queryEnd, StrandedFeature.Strand queryStrand, int subjectStart, int subjectEnd, StrandedFeature.Strand subjectStrand, Alignment alignment, Annotation annotation)` Creates a new `SimpleSeqSimilaritySearchSubHit` object.

Method Summary
`boolean` | `equals(Object other)`
`Alignment` | `getAlignment()` Return an alignment of (possibly part of) the query sequence against (possibly part of) this hit sequence.
`Annotation` | `getAnnotation()` `getAnnotation` returns the Annotation associated with this sub-hit.
`protected ChangeSupport` | `getChangeSupport(ChangeType ct)` Called to retrieve the ChangeSupport for this object.
`double` | `getEValue()` Return the E-value of this sub-hit.
`double` | `getPValue()` Return the P-value of this sub-hit.
`int` | `getQueryEnd()` Return the end position of the sub-hit in the query sequence.
`int` | `getQueryStart()` Return the start position of the sub-hit in the query sequence.
`StrandedFeature.Strand` | `getQueryStrand()` Return the strand of the sub-hit with respect to the query sequence.
`double` | `getScore()` Return the score of this sub-hit in the units defined by the search algorithm.
`int` | `getSubjectEnd()` Return the start position of the sub-hit in the subject sequence.
`int` | `getSubjectStart()` Return the start position of the sub-hit in the subject sequence.
`StrandedFeature.Strand` | `getSubjectStrand()` Return the strand of the sub-hit with respect to the subject sequence.
`int` | `hashCode()`
`String` | `toString()`

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.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

Field Detail

### annotationForwarder

    protected transient ChangeForwarder annotationForwarder

Constructor Detail

### SimpleSeqSimilaritySearchSubHit

    public SimpleSeqSimilaritySearchSubHit(double score,
                                           double eValue,
                                           double pValue,
                                           int queryStart,
                                           int queryEnd,
                                           StrandedFeature.Strand queryStrand,
                                           int subjectStart,
                                           int subjectEnd,
                                           StrandedFeature.Strand subjectStrand,
                                           Alignment alignment,
                                           Annotation annotation)

  Creates a new `SimpleSeqSimilaritySearchSubHit` object.

  Parameters:
    `queryStart` - an `int` value indicating the start coordinate of the hit on the query sequence.
    `queryEnd` - an `int` value indicating the end coordinate of the hit on the query sequence.
    `queryStrand` - a `Strand` object indicating the strand of the hit with respect to the query sequence, which may be null for protein similarities.
    `subjectStart` - an `int` value indicating the start coordinate of the hit on the subject sequence.
    `subjectEnd` - an `int` value indicating the end coordinate of the hit on the query sequence.
    `subjectStrand` - a `Strand` object indicating the strand of the hit with respect to the query sequence, which may be null for protein similarities.
    `score` - a `double` value; the score of the subhit, which may not be NaN.
    `eValue` - a `double` the E-value of the subhit, which may be NaN.
    `pValue` - a `double` value; the P-value of the hit, which may be NaN.
    `alignment` - an `Alignment` object containing the alignment described by the subhit region, which may not be null.

Method Detail

### getScore

    public double getScore()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the score of this sub-hit in the units defined by the search algorithm.

  Specified by:
    `getScore` in interface `SeqSimilaritySearchSubHit`
  Returns:
    the score of this sub-hit. This is a mandatory piece of information and hence may not be NaN.

### getPValue

    public double getPValue()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the P-value of this sub-hit.

  Specified by:
    `getPValue` in interface `SeqSimilaritySearchSubHit`
  Returns:
    the P-value of this sub-hit. This is an optional (but desired) piece of information and implementations of this interface may return NaN if a P-value is not available for this hit.

### getEValue

    public double getEValue()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the E-value of this sub-hit.

  Specified by:
    `getEValue` in interface `SeqSimilaritySearchSubHit`
  Returns:
    the E-value of this sub-hit. This is an optional (but desired) piece of information and implementations of this interface may return NaN if an E-value is not available for this hit.

### getQueryStart

    public int getQueryStart()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the start position of the sub-hit in the query sequence.

  Specified by:
    `getQueryStart` in interface `SeqSimilaritySearchSubHit`
  Returns:
    an `int`.

### getQueryEnd

    public int getQueryEnd()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the end position of the sub-hit in the query sequence.

  Specified by:
    `getQueryEnd` in interface `SeqSimilaritySearchSubHit`
  Returns:
    an `int`.

### getQueryStrand

    public StrandedFeature.Strand getQueryStrand()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the strand of the sub-hit with respect to the query sequence. This may be null for protein sequences.

  Specified by:
    `getQueryStrand` in interface `SeqSimilaritySearchSubHit`
  Returns:
    a `Strand`.

### getSubjectStart

    public int getSubjectStart()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the start position of the sub-hit in the subject sequence.

  Specified by:
    `getSubjectStart` in interface `SeqSimilaritySearchSubHit`
  Returns:
    an `int`.

### getSubjectEnd

    public int getSubjectEnd()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the start position of the sub-hit in the subject sequence.

  Specified by:
    `getSubjectEnd` in interface `SeqSimilaritySearchSubHit`
  Returns:
    an `int`.

### getSubjectStrand

    public StrandedFeature.Strand getSubjectStrand()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return the strand of the sub-hit with respect to the subject sequence. This may be null for protein sequences.

  Specified by:
    `getSubjectStrand` in interface `SeqSimilaritySearchSubHit`
  Returns:
    a `Strand`.

### getAlignment

    public Alignment getAlignment()

  Description copied from interface: `SeqSimilaritySearchSubHit`
  Return an alignment of (possibly part of) the query sequence against (possibly part of) this hit sequence. In this alignment, the query is identified by the label given by the static field QUERY_LABEL.

  Specified by:
    `getAlignment` in interface `SeqSimilaritySearchSubHit`
  Returns:
    the alignment of the query sequence against this hit sequence.

### getAnnotation

    public Annotation getAnnotation()

  `getAnnotation` returns the Annotation associated with this sub-hit.

  Specified by:
    `getAnnotation` in interface `Annotatable`
  Returns:
    an `Annotation`.

### equals

    public boolean equals(Object other)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getChangeSupport

    protected ChangeSupport getChangeSupport(ChangeType ct)

  Description copied from class: `AbstractChangeable`
  Called to retrieve the ChangeSupport for this object.

  Your implementation of this method should have the following structure: ``

       ChangeSupport cs = super.getChangeSupport(ct);

       if(someForwarder == null && ct.isMatching(SomeInterface.SomeChangeType)) {
         someForwarder = new ChangeForwarder(...

         this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange);
       }

       return cs;

  It is usual for the forwarding listeners (someForwarder in this example) to be transient and lazily instantiated. Be sure to register & unregister the forwarder in the code that does the ChangeEvent handling in setter methods.

  Overrides:
    `getChangeSupport` in class `AbstractChangeable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD