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.
SeqSimilaritySearchSubHit.ByScoreComparator, SeqSimilaritySearchSubHit.BySubjectStartComparatorAnnotatable.AnnotationForwarder| Modifier and Type | Field and Description |
|---|---|
protected ChangeForwarder |
annotationForwarder |
byScore, bySubjectStart, QUERY_LABELANNOTATION| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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() |
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerprotected transient ChangeForwarder annotationForwarder
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)
SimpleSeqSimilaritySearchSubHit
object.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.public double getScore()
SeqSimilaritySearchSubHitgetScore in interface SeqSimilaritySearchSubHitpublic double getPValue()
SeqSimilaritySearchSubHitgetPValue in interface SeqSimilaritySearchSubHitpublic double getEValue()
SeqSimilaritySearchSubHitgetEValue in interface SeqSimilaritySearchSubHitpublic int getQueryStart()
SeqSimilaritySearchSubHitgetQueryStart in interface SeqSimilaritySearchSubHitint.public int getQueryEnd()
SeqSimilaritySearchSubHitgetQueryEnd in interface SeqSimilaritySearchSubHitint.public StrandedFeature.Strand getQueryStrand()
SeqSimilaritySearchSubHitgetQueryStrand in interface SeqSimilaritySearchSubHitStrand.public int getSubjectStart()
SeqSimilaritySearchSubHitgetSubjectStart in interface SeqSimilaritySearchSubHitint.public int getSubjectEnd()
SeqSimilaritySearchSubHitgetSubjectEnd in interface SeqSimilaritySearchSubHitint.public StrandedFeature.Strand getSubjectStrand()
SeqSimilaritySearchSubHitgetSubjectStrand in interface SeqSimilaritySearchSubHitStrand.public Alignment getAlignment()
SeqSimilaritySearchSubHitgetAlignment in interface SeqSimilaritySearchSubHitpublic Annotation getAnnotation()
getAnnotation returns the Annotation associated
with this sub-hit.getAnnotation in interface AnnotatableAnnotation.protected ChangeSupport getChangeSupport(ChangeType ct)
AbstractChangeable
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;
getChangeSupport in class AbstractChangeableCopyright © 2020 BioJava. All rights reserved.