Package 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.Annotatable
Annotatable.AnnotationForwarderNested classes/interfaces inherited from interface org.biojava.bio.search.SeqSimilaritySearchSubHit
SeqSimilaritySearchSubHit.ByScoreComparator, SeqSimilaritySearchSubHit.BySubjectStartComparator -
Field Summary
FieldsFields inherited from interface org.biojava.bio.Annotatable
ANNOTATIONFields inherited from interface org.biojava.bio.search.SeqSimilaritySearchSubHit
byScore, bySubjectStart, QUERY_LABEL -
Constructor Summary
ConstructorsConstructorDescriptionSimpleSeqSimilaritySearchSubHit(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 newSimpleSeqSimilaritySearchSubHitobject. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn an alignment of (possibly part of) the query sequence against (possibly part of) this hit sequence.getAnnotationreturns the Annotation associated with this sub-hit.protected ChangeSupportCalled to retrieve the ChangeSupport for this object.doubleReturn the E-value of this sub-hit.doubleReturn the P-value of this sub-hit.intReturn the end position of the sub-hit in the query sequence.intReturn the start position of the sub-hit in the query sequence.Return the strand of the sub-hit with respect to the query sequence.doublegetScore()Return the score of this sub-hit in the units defined by the search algorithm.intReturn the start position of the sub-hit in the subject sequence.intReturn the start position of the sub-hit in the subject sequence.Return the strand of the sub-hit with respect to the subject sequence.inthashCode()toString()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
-
-
Constructor Details
-
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 newSimpleSeqSimilaritySearchSubHitobject.- Parameters:
queryStart- anintvalue indicating the start coordinate of the hit on the query sequence.queryEnd- anintvalue indicating the end coordinate of the hit on the query sequence.queryStrand- aStrandobject indicating the strand of the hit with respect to the query sequence, which may be null for protein similarities.subjectStart- anintvalue indicating the start coordinate of the hit on the subject sequence.subjectEnd- anintvalue indicating the end coordinate of the hit on the query sequence.subjectStrand- aStrandobject indicating the strand of the hit with respect to the query sequence, which may be null for protein similarities.score- adoublevalue; the score of the subhit, which may not be NaN.eValue- adoublethe E-value of the subhit, which may be NaN.pValue- adoublevalue; the P-value of the hit, which may be NaN.alignment- anAlignmentobject containing the alignment described by the subhit region, which may not be null.
-
-
Method Details
-
getScore
Description copied from interface:SeqSimilaritySearchSubHitReturn the score of this sub-hit in the units defined by the search algorithm.- Specified by:
getScorein interfaceSeqSimilaritySearchSubHit- Returns:
- the score of this sub-hit. This is a mandatory piece of information and hence may not be NaN.
-
getPValue
Description copied from interface:SeqSimilaritySearchSubHitReturn the P-value of this sub-hit.- Specified by:
getPValuein interfaceSeqSimilaritySearchSubHit- 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
Description copied from interface:SeqSimilaritySearchSubHitReturn the E-value of this sub-hit.- Specified by:
getEValuein interfaceSeqSimilaritySearchSubHit- 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
Description copied from interface:SeqSimilaritySearchSubHitReturn the start position of the sub-hit in the query sequence.- Specified by:
getQueryStartin interfaceSeqSimilaritySearchSubHit- Returns:
- an
int.
-
getQueryEnd
Description copied from interface:SeqSimilaritySearchSubHitReturn the end position of the sub-hit in the query sequence.- Specified by:
getQueryEndin interfaceSeqSimilaritySearchSubHit- Returns:
- an
int.
-
getQueryStrand
Description copied from interface:SeqSimilaritySearchSubHitReturn the strand of the sub-hit with respect to the query sequence. This may be null for protein sequences.- Specified by:
getQueryStrandin interfaceSeqSimilaritySearchSubHit- Returns:
- a
Strand.
-
getSubjectStart
Description copied from interface:SeqSimilaritySearchSubHitReturn the start position of the sub-hit in the subject sequence.- Specified by:
getSubjectStartin interfaceSeqSimilaritySearchSubHit- Returns:
- an
int.
-
getSubjectEnd
Description copied from interface:SeqSimilaritySearchSubHitReturn the start position of the sub-hit in the subject sequence.- Specified by:
getSubjectEndin interfaceSeqSimilaritySearchSubHit- Returns:
- an
int.
-
getSubjectStrand
Description copied from interface:SeqSimilaritySearchSubHitReturn the strand of the sub-hit with respect to the subject sequence. This may be null for protein sequences.- Specified by:
getSubjectStrandin interfaceSeqSimilaritySearchSubHit- Returns:
- a
Strand.
-
getAlignment
Description copied from interface:SeqSimilaritySearchSubHitReturn 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:
getAlignmentin interfaceSeqSimilaritySearchSubHit- Returns:
- the alignment of the query sequence against this hit sequence.
-
getAnnotation
getAnnotationreturns the Annotation associated with this sub-hit.- Specified by:
getAnnotationin interfaceAnnotatable- Returns:
- an
Annotation.
-
equals
-
hashCode
-
toString
-
getChangeSupport
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
-