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
BlastLikeHomologyBuilderpopulates aListwithHomologyinstances created from SAX events supplied via aSeqSimilarityAdapter. The SAX events should describe elements conforming to the BioJava BlastLikeDataSetCollection DTD. Suitable sources areBlastLikeSAXParserorFastaSAXParser. AnnotatedViewSequences wrapping both query and subject sequences are created and populated withHomologyFeatures. See the documentation ofHomologyandHomologyFeature.As
SimpleHomologyFeatures are created on views of the query and subject sequences, both query and subject should be nucleotide sequences (SimpleHomologyFeatureextendsStrandedFeature.). 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 StringHOMOLOGY_FEATURE_TYPEHOMOLOGY_FEATURE_TYPEis the type String used byBlastLikeHomologyBuilderwhen creatingHomologyFeatures.-
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 newBlastLikeHomologyBuilderwhich will instantiateHomologyobjects into theListtarget.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHitProperty(Object key, Object value)TheaddHitPropertymethod adds a key/value pair containing some property of a particular hit.voidaddSearchProperty(Object key, Object value)TheaddSearchPropertymethod adds a key/value pair containing some property of the overall search result.voidaddSubHitProperty(Object key, Object value)TheaddSubHitPropertymethod adds a key/value pair containing some property of a particular subhit.voidendHeader()TheendHeadermethod indicates the end of a formatted header.voidendHit()TheendHitmethod indicates the end of a formatted hit.voidendSearch()TheendSearchmethod indicates the end of useful search information.voidendSubHit()TheendSubHitmethod indicates the end of a formatted subhit.booleangetMoreSearches()getMoreSearchesreturns the state of theSearchContentHandlerwith respect to further searches from its data source.voidsetMoreSearches(boolean value)setMoreSearchessets the state of theSearchContentHandler's expectation of receiving more results.voidsetQueryID(String queryID)setQueryIDidentifies the query sequence by a name, ID or URN.voidstartHeader()ThestartHeadermethod indicates the start of a formatted header.voidstartHit()ThestartHitmethod indicates the start of a formatted hit.voidstartSearch()ThestartSearchmethod indicates the start of useful search information.voidstartSubHit()ThestartSubHitmethod 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_TYPEis the type String used byBlastLikeHomologyBuilderwhen creatingHomologyFeatures. 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 newBlastLikeHomologyBuilderwhich will instantiateHomologyobjects into theListtarget.- Parameters:
target- aList.
-
-
Method Detail
-
setQueryID
public void setQueryID(String queryID)
Description copied from interface:SearchContentHandlersetQueryIDidentifies the query sequence by a name, ID or URN.- Specified by:
setQueryIDin interfaceSearchContentHandler- Parameters:
queryID- aStringwhich should be an unique identifer for the sequence.
-
getMoreSearches
public boolean getMoreSearches()
Description copied from interface:SearchContentHandlergetMoreSearchesreturns the state of theSearchContentHandlerwith respect to further searches from its data source. Used for handling streams of search results.- Specified by:
getMoreSearchesin interfaceSearchContentHandler- Returns:
- a
booleanvalue.
-
setMoreSearches
public void setMoreSearches(boolean value)
Description copied from interface:SearchContentHandlersetMoreSearchessets the state of theSearchContentHandler's expectation of receiving more results. Used for handling streams of search results.- Specified by:
setMoreSearchesin interfaceSearchContentHandler- Parameters:
value- abooleanvalue.
-
startSearch
public void startSearch()
Description copied from interface:SearchContentHandlerThestartSearchmethod indicates the start of useful search information.- Specified by:
startSearchin interfaceSearchContentHandler
-
endSearch
public void endSearch()
Description copied from interface:SearchContentHandlerTheendSearchmethod indicates the end of useful search information.- Specified by:
endSearchin interfaceSearchContentHandler
-
startHeader
public void startHeader()
Description copied from interface:SearchContentHandlerThestartHeadermethod indicates the start of a formatted header. This usually contains information relevant to the search as a whole.- Specified by:
startHeaderin interfaceSearchContentHandler
-
endHeader
public void endHeader()
Description copied from interface:SearchContentHandlerTheendHeadermethod indicates the end of a formatted header.- Specified by:
endHeaderin interfaceSearchContentHandler
-
startHit
public void startHit()
Description copied from interface:SearchContentHandlerThestartHitmethod indicates the start of a formatted hit. This could be a single line, or a block of lines.- Specified by:
startHitin interfaceSearchContentHandler
-
endHit
public void endHit()
Description copied from interface:SearchContentHandlerTheendHitmethod indicates the end of a formatted hit.- Specified by:
endHitin interfaceSearchContentHandler
-
startSubHit
public void startSubHit()
Description copied from interface:SearchContentHandlerThestartSubHitmethod indicates the start of a formatted subhit. There may be zero or more of these per hit.- Specified by:
startSubHitin interfaceSearchContentHandler
-
endSubHit
public void endSubHit()
Description copied from interface:SearchContentHandlerTheendSubHitmethod indicates the end of a formatted subhit.- Specified by:
endSubHitin interfaceSearchContentHandler
-
addSearchProperty
public void addSearchProperty(Object key, Object value)
Description copied from interface:SearchContentHandlerTheaddSearchPropertymethod adds a key/value pair containing some property of the overall search result.- Specified by:
addSearchPropertyin interfaceSearchContentHandler- Parameters:
key- anObject.value- anObject.
-
addHitProperty
public void addHitProperty(Object key, Object value)
Description copied from interface:SearchContentHandlerTheaddHitPropertymethod adds a key/value pair containing some property of a particular hit.- Specified by:
addHitPropertyin interfaceSearchContentHandler- Parameters:
key- anObject.value- anObject.
-
addSubHitProperty
public void addSubHitProperty(Object key, Object value)
Description copied from interface:SearchContentHandlerTheaddSubHitPropertymethod adds a key/value pair containing some property of a particular subhit.- Specified by:
addSubHitPropertyin interfaceSearchContentHandler- Parameters:
key- anObject.value- anObject.
-
-