A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/blast__seqsrc_8h.html below:

NCBI C++ ToolKit: include/algo/blast/core/blast_seqsrc.h File Reference

Declaration of ADT to retrieve sequences for the BLAST engine. More...

Go to the source code of this file.

Go to the SVN repository for this file.

BlastSeqSrcBlastSeqSrcNew (const BlastSeqSrcNewInfo *bssn_info)   Allocates memory for a BlastSeqSrc structure and then invokes the constructor function defined in its first argument, passing the ctor_argument member of that same structure. More...
  BlastSeqSrcBlastSeqSrcCopy (const BlastSeqSrc *seq_src)   Copy function: needed to guarantee thread safety. More...
  BlastSeqSrcBlastSeqSrcFree (BlastSeqSrc *seq_src)   Frees the BlastSeqSrc structure by invoking the destructor function set by the user-defined constructor function when the structure is initialized (indirectly, by BlastSeqSrcNew). More...
  Int4  BlastSeqSrcGetNumSeqs (const BlastSeqSrc *seq_src)   Get the number of sequences contained in the sequence source. More...
  Int4  BlastSeqSrcGetNumSeqsStats (const BlastSeqSrc *seq_src)   Get the number of sequences used for calculation of expect values etc. More...
  Int4  BlastSeqSrcGetMaxSeqLen (const BlastSeqSrc *seq_src)   Get the length of the longest sequence in the sequence source. More...
  Int4  BlastSeqSrcGetMinSeqLen (const BlastSeqSrc *seq_src)   Get the length of the longest sequence in the sequence source. More...
  Int4  BlastSeqSrcGetAvgSeqLen (const BlastSeqSrc *seq_src)   Get the average length of all sequences in the sequence source. More...
  Int8  BlastSeqSrcGetTotLen (const BlastSeqSrc *seq_src)   Get the total length of all sequences in the sequence source. More...
  Int8  BlastSeqSrcGetTotLenStats (const BlastSeqSrc *seq_src)   Get the total length of all sequences for calculation of expect value etc. More...
  const char *  BlastSeqSrcGetName (const BlastSeqSrc *seq_src)   Get the Blast Sequence source name (e.g. More...
  Boolean  BlastSeqSrcGetIsProt (const BlastSeqSrc *seq_src)   Find if the Blast Sequence Source contains protein or nucleotide sequences. More...
  Boolean  BlastSeqSrcGetSupportsPartialFetching (const BlastSeqSrc *seq_src)   Find if the Blast Sequence Source supports partial fetching. More...
  BlastSeqSrcSetRangesArgBlastSeqSrcSetRangesArgNew (Int4 num_ranges)   new setrangearg More...
  Int2  BlastSeqSrcSetRangesArgAddRange (BlastSeqSrcSetRangesArg *arg, Int4 begin, Int4 end, Int4 len)   add new range More...
  BlastSeqSrcSetRangesArgBlastSeqSrcSetRangesArgFree (BlastSeqSrcSetRangesArg *arg)   free setrangearg More...
  void  BlastSeqSrcSetRangesArgBuild (BlastSeqSrcSetRangesArg *arg)   build BlastSeqSrcSetRangesArg from range list More...
  void  BlastSeqSrcSetSeqRanges (const BlastSeqSrc *seq_src, BlastSeqSrcSetRangesArg *setranges_arg)   Setting the ranges for partial fetching. More...
  Int2  BlastSeqSrcGetSequence (const BlastSeqSrc *seq_src, BlastSeqSrcGetSeqArg *getseq_arg)   Retrieve an individual sequence. More...
  Int4  BlastSeqSrcGetSeqLen (const BlastSeqSrc *seq_src, void *oid)   Retrieve sequence length (number of residues/bases) More...
  void  BlastSeqSrcReleaseSequence (const BlastSeqSrc *seq_src, BlastSeqSrcGetSeqArg *getseq_arg)   Deallocate individual sequence. More...
  char *  BlastSeqSrcGetInitError (const BlastSeqSrc *seq_src)   Function to retrieve NULL terminated string containing the description of an initialization error or NULL. More...
  BlastSeqSrcIteratorBlastSeqSrcIteratorNew (void)   Allocate and initialize an iterator over a BlastSeqSrc with a default chunk size for MT-safe iteration. More...
  BlastSeqSrcIteratorBlastSeqSrcIteratorNewEx (unsigned int chunk_sz)   Allocate and initialize an iterator over a BlastSeqSrc. More...
  BlastSeqSrcIteratorBlastSeqSrcIteratorFree (BlastSeqSrcIterator *itr)   Frees the BlastSeqSrcIterator structure. More...
  Int4  BlastSeqSrcIteratorNext (const BlastSeqSrc *seq_src, BlastSeqSrcIterator *itr)   Increments the BlastSeqSrcIterator. More...
  void  BlastSeqSrcResetChunkIterator (BlastSeqSrc *seq_src)   Reset the internal "bookmark" of the last chunk for iteration provided by this object. More...
  void  BlastSeqSrcSetNumberOfThreads (BlastSeqSrc *seq_src, int nthreads)   Set the number of threads for MT mode. More...
 

Declaration of ADT to retrieve sequences for the BLAST engine.

Definition in file blast_seqsrc.h.

◆ BLAST_SEQSRC_EOF #define BLAST_SEQSRC_EOF   -1 ◆ BLAST_SEQSRC_ERROR #define BLAST_SEQSRC_ERROR   -2 ◆ BLAST_SEQSRC_EXCLUDED #define BLAST_SEQSRC_EXCLUDED   -3 ◆ BLAST_SEQSRC_MINGAP #define BLAST_SEQSRC_MINGAP   1024 ◆ BLAST_SEQSRC_MINLENGTH #define BLAST_SEQSRC_MINLENGTH   10 ◆ BLAST_SEQSRC_OVERHANG #define BLAST_SEQSRC_OVERHANG   1024 ◆ BLAST_SEQSRC_SUCCESS #define BLAST_SEQSRC_SUCCESS   0 ◆ BlastSeqSrc

The BlastSeqSrc ADT is an opaque data type that defines an interface which is used by the core BLAST code to retrieve sequences.

The interface currently provides the following services:

For more details, see also Implementing the BlastSeqSrc interface

Definition at line 1 of file blast_seqsrc.h.

◆ BlastSeqSrcGetSeqArg

Structure used as the second argument to functions satisfying the GetSeqBlkFnPtr signature, associated with index-based implementations of the BlastSeqSrc interface.

Index-based implementations include BLAST databases or an array/vector of sequences.

◆ BlastSeqSrcIterator ◆ BlastSeqSrcNewInfo

Structure that contains the information needed for BlastSeqSrcNew to fully populate the BlastSeqSrc structure it returns.

Definition at line 1 of file blast_seqsrc.h.

◆ BlastSeqSrcSetRangesArg

Structure used as the argument to function SetRanges.

◆ BlastSeqSrcCopy()

Copy function: needed to guarantee thread safety.

Copies the contents of an input BlastSeqSrc, then calls a copier function, provided by the implementation, to achieve multi-thread safety.

Parameters
Returns
An MT-safe copy of the structure passed in, NULL in case of memory allocation failure, or, if no copy function was provided by the implementation, a bitwise copy of the input.

Definition at line 138 of file blast_seqsrc.c.

References BlastMemDup(), BlastSeqSrc::CopyFnPtr, and NULL.

Referenced by Blast_RedoAlignmentCore_MT(), BOOST_AUTO_TEST_CASE(), CPrelimSearchThread::CPrelimSearchThread(), NaHashLookupThreadDataNew(), SplitQuery_CreateChunkData(), and SThreadLocalDataArraySetup().

◆ BlastSeqSrcFree()

Frees the BlastSeqSrc structure by invoking the destructor function set by the user-defined constructor function when the structure is initialized (indirectly, by BlastSeqSrcNew).

If the destructor function pointer is not set, a memory leak could occur. Note that it is the implementation's destructor responsibility to free the BlastSeqSrc structure by calling sfree.

Parameters
Returns
NULL

Definition at line 112 of file blast_seqsrc.c.

References ASSERT, BlastSeqSrc::DeleteFnPtr, BlastSeqSrc::InitErrorStr, NULL, and sfree.

Referenced by Blast_RedoAlignmentCore_MT(), BOOST_AUTO_TEST_CASE(), CBlastPrelimSearch::CBlastPrelimSearch(), CPrelimSearchThread::CPrelimSearchThread(), CSetupFactory::CreateBlastSeqSrc(), NaHashLookupThreadDataFree(), CBlastKmerSearch::Run(), SplitQuery_CreateChunkData(), SThreadLocalDataFree(), CVDBBlastUtil::x_MakeVDBSeqSrc(), CLocalDbAdapter::~CLocalDbAdapter(), CVDBBlastUtil::~CVDBBlastUtil(), and FailingMockSeqSrcTestFixture::~FailingMockSeqSrcTestFixture().

◆ BlastSeqSrcGetAvgSeqLen() ◆ BlastSeqSrcGetInitError() ◆ BlastSeqSrcGetIsProt() ◆ BlastSeqSrcGetMaxSeqLen() ◆ BlastSeqSrcGetMinSeqLen() ◆ BlastSeqSrcGetName() ◆ BlastSeqSrcGetNumSeqs()

Get the number of sequences contained in the sequence source.

Parameters
seq_src the BLAST sequence source [in]

Definition at line 177 of file blast_seqsrc.c.

References ASSERT, BlastSeqSrc::DataStructure, BlastSeqSrc::GetNumSeqs, and NULL.

Referenced by BLAST_GapAlignSetUp(), BLAST_GetSubjectTotals(), BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), CBlastFormat::CBlastFormat(), CVDBBlastUtil::CVDBBlastUtil(), CVDBBlastUtil::FillVDBInfo(), CBlastPrelimSearch::Run(), CSeedTop::Run(), s_checkDbSeqSrcFunctions(), s_InitializeSubject(), s_NaHashLookupScanSubjectForWordCounts(), s_RPSPreliminarySearchEngine(), s_ScanSubjectForWordCounts(), CVDBSeqInfoSrc::Size(), and SplitQuery_SetEffectiveSearchSpace().

