org.biojava.bio.search
Class SequenceDBSearchSubHit

java.lang.Object
  extended by org.biojava.utils.AbstractChangeable
      extended by org.biojava.bio.search.SequenceDBSearchSubHit
All Implemented Interfaces:
Annotatable, SeqSimilaritySearchSubHit, Changeable

Deprecated. SimpleSeqSimilaritySearchSubHit has been made Annotatable and is now functionally identical.

public class SequenceDBSearchSubHit
extends AbstractChangeable
implements SeqSimilaritySearchSubHit

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

Since:
1.1
Author:
Keith James
See Also:
SeqSimilaritySearchSubHit

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
          Deprecated.  
 
Fields inherited from interface org.biojava.bio.search.SeqSimilaritySearchSubHit
byScore, bySubjectStart, QUERY_LABEL
 
Fields inherited from interface org.biojava.bio.Annotatable
ANNOTATION
 
Constructor Summary
SequenceDBSearchSubHit(double score, double eValue, double pValue, int queryStart, int queryEnd, StrandedFeature.Strand queryStrand, int subjectStart, int subjectEnd, StrandedFeature.Strand subjectStrand, Alignment alignment, Annotation annotation)
          Deprecated. Creates a new SequenceDBSearchSubHit object.
 
Method Summary
 boolean equals(java.lang.Object other)
          Deprecated.  
 Alignment getAlignment()
          Deprecated. Return an alignment of (possibly part of) the query sequence against (possibly part of) this hit sequence.
 Annotation getAnnotation()
          Deprecated. Should return the associated annotation object.
protected  ChangeSupport getChangeSupport(ChangeType ct)
          Deprecated. Called to retrieve the ChangeSupport for this object.
 double getEValue()
          Deprecated. Return the E-value of this sub-hit.
 double getPValue()
          Deprecated. Return the P-value of this sub-hit.
 int getQueryEnd()
          Deprecated. Return the end position of the sub-hit in the query sequence.
 int getQueryStart()
          Deprecated. Return the start position of the sub-hit in the query sequence.
 StrandedFeature.Strand getQueryStrand()
          Deprecated. Return the strand of the sub-hit with respect to the query sequence.
 double getScore()
          Deprecated. Return the score of this sub-hit in the units defined by the search algorithm.
 int getSubjectEnd()
          Deprecated. Return the start position of the sub-hit in the subject sequence.
 int getSubjectStart()
          Deprecated. Return the start position of the sub-hit in the subject sequence.
 StrandedFeature.Strand getSubjectStrand()
          Deprecated. Return the strand of the sub-hit with respect to the subject sequence.
 int hashCode()
          Deprecated.  
 java.lang.String toString()
          Deprecated.  
 
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
Deprecated. 
Constructor Detail

SequenceDBSearchSubHit

public SequenceDBSearchSubHit(double score,
                              double eValue,
                              double pValue,
                              int queryStart,
                              int queryEnd,
                              StrandedFeature.Strand queryStrand,
                              int subjectStart,
                              int subjectEnd,
                              StrandedFeature.Strand subjectStrand,
                              Alignment alignment,
                              Annotation annotation)
Deprecated. 
Creates a new SequenceDBSearchSubHit 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.
annotation - an Annotation object, which may not be null.
Method Detail

getScore

public double getScore()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
Description copied from interface: Annotatable
Should return the associated annotation object.

Specified by:
getAnnotation in interface Annotatable
Returns:
an Annotation object, never null

equals

public boolean equals(java.lang.Object other)
Deprecated. 
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Deprecated. 
Overrides:
hashCode in class java.lang.Object

toString

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

getChangeSupport

protected ChangeSupport getChangeSupport(ChangeType ct)
Deprecated. 
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