public class SequenceDBSearchHit extends AbstractChangeable implements SeqSimilaritySearchHit, Annotatable
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:
AbstractChangeable,
SeqSimilaritySearchHit,
AnnotatableSeqSimilaritySearchHit.ByScoreComparator, SeqSimilaritySearchHit.BySubHitCountComparatorAnnotatable.AnnotationForwarder| Modifier and Type | Field and Description |
|---|---|
protected ChangeForwarder |
annotationForwarder
Deprecated.
|
byScore, bySubHitCountANNOTATION| Constructor and Description |
|---|
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 new
SequenceDBSearchHit object. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Deprecated.
|
Annotation |
getAnnotation()
Deprecated.
getAnnotation returns the Annotation associated
with this hit. |
protected ChangeSupport |
getChangeSupport(ChangeType ct)
Deprecated.
Called to retrieve the ChangeSupport for this object.
|
double |
getEValue()
Deprecated.
Return the overall E-value of this hit.
|
double |
getPValue()
Deprecated.
Return the overall P-value of this hit.
|
int |
getQueryEnd()
Deprecated.
Return the end position of the last sub-hit in the query
sequence.
|
int |
getQueryStart()
Deprecated.
Return the start position of the first sub-hit in the query
sequence.
|
StrandedFeature.Strand |
getQueryStrand()
Deprecated.
Return the strand of the hit with respect to the query
sequence.
|
double |
getScore()
Deprecated.
Return the overall score of this hit in the units defined by the
search algorithm.
|
List |
getSubHits()
Deprecated.
Return all sub-hits for this sequence similarity search
hit.
|
int |
getSubjectEnd()
Deprecated.
Return the end position of the last sub-hit in the subject
sequence.
|
String |
getSubjectID()
Deprecated.
The sequence identifier of this hit within the sequence
database against which the search was performed.
|
int |
getSubjectStart()
Deprecated.
Return the start position of the first 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.
|
String |
toString()
Deprecated.
|
addChangeListener, addChangeListener, generateChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerprotected transient ChangeForwarder annotationForwarder
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)
SequenceDBSearchHit object.score - a double value; the score of the hit,
which may not be NaN.eValue - a double value; the E-value of the
hit, which may be NaN.pValue - a double value; 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 - a String representing the ID in
the SequenceDB of the sequence which was hit, which may not be
null.annotation - an Annotation object, which may
not be null.subHits - a List object containing the
subhits, which may not be null. They should be sorted in the
order specified by the search program.public double getScore()
SeqSimilaritySearchHitgetScore in interface SeqSimilaritySearchHitpublic double getPValue()
SeqSimilaritySearchHitgetPValue in interface SeqSimilaritySearchHitpublic double getEValue()
SeqSimilaritySearchHitgetEValue in interface SeqSimilaritySearchHitpublic int getQueryStart()
SeqSimilaritySearchHitgetQueryStart in interface SeqSimilaritySearchHitint.public int getQueryEnd()
SeqSimilaritySearchHitgetQueryEnd in interface SeqSimilaritySearchHitint.public StrandedFeature.Strand getQueryStrand()
SeqSimilaritySearchHitgetQueryStrand in interface SeqSimilaritySearchHitStrand.public int getSubjectStart()
SeqSimilaritySearchHitgetSubjectStart in interface SeqSimilaritySearchHitint.public int getSubjectEnd()
SeqSimilaritySearchHitgetSubjectEnd in interface SeqSimilaritySearchHitint.public StrandedFeature.Strand getSubjectStrand()
SeqSimilaritySearchHitgetSubjectStrand in interface SeqSimilaritySearchHitStrand.public String getSubjectID()
SeqSimilaritySearchHitgetSubjectID in interface SeqSimilaritySearchHitpublic List getSubHits()
SeqSimilaritySearchHitgetSubHits in interface SeqSimilaritySearchHitpublic Annotation getAnnotation()
getAnnotation returns the Annotation associated
with this 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 © 2014 BioJava. All rights reserved.