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.BySubjectStartComparator
Annotatable.AnnotationForwarder
Modifier and Type | Field and Description |
---|---|
protected ChangeForwarder |
annotationForwarder |
byScore, bySubjectStart, QUERY_LABEL
ANNOTATION
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, removeChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
protected 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()
SeqSimilaritySearchSubHit
getScore
in interface SeqSimilaritySearchSubHit
public double getPValue()
SeqSimilaritySearchSubHit
getPValue
in interface SeqSimilaritySearchSubHit
public double getEValue()
SeqSimilaritySearchSubHit
getEValue
in interface SeqSimilaritySearchSubHit
public int getQueryStart()
SeqSimilaritySearchSubHit
getQueryStart
in interface SeqSimilaritySearchSubHit
int
.public int getQueryEnd()
SeqSimilaritySearchSubHit
getQueryEnd
in interface SeqSimilaritySearchSubHit
int
.public StrandedFeature.Strand getQueryStrand()
SeqSimilaritySearchSubHit
getQueryStrand
in interface SeqSimilaritySearchSubHit
Strand
.public int getSubjectStart()
SeqSimilaritySearchSubHit
getSubjectStart
in interface SeqSimilaritySearchSubHit
int
.public int getSubjectEnd()
SeqSimilaritySearchSubHit
getSubjectEnd
in interface SeqSimilaritySearchSubHit
int
.public StrandedFeature.Strand getSubjectStrand()
SeqSimilaritySearchSubHit
getSubjectStrand
in interface SeqSimilaritySearchSubHit
Strand
.public Alignment getAlignment()
SeqSimilaritySearchSubHit
getAlignment
in interface SeqSimilaritySearchSubHit
public Annotation getAnnotation()
getAnnotation
returns the Annotation associated
with this sub-hit.getAnnotation
in interface Annotatable
Annotation
.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 AbstractChangeable
Copyright © 2014 BioJava. All rights reserved.