Class BlastLikeSearchBuilder

java.lang.Object
org.biojava.bio.program.ssbind.BlastLikeSearchBuilder
All Implemented Interfaces:
SearchBuilder, SearchContentHandler

public class BlastLikeSearchBuilder extends Object implements SearchBuilder

BlastLikeSearchBuilder will create SeqSimilaritySearchResults from SAX events via a SeqSimilarityAdapter. The SAX events should describe elements conforming to the BioJava BlastLikeDataSetCollection DTD. Suitable sources are BlastLikeSAXParser or FastaSearchSAXParser. The result objects are placed in the List supplied to the constructor.

The start/end/strand of SeqSimilaritySearchHits are calculated from their constituent SeqSimilaritySearchSubHits as follows:

  • The query start is the lowest query start coordinate of its sub-hits, regardless of strand
  • The query end is the highest query end coordinate of its sub-hits, regardless of strand
  • The hit start is the lowest hit start coordinate of its sub-hits, regardless of strand
  • The hit end is the highest hit end coordinate of its sub-hits, regardless of strand
  • The query strand is null for protein sequences. Otherwise it is equal to the query strand of its sub-hits if they are all on the same strand, or StrandedFeature.UNKNOWN if the sub-hits have mixed query strands
  • The hit strand is null for protein sequences. Otherwise it is equal to the hit strand of its sub-hits if they are all on the same strand, or StrandedFeature.UNKNOWN if the sub-hits have mixed hit strands

This class has special meanings for particular keys: if you want to adapt this class for another parser, you will need to be aware of this. These originate from and are fully described in the BlastLikeDataSetCollection DTD.

Key Meaning
program either this value or the subjectSequenceType value must be set. This can take values acceptable to AlphabetResolver. These are BLASTN, BLASTP, BLASTX, TBLASTN, TBLASTX, DNA and PROTEIN.
databaseId Identifier of database searched (in SequenceDBInstallation).
subjectSequenceType type of sequence that hit is. Can be DNA or PROTEIN.
subjectId id of sequence that is hit
subjectDescription description of sequence that is hit
queryStrand Strandedness of query in alignment. Takes values of "plus" and "minus"
subjectStrand Strandedness of query in alignment. Takes values of "plus" and "minus"
queryFrame self-evident
subjectFrame self-evident
querySequenceStart self-evident
querySequenceEnd self-evident
subjectSequenceStart self-evident
subjectSequenceEnd self-evident
score self-evident
expectValue self-evident
pValue self-evident
Since:
1.2
Author:
Keith James, Greg Cox
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new BlastLikeSearchBuilder which will instantiate results into the List target.
    BlastLikeSearchBuilder(List target, SequenceDB querySeqHolder, SequenceDBInstallation subjectDBs)
    Creates a new BlastLikeSearchBuilder which will instantiate results into the List target.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    The addHitProperty method adds a key/value pair containing some property of a particular hit.
    void
    The addSearchProperty method adds a key/value pair containing some property of the overall search result.
    void
    The addSubHitProperty method adds a key/value pair containing some property of a particular subhit.
    void
    The endHeader method indicates the end of a formatted header.
    void
    The endHit method indicates the end of a formatted hit.
    void
    The endSearch method indicates the end of useful search information.
    void
    The endSubHit method indicates the end of a formatted subhit.
    boolean
    getMoreSearches returns the state of the SearchContentHandler with respect to further searches from its data source.
    The makeSearchResult method returns a SeqSimilaritySearchResult instance created from accumulated data.
    void
    setDatabaseID(String databaseID)
    setDatabaseID identifies the database searched by a name, ID or URN.
    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
    setQuerySeqHolder(SequenceDB querySeqHolder)
    setQuerySeqHolder sets the query sequence holder to a specific database.
    void
    setSubjectDBInstallation sets the subject database holder to a specific installation.
    void
    The startHeader method indicates the start of a formatted header.
    void
    The startHit method indicates the start of a formatted hit.
    void
    The startSearch method indicates the start of useful search information.
    void
    The startSubHit method indicates the start of a formatted subhit.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait