|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.bio.program.ssbind.ViewSequenceFactory
org.biojava.bio.program.ssbind.SimilarityPairBuilder
public class SimilarityPairBuilder
SimilarityPairBuilder annotates query and subject
Sequence with SimilarityPairFeatures
created from SAX events supplied via a
SeqSimilarityAdapter. The objective is to describe a
simple pairwise relationship between the two sequences. This
differs slightly from using HomologyFeatures which are
slightly heavier, have to contain a full alignment and don't have
an explicit distinction between query and subject sequences in the
alignment. The SAX events should describe elements conforming to
the BioJava BlastLikeDataSetCollection DTD. Suitable sources are
BlastLikeSAXParser or FastaSAXParser.
Annotated ViewSequences wrapping both query and
subject sequences are created.
The current implementation should be used with care on streams containing more than one search output. This is because the builder will not stop after each report has been processed and as a result all the subject sequences get instantiated and a large object network could be created during processing.
| Field Summary | |
|---|---|
static String |
SIMILARITY_PAIR_FEATURE_TYPE
Constant SIMILARITY_PAIR_FEATURE_TYPE the type
String used by SimilarityPairBuilder when creating
SimilarityPairFeatures. |
| Fields inherited from class org.biojava.bio.program.ssbind.ViewSequenceFactory |
|---|
databaseID, querySeqHolder, queryViewCache, subjectDBs, subjectViewCache |
| Constructor Summary | |
|---|---|
SimilarityPairBuilder()
|
|
| Method Summary | |
|---|---|
void |
addHitProperty(Object key,
Object value)
The addHitProperty method adds a key/value pair
containing some property of a particular hit. |
void |
addSearchProperty(Object key,
Object value)
The addSearchProperty method adds a key/value pair
containing some property of the overall search result. |
void |
addSubHitProperty(Object key,
Object value)
The addSubHitProperty method adds a key/value pair
containing some property of a particular subhit. |
void |
endHeader()
The endHeader method indicates the end of a
formatted header. |
void |
endHit()
The endHit method indicates the end of a formatted
hit. |
void |
endSearch()
The endSearch method indicates the end of useful
search information. |
void |
endSubHit()
The endSubHit method indicates the end of a
formatted subhit. |
Sequence |
getAnnotatedQuerySeq(String queryID)
|
Sequence |
getAnnotatedSubjectSeq(String subjectID)
|
boolean |
getMoreSearches()
getMoreSearches returns the state of the
SearchContentHandler with respect to further
searches from its data source. |
void |
setMoreSearches(boolean value)
setMoreSearches sets the state of the
SearchContentHandler's expectation of receiving
more results. |
void |
setQueryID(String queryID)
setQueryID identifies the query sequence by a
name, ID or URN. |
void |
startHeader()
The startHeader method indicates the start of a
formatted header. |
void |
startHit()
The startHit method indicates the start of a
formatted hit. |
void |
startSearch()
The startSearch method indicates the start of
useful search information. |
void |
startSubHit()
The startSubHit method indicates the start of a
formatted subhit. |
| Methods inherited from class org.biojava.bio.program.ssbind.ViewSequenceFactory |
|---|
getQuerySeqHolder, getSubjectDBInstallation, makeQueryViewSequence, makeSubjectViewSequence, setDatabaseID, setQuerySeqHolder, setSubjectDBInstallation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.biojava.bio.search.SearchContentHandler |
|---|
setDatabaseID |
| Field Detail |
|---|
public static final String SIMILARITY_PAIR_FEATURE_TYPE
SIMILARITY_PAIR_FEATURE_TYPE the type
String used by SimilarityPairBuilder when creating
SimilarityPairFeatures. This is the String which
is returned when a SimilarityPairFeature's
getType() method is called.
| Constructor Detail |
|---|
public SimilarityPairBuilder()
| Method Detail |
|---|
public Sequence getAnnotatedQuerySeq(String queryID)
throws IllegalIDException
IllegalIDException
public Sequence getAnnotatedSubjectSeq(String subjectID)
throws IllegalIDException
IllegalIDExceptionpublic void setQueryID(String queryID)
SearchContentHandlersetQueryID identifies the query sequence by a
name, ID or URN.
setQueryID in interface SearchContentHandlerqueryID - a String which should be an unique
identifer for the sequence.public boolean getMoreSearches()
SearchContentHandlergetMoreSearches returns the state of the
SearchContentHandler with respect to further
searches from its data source. Used for handling streams of
search results.
getMoreSearches in interface SearchContentHandlerboolean value.public void setMoreSearches(boolean value)
SearchContentHandlersetMoreSearches sets the state of the
SearchContentHandler's expectation of receiving
more results. Used for handling streams of search results.
setMoreSearches in interface SearchContentHandlervalue - a boolean value.public void startSearch()
SearchContentHandlerstartSearch method indicates the start of
useful search information.
startSearch in interface SearchContentHandlerpublic void endSearch()
SearchContentHandlerendSearch method indicates the end of useful
search information.
endSearch in interface SearchContentHandlerpublic void startHeader()
SearchContentHandlerstartHeader method indicates the start of a
formatted header. This usually contains information relevant to
the search as a whole.
startHeader in interface SearchContentHandlerpublic void endHeader()
SearchContentHandlerendHeader method indicates the end of a
formatted header.
endHeader in interface SearchContentHandlerpublic void startHit()
SearchContentHandlerstartHit method indicates the start of a
formatted hit. This could be a single line, or a block of
lines.
startHit in interface SearchContentHandlerpublic void endHit()
SearchContentHandlerendHit method indicates the end of a formatted
hit.
endHit in interface SearchContentHandlerpublic void startSubHit()
SearchContentHandlerstartSubHit method indicates the start of a
formatted subhit. There may be zero or more of these per hit.
startSubHit in interface SearchContentHandlerpublic void endSubHit()
SearchContentHandlerendSubHit method indicates the end of a
formatted subhit.
endSubHit in interface SearchContentHandler
public void addSearchProperty(Object key,
Object value)
SearchContentHandleraddSearchProperty method adds a key/value pair
containing some property of the overall search result.
addSearchProperty in interface SearchContentHandlerkey - an Object.value - an Object.
public void addHitProperty(Object key,
Object value)
SearchContentHandleraddHitProperty method adds a key/value pair
containing some property of a particular hit.
addHitProperty in interface SearchContentHandlerkey - an Object.value - an Object.
public void addSubHitProperty(Object key,
Object value)
SearchContentHandleraddSubHitProperty method adds a key/value pair
containing some property of a particular subhit.
addSubHitProperty in interface SearchContentHandlerkey - an Object.value - an Object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||