Class BlastDatabase

  • All Implemented Interfaces:
    ISearchDomainService

    public class BlastDatabase
    extends AbstractSearchDomainService
    Implementation of ISearchDomainService based on BLAST. The following configuration parameters are understood:
    • blast-tools-directory: Absolute path to the directory with blastn and blastp command line tools.
    • blast-databases-folder: Folder with the BLAST databases as generated by BlastDatabaseCreationMaintenanceTask.
    By analyzing the specified sequence snippet either command line tool 'blastn' (nucleoid sequence) or 'blastp' (amoniacid sequence) is invoked.

    The following optional parameters are understood:

    blastn: task, evalue, word_size, ungapped

    blastp: task, evalue, word_size

    Note:

    • For flag-like options the option value has to be an empty string.
    • The default value for 'task' is 'blastn'/'blastp'.
    • Name space of optional parameters: In order to differenciate between blastn and blastp parameters the prefix 'blastn.' and 'blasp.' can be used. In addition the name of the sequence database (as sepcified by the configuration parameter 'label') can be used to distinguish properties for this instance from other instances.

      Examples of understood optional properties assuming the name of the database reads 'My BLAST db':

      blastn example:

       task
       ungapped
       blastn.word_size
       My Blast db.evalue
       My Blast db.blastn.task
       

      blastp example:

       task
       blastp.task
       My Blast db.evalue
       My Blast db.blastp.word_size
       
    • Field Detail

      • operationLog

        public static final org.apache.log4j.Logger operationLog
    • Constructor Detail

      • BlastDatabase

        public BlastDatabase​(java.util.Properties properties,
                             java.io.File storeRoot)
    • Method Detail

      • isAvailable

        public boolean isAvailable()
        Description copied from interface: ISearchDomainService
        Returns true if this service is available. For example, a local BLAST sequence search service is available if the external BLAST tools are available.
      • search

        public java.util.List<SearchDomainSearchResult> search​(java.lang.String sequenceSnippet,
                                                               java.util.Map<java.lang.String,​java.lang.String> optionalParametersOrNull)
        Description copied from interface: ISearchDomainService
        Searches this service for the specified search string.
        optionalParametersOrNull - Optional parameters which might be used. Can be null.
        Returns:
        an empty list if nothing be found.