◆ BlastSeqSrcGetNumSeqsStats() ◆ BlastSeqSrcGetSeqLen() ◆ BlastSeqSrcGetSequence()

Retrieve an individual sequence.

Parameters
seq_src the BLAST sequence source [in] getseq_arg arguments to aid retrieval of sequence data from the BlastSeqSrc [in|out]
Returns
one of the BLAST_SEQSRC_* defined in blast_seqsrc.h

Definition at line 271 of file blast_seqsrc.c.

References ASSERT, BlastSeqSrc::DataStructure, and BlastSeqSrc::GetSequence.

Referenced by BLAST_ComputeTraceback_MT(), Blast_HSPListReevaluateUngapped(), BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), CSeedTop::Run(), s_checkDbSeqSrcFunctions(), s_ComputeNumIdentities(), s_MatchingSequenceInitialize(), s_NaHashLookupScanSubjectForWordCounts(), s_RPSComputeTraceback(), and s_ScanSubjectForWordCounts().

◆ BlastSeqSrcGetSupportsPartialFetching() ◆ BlastSeqSrcGetTotLen()

Get the total length of all sequences in the sequence source.

Parameters
seq_src the BLAST sequence source [in]

Definition at line 219 of file blast_seqsrc.c.

References ASSERT, BlastSeqSrc::DataStructure, BlastSeqSrc::GetTotLen, and NULL.

Referenced by BLAST_ComputeTraceback_MT(), BLAST_GapAlignSetUp(), BLAST_GetSubjectTotals(), BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), CBlastFormat::CBlastFormat(), CVDBBlastUtil::FillVDBInfo(), s_checkDbSeqSrcFunctions(), s_InitializeSubject(), s_RPSPreliminarySearchEngine(), and SplitQuery_SetEffectiveSearchSpace().

◆ BlastSeqSrcGetTotLenStats() ◆ BlastSeqSrcIteratorFree() ◆ BlastSeqSrcIteratorNew() ◆ BlastSeqSrcIteratorNewEx()

Allocate and initialize an iterator over a BlastSeqSrc.

Parameters
chunk_sz sets the chunk size of the iterator, if zero use kBlastSeqSrcDefaultChunkSize (above). [in]
Returns
pointer to initialized iterator for BlastSeqSrc

Definition at line 387 of file blast_seqsrc.c.

References calloc(), BlastSeqSrcIterator::chunk_sz, BlastSeqSrcIterator::current_pos, kBlastSeqSrcDefaultChunkSize, malloc(), NULL, BlastSeqSrcIterator::oid_list, sfree, and UINT4_MAX.

Referenced by BLAST_PreliminarySearchEngine(), BlastSeqSrcIteratorNew(), CVdbFastaExtractor::DumpAll(), NaHashLookupThreadDataNew(), CSeedTop::Run(), and s_ScanSubjectForWordCounts().

◆ BlastSeqSrcIteratorNext() ◆ BlastSeqSrcNew()

Allocates memory for a BlastSeqSrc structure and then invokes the constructor function defined in its first argument, passing the ctor_argument member of that same structure.

If the constructor function pointer is not set or there is a memory allocation failure, NULL is returned.

Note
This function need not be called directly by client code as all the implementations of the BlastSeqSrc interface provide a function(s) which call this function (MultiSeqBlastSeqSrcInit, SeqDbBlastSeqSrcInit)
Parameters
bssn_info Structure defining constructor and its argument to be invoked from this function [in]
Returns
a properly initialized BlastSeqSrc structure or NULL.

Definition at line 90 of file blast_seqsrc.c.

References calloc(), BlastSeqSrcNewInfo::constructor, BlastSeqSrcNewInfo::ctor_argument, BlastSeqSrc::NewFnPtr, NULL, and sfree.

Referenced by MockBlastSeqSrcInit(), MultiSeqBlastSeqSrcInit(), s_QueryFactoryBlastSeqSrcInit(), SeqDbBlastSeqSrcInit(), and SRABlastSeqSrcInit().

◆ BlastSeqSrcReleaseSequence()

Deallocate individual sequence.

Parameters
seq_src the BLAST sequence source [in] getseq_arg contains sequence to deallocate [in|out]

Definition at line 289 of file blast_seqsrc.c.

References ASSERT, BlastSeqSrc::DataStructure, and BlastSeqSrc::ReleaseSequence.

Referenced by BLAST_ComputeTraceback_MT(), Blast_HSPListReevaluateUngapped(), BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), CSeedTop::Run(), s_checkDbSeqSrcFunctions(), s_ComputeNumIdentities(), s_MatchingSequenceRelease(), s_NaHashLookupScanSubjectForWordCounts(), s_RPSComputeTraceback(), and s_ScanSubjectForWordCounts().

◆ BlastSeqSrcResetChunkIterator() void BlastSeqSrcResetChunkIterator ( BlastSeqSrcseq_src ) ◆ BlastSeqSrcSetNumberOfThreads() void BlastSeqSrcSetNumberOfThreads ( BlastSeqSrcseq_src, int  nthreads  ) ◆ BlastSeqSrcSetRangesArgAddRange() ◆ BlastSeqSrcSetRangesArgBuild() ◆ BlastSeqSrcSetRangesArgFree() ◆ BlastSeqSrcSetRangesArgNew() ◆ BlastSeqSrcSetSeqRanges() ◆ kBlastSeqSrcDefaultChunkSize const unsigned int kBlastSeqSrcDefaultChunkSize extern

How many database sequences to process in one database chunk.

this value is overriden in seqdb implementation, where the number of sequences is determined by the mmaped slice size

Definition at line 385 of file blast_seqsrc.c.

Referenced by BlastSeqSrcIteratorNewEx().


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4