src/algo/blast/api/blast_dbindex.cpp File Reference


Detailed Description

Functionality for indexed databases.

Definition in file blast_dbindex.cpp.

#include <ncbi_pch.hpp>
#include <sstream>
#include <list>
#include <corelib/ncbistd.hpp>
#include <corelib/ncbithr.hpp>
#include <algo/blast/core/blast_hits.h>
#include <algo/blast/core/blast_gapalign.h>
#include <algo/blast/core/blast_util.h>
#include <objtools/blast/seqdb_reader/seqdbcommon.hpp>
#include <algo/blast/api/blast_dbindex.hpp>
#include <algo/blast/dbindex/dbindex.hpp>
#include "algo/blast/core/mb_indexed_lookup.h"

Include dependency graph for blast_dbindex.cpp:

Go to the source code of this file.

Classes

struct  SIndexedDbNewArgs
 This structure is used to transfer arguments to s_IDbSrcNew(). More...
class  CIndexedDb
 This class is responsible for loading indices and doing the actual seed search. More...
struct  CIndexedDb::SThreadLocal
 Data local to a running thread. More...
class  CPreSearchThread
 One thread of the indexed seed search. More...

Functions

static BlastSeqSrcs_IDbSrcNew (BlastSeqSrc *retval, void *args)
 Construct a new instance of index based subject sequence source.
static BlastSeqSrcs_CloneSrcNew (BlastSeqSrc *retval, void *args)
 Construct a copy of BlastSeqSrc structure.
static unsigned long s_MB_IdbGetResults (void *idb_v, Int4 oid_i, Int4 chunk_i, BlastInitHitList *init_hitlist)
 Get the seed search results for a give subject id and chunk number.
 USING_SCOPE (ncbi::objects)
 USING_SCOPE (ncbi::blastdbindex)
int MinIndexWordSize ()
 Get minimal word size accepted by indexing library.
static void NullPreSearch (BlastSeqSrc *, LookupTableWrap *, BLAST_SequenceBlk *, BlastSeqLoc *, LookupTableOptions *, BlastInitialWordOptions *)
 No-op presearch function.
static void NullSetQueryInfo (BlastSeqSrc *, LookupTableWrap *, CRef< CBlastSeqLocWrap >)
 No-op callback for setting query info.
static void NullRunSearch (BlastSeqSrc *, BLAST_SequenceBlk *, LookupTableOptions *, BlastInitialWordOptions *)
 No-op callback to run indexed search.
static void NullSetNumThreads (BlastSeqSrc *seq_src, size_t)
 No-op callback to set the number of threads for indexed search.
static void IndexedDbSetNumThreads (BlastSeqSrc *seq_src, size_t n_threads)
 Set the number of treads for indexed search.
static void IndexedDbRunSearch (BlastSeqSrc *seq_src, BLAST_SequenceBlk *queries, LookupTableOptions *lut_options, BlastInitialWordOptions *word_options)
 Run indexed search.
static void IndexedDbSetQueryInfo (BlastSeqSrc *seq_src, LookupTableWrap *lt_wrap, CRef< CBlastSeqLocWrap > locs_wrap)
 Set information about unmasked query segments.
static void IndexedDbPreSearch (BlastSeqSrc *seq_src, LookupTableWrap *lt_wrap, BLAST_SequenceBlk *queries, BlastSeqLoc *locs, LookupTableOptions *lut_options, BlastInitialWordOptions *word_options)
 Callback that is called for index based seed search.
BlastSeqSrcDbIndexSeqSrcInit (const string &indexname, BlastSeqSrc *db)
 Wrap a BlastSeqSrc object db by another object that provides index based seed searching.
BlastSeqSrcCloneSeqSrcInit (BlastSeqSrc *src)
 Creates a clone of a BlastSeqSrc structure.
void CloneSeqSrc (BlastSeqSrc *dst, BlastSeqSrc *src)
 Copies the contents of src to dst.
DbIndexPreSearchFnType GetDbIndexPreSearchFn ()
 Return the appropriate pre-search callback.
DbIndexSetQueryInfoFnType GetDbIndexSetQueryInfoFn ()
 Return the appropriate callback to set query information in the index.
DbIndexRunSearchFnType GetDbIndexRunSearchFn ()
 Return the appropriate callback to run indexed seed search.
DbIndexSetNumThreadsFnType GetDbIndexSetNumThreadsFn ()
 Return the appropriate callback to set the number of threads for indexed seed search.
END_NCBI_SCOPE USING_SCOPE (ncbi)
 USING_SCOPE (ncbi::blast)
static BlastSeqSrcs_GetForwardSeqSrc (void *handle)
 C language wrapper around CIndexedDb::GetDb().
static void * s_GetForwardSeqDb (void *handle)
 C language wrapper around CIndexedDb::GetSeqDb().
static Int4 s_IDbGetNumSeqs (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static Int4 s_IDbGetNumSeqsStats (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static Int4 s_IDbGetMaxLength (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static Int4 s_IDbGetAvgLength (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static Int8 s_IDbGetTotLen (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static Int8 s_IDbGetTotLenStats (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static const char * s_IDbGetName (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static Boolean s_IDbGetIsProt (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static Int2 s_IDbGetSequence (void *handle, BlastSeqSrcGetSeqArg *seq_arg)
 Forwards the call to CIndexedDb::db_.
static Int4 s_IDbGetSeqLen (void *handle, void *x)
 Forwards the call to CIndexedDb::db_.
static Int4 s_IDbIteratorNext (void *handle, BlastSeqSrcIterator *itr)
 Forwards the call to CIndexedDb::db_ but skip over the ones for which no results were poduces by pre-search.
static void s_IDbReleaseSequence (void *handle, BlastSeqSrcGetSeqArg *getseq_arg)
 Forwards the call to CIndexedDb::db_.
static void s_IDbResetChunkIterator (void *handle)
 Forwards the call to CIndexedDb::db_.
static BlastSeqSrcs_IDbSrcFree (BlastSeqSrc *seq_src)
 Destroy the sequence source.
static BlastSeqSrcs_IDbSrcCopy (BlastSeqSrc *seq_src)
 Fill the BlastSeqSrc data with a copy of its own contents.
static void s_IDbSrcInit (BlastSeqSrc *retval, CIndexedDb::TThreadLocal *idb)
 Initialize the BlastSeqSrc data structure with the appropriate callbacks.

Variables

static DbIndexPreSearchFnType PreSearchFn = &NullPreSearch
 Global pointer to the appropriate pre-search function, based on whether or not index search is enabled.
static DbIndexSetQueryInfoFnType SetQueryInfoFn = &NullSetQueryInfo
 Global pointer to the appropriate callback to set query info, based on whether or not index search is enabled.
static DbIndexRunSearchFnType RunSearchFn = &NullRunSearch
 Global pointer to the appropriate callback to run indexed search, based on whether or not index search is enabled.
static DbIndexSetNumThreadsFnType SetNumThreadsFn = &NullSetNumThreads
 Global pointer to the appropriate to set number of threads for indexed search, based on whether or not index search is enabled.


Generated on Wed Dec 9 07:41:03 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:18:29 2009 by modify_doxy.py rev. 173732