Class SequenceDBSearchHit
- All Implemented Interfaces:
Annotatable,SeqSimilaritySearchHit,Changeable
SequenceDBSearchHit objects represent a similarity
search hit of a query sequence to a sequence referenced in a
SequenceDB object. The core data (score, E-value, P-value) have
accessors, while supplementary data are stored in the Annotation
object. Supplementary data are typically the more loosely formatted
details which vary from one search program to another (and between
versions of those programs).
It is up to the user to define the meaning of the hit's query/subject start/end/strand with respect to its constituent sub-hits. One approach could be:
- Hit query/subject start == start of first sub-hit
- Hit query/subject end == end of last sub-hit
- Hit strand == POSITIVE if all sub-hits have strand POSITIVE
- Hit strand == NEGATIVE if all sub-hits have strand NEGATIVE
- Hit strand == UNKNOWN if sub-hits have either mixed or any UNKNOWN strands
- Hit strand == null if the concept of strandedness is inappropriate for the sequence type i.e. for protein
- Since:
- 1.1
- Author:
- Keith James, Matthew Pocock
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojava.bio.Annotatable
Annotatable.AnnotationForwarderNested classes/interfaces inherited from interface org.biojava.bio.search.SeqSimilaritySearchHit
SeqSimilaritySearchHit.ByScoreComparator, SeqSimilaritySearchHit.BySubHitCountComparator -
Field Summary
FieldsFields inherited from interface org.biojava.bio.Annotatable
ANNOTATIONFields inherited from interface org.biojava.bio.search.SeqSimilaritySearchHit
byScore, bySubHitCount -
Constructor Summary
ConstructorsConstructorDescriptionSequenceDBSearchHit(double score, double eValue, double pValue, int queryStart, int queryEnd, StrandedFeature.Strand queryStrand, int subjectStart, int subjectEnd, StrandedFeature.Strand subjectStrand, String subjectID, Annotation annotation, List subHits) Deprecated.Creates a newSequenceDBSearchHitobject. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Deprecated.getAnnotationreturns the Annotation associated with this hit.protected ChangeSupportDeprecated.Called to retrieve the ChangeSupport for this object.doubleDeprecated.Return the overall E-value of this hit.doubleDeprecated.Return the overall P-value of this hit.intDeprecated.Return the end position of the last sub-hit in the query sequence.intDeprecated.Return the start position of the first sub-hit in the query sequence.Deprecated.Return the strand of the hit with respect to the query sequence.doublegetScore()Deprecated.Return the overall score of this hit in the units defined by the search algorithm.Deprecated.Return all sub-hits for this sequence similarity search hit.intDeprecated.Return the end position of the last sub-hit in the subject sequence.Deprecated.The sequence identifier of this hit within the sequence database against which the search was performed.intDeprecated.Return the start position of the first sub-hit in the subject sequence.Deprecated.Return the strand of the sub-hit with respect to the subject sequence.inthashCode()Deprecated.toString()Deprecated.Methods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Field Details
-
annotationForwarder
Deprecated.
-
-
Constructor Details
-
SequenceDBSearchHit
public SequenceDBSearchHit(double score, double eValue, double pValue, int queryStart, int queryEnd, StrandedFeature.Strand queryStrand, int subjectStart, int subjectEnd, StrandedFeature.Strand subjectStrand, String subjectID, Annotation annotation, List subHits) Deprecated.Creates a newSequenceDBSearchHitobject.- Parameters:
score- adoublevalue; the score of the hit, which may not be NaN.eValue- adoublevalue; the E-value of the hit, which may be NaN.pValue- adoublevalue; the P-value of the hit, which may be NaN.queryStart- the start of the first sub-hit on the query sequence.queryEnd- the end of the last sub-hit on the query sequence.queryStrand- the strand of the sub-hits on the query sequence, which may be null for protein similarities. If they are not all positive or all negative, then this should be the unknown strand.subjectStart- the start of the first sub-hit on the subject sequence.subjectEnd- the end of the last sub-hit on the subject sequence.subjectStrand- the strand of the sub-hits on the subject sequence, which may be null for protein similarities. If they are not all positive or all negative, then this should be the unknown strand.subjectID- aStringrepresenting the ID in the SequenceDB of the sequence which was hit, which may not be null.annotation- anAnnotationobject, which may not be null.subHits- aListobject containing the subhits, which may not be null. They should be sorted in the order specified by the search program.
-
-
Method Details
-
getScore
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the overall score of this hit in the units defined by the search algorithm.- Specified by:
getScorein interfaceSeqSimilaritySearchHit- Returns:
- the overall score of this hit. This is a mandatory piece of information and hence may not be NaN.
-
getPValue
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the overall P-value of this hit.- Specified by:
getPValuein interfaceSeqSimilaritySearchHit- Returns:
- the overall P-value of this 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
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the overall E-value of this hit.- Specified by:
getEValuein interfaceSeqSimilaritySearchHit- Returns:
- the overall E-value of this 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
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the start position of the first sub-hit in the query sequence.- Specified by:
getQueryStartin interfaceSeqSimilaritySearchHit- Returns:
- an
int.
-
getQueryEnd
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the end position of the last sub-hit in the query sequence.- Specified by:
getQueryEndin interfaceSeqSimilaritySearchHit- Returns:
- an
int.
-
getQueryStrand
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the strand of the hit with respect to the query sequence. If the sub-hits are not all on the same strand this should return the unknown strand. This may be null for protein sequences.- Specified by:
getQueryStrandin interfaceSeqSimilaritySearchHit- Returns:
- a
Strand.
-
getSubjectStart
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the start position of the first sub-hit in the subject sequence.- Specified by:
getSubjectStartin interfaceSeqSimilaritySearchHit- Returns:
- an
int.
-
getSubjectEnd
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the end position of the last sub-hit in the subject sequence.- Specified by:
getSubjectEndin interfaceSeqSimilaritySearchHit- Returns:
- an
int.
-
getSubjectStrand
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn the strand of the sub-hit with respect to the subject sequence. If the sub-hits are not all on the same strand this should return the unknown strand. This may be null for protein sequences.- Specified by:
getSubjectStrandin interfaceSeqSimilaritySearchHit- Returns:
- a
Strand.
-
getSubjectID
Deprecated.Description copied from interface:SeqSimilaritySearchHitThe sequence identifier of this hit within the sequence database against which the search was performed.- Specified by:
getSubjectIDin interfaceSeqSimilaritySearchHit- Returns:
- the (unique) sequence identifier for this hit, valid within the sequence database against which this search was performed. Never returns null.
-
getSubHits
Deprecated.Description copied from interface:SeqSimilaritySearchHitReturn all sub-hits for this sequence similarity search hit. The sub-hits contain concrete alignments (and scores) for sequence stretches from the sequence of this hit. The sub-hits in the list returned by this method are sorted from best to worst.- Specified by:
getSubHitsin interfaceSeqSimilaritySearchHit- Returns:
- a List of SeqSimilaritySearchSubHit objects containing all sub-hits for this hit. Never returns null and the List is guaranteed to contain at least one entry.
-
getAnnotation
Deprecated.getAnnotationreturns the Annotation associated with this hit.- Specified by:
getAnnotationin interfaceAnnotatable- Returns:
- an
Annotation.
-
equals
Deprecated. -
hashCode
Deprecated. -
toString
Deprecated. -
getChangeSupport
Deprecated.Description copied from class:AbstractChangeableCalled to retrieve the ChangeSupport for this object.Your implementation of this method should have the following structure:
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.ChangeSupport cs = super.getChangeSupport(ct); if(someForwarder == null && ct.isMatching(SomeInterface.SomeChangeType)) { someForwarder = new ChangeForwarder(... this.stateVariable.addChangeListener(someForwarder, VariableInterface.AChange); } return cs;- Overrides:
getChangeSupportin classAbstractChangeable
-