Package org.biojava.bio.program.ssbind
Class BlastLikeHomologyBuilder
- java.lang.Object
-
- org.biojava.bio.program.ssbind.ViewSequenceFactory
-
- org.biojava.bio.program.ssbind.BlastLikeHomologyBuilder
-
- All Implemented Interfaces:
SearchContentHandler
public class BlastLikeHomologyBuilder extends ViewSequenceFactory implements SearchContentHandler
BlastLikeHomologyBuilder
populates aList
withHomology
instances created from SAX events supplied via aSeqSimilarityAdapter
. The SAX events should describe elements conforming to the BioJava BlastLikeDataSetCollection DTD. Suitable sources areBlastLikeSAXParser
orFastaSAXParser
. AnnotatedViewSequence
s wrapping both query and subject sequences are created and populated withHomologyFeature
s. See the documentation ofHomology
andHomologyFeature
.As
SimpleHomologyFeature
s are created on views of the query and subject sequences, both query and subject should be nucleotide sequences (SimpleHomologyFeature
extendsStrandedFeature
.). This limits the searches currently handled to BLASTN, TBLASTX and Fasta DNA.- Since:
- 1.2
- Author:
- Keith James, Greg Cox
-
-
Field Summary
Fields Modifier and Type Field Description static String
HOMOLOGY_FEATURE_TYPE
HOMOLOGY_FEATURE_TYPE
is the type String used byBlastLikeHomologyBuilder
when creatingHomologyFeature
s.-
Fields inherited from class org.biojava.bio.program.ssbind.ViewSequenceFactory
databaseID, querySeqHolder, queryViewCache, subjectDBs, subjectViewCache
-
-
Constructor Summary
Constructors Constructor Description BlastLikeHomologyBuilder(List target)
Creates a newBlastLikeHomologyBuilder
which will instantiateHomology
objects into theList
target.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHitProperty(Object key, Object value)
TheaddHitProperty
method adds a key/value pair containing some property of a particular hit.void
addSearchProperty(Object key, Object value)
TheaddSearchProperty
method adds a key/value pair containing some property of the overall search result.void
addSubHitProperty(Object key, Object value)
TheaddSubHitProperty
method adds a key/value pair containing some property of a particular subhit.void
endHeader()
TheendHeader
method indicates the end of a formatted header.void
endHit()
TheendHit
method indicates the end of a formatted hit.void
endSearch()
TheendSearch
method indicates the end of useful search information.void
endSubHit()
TheendSubHit
method indicates the end of a formatted subhit.boolean
getMoreSearches()
getMoreSearches
returns the state of theSearchContentHandler
with respect to further searches from its data source.void
setMoreSearches(boolean value)
setMoreSearches
sets the state of theSearchContentHandler
's expectation of receiving more results.void
setQueryID(String queryID)
setQueryID
identifies the query sequence by a name, ID or URN.void
startHeader()
ThestartHeader
method indicates the start of a formatted header.void
startHit()
ThestartHit
method indicates the start of a formatted hit.void
startSearch()
ThestartSearch
method indicates the start of useful search information.void
startSubHit()
ThestartSubHit
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
-
HOMOLOGY_FEATURE_TYPE
public static final String HOMOLOGY_FEATURE_TYPE
HOMOLOGY_FEATURE_TYPE
is the type String used byBlastLikeHomologyBuilder
when creatingHomologyFeature
s. This is the String which is returned when anHomologyFeature
'sgetType()
method is called.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BlastLikeHomologyBuilder
public BlastLikeHomologyBuilder(List target)
Creates a newBlastLikeHomologyBuilder
which will instantiateHomology
objects into theList
target.- Parameters:
target
- aList
.
-
-
Method Detail
-
setQueryID
public void setQueryID(String queryID)
Description copied from interface:SearchContentHandler
setQueryID
identifies the query sequence by a name, ID or URN.- Specified by:
setQueryID
in interfaceSearchContentHandler
- Parameters:
queryID
- aString
which should be an unique identifer for the sequence.
-
getMoreSearches
public boolean getMoreSearches()
Description copied from interface:SearchContentHandler
getMoreSearches
returns the state of theSearchContentHandler
with respect to further searches from its data source. Used for handling streams of search results.- Specified by:
getMoreSearches
in interfaceSearchContentHandler
- Returns:
- a
boolean
value.
-
setMoreSearches
public void setMoreSearches(boolean value)
Description copied from interface:SearchContentHandler
setMoreSearches
sets the state of theSearchContentHandler
's expectation of receiving more results. Used for handling streams of search results.- Specified by:
setMoreSearches
in interfaceSearchContentHandler
- Parameters:
value
- aboolean
value.
-
startSearch
public void startSearch()
Description copied from interface:SearchContentHandler
ThestartSearch
method indicates the start of useful search information.- Specified by:
startSearch
in interfaceSearchContentHandler
-
endSearch
public void endSearch()
Description copied from interface:SearchContentHandler
TheendSearch
method indicates the end of useful search information.- Specified by:
endSearch
in interfaceSearchContentHandler
-
startHeader
public void startHeader()
Description copied from interface:SearchContentHandler
ThestartHeader
method indicates the start of a formatted header. This usually contains information relevant to the search as a whole.- Specified by:
startHeader
in interfaceSearchContentHandler
-
endHeader
public void endHeader()
Description copied from interface:SearchContentHandler
TheendHeader
method indicates the end of a formatted header.- Specified by:
endHeader
in interfaceSearchContentHandler
-
startHit
public void startHit()
Description copied from interface:SearchContentHandler
ThestartHit
method indicates the start of a formatted hit. This could be a single line, or a block of lines.- Specified by:
startHit
in interfaceSearchContentHandler
-
endHit
public void endHit()
Description copied from interface:SearchContentHandler
TheendHit
method indicates the end of a formatted hit.- Specified by:
endHit
in interfaceSearchContentHandler
-
startSubHit
public void startSubHit()
Description copied from interface:SearchContentHandler
ThestartSubHit
method indicates the start of a formatted subhit. There may be zero or more of these per hit.- Specified by:
startSubHit
in interfaceSearchContentHandler
-
endSubHit
public void endSubHit()
Description copied from interface:SearchContentHandler
TheendSubHit
method indicates the end of a formatted subhit.- Specified by:
endSubHit
in interfaceSearchContentHandler
-
addSearchProperty
public void addSearchProperty(Object key, Object value)
Description copied from interface:SearchContentHandler
TheaddSearchProperty
method adds a key/value pair containing some property of the overall search result.- Specified by:
addSearchProperty
in interfaceSearchContentHandler
- Parameters:
key
- anObject
.value
- anObject
.
-
addHitProperty
public void addHitProperty(Object key, Object value)
Description copied from interface:SearchContentHandler
TheaddHitProperty
method adds a key/value pair containing some property of a particular hit.- Specified by:
addHitProperty
in interfaceSearchContentHandler
- Parameters:
key
- anObject
.value
- anObject
.
-
addSubHitProperty
public void addSubHitProperty(Object key, Object value)
Description copied from interface:SearchContentHandler
TheaddSubHitProperty
method adds a key/value pair containing some property of a particular subhit.- Specified by:
addSubHitProperty
in interfaceSearchContentHandler
- Parameters:
key
- anObject
.value
- anObject
.
-
-