NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions | Variables
blast_seqsrc.h File Reference

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

#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_def.h>
#include <algo/blast/core/blast_export.h>
#include <algo/blast/core/blast_message.h>
#include <algo/blast/core/blast_encoding.h>
+ Include dependency graph for blast_seqsrc.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  BlastSeqSrcSetRangesArg
 Structure used as the argument to function SetRanges. More...
 
struct  BlastSeqSrcGetSeqArg
 Structure used as the second argument to functions satisfying the GetSeqBlkFnPtr signature, associated with index-based implementations of the BlastSeqSrc interface. More...
 

Macros

#define BLAST_SEQSRC_MINGAP   1024
 Minimal gap allowed in range list. More...
 
#define BLAST_SEQSRC_OVERHANG   1024
 Extension for each new range added. More...
 
#define BLAST_SEQSRC_MINLENGTH   10
 Default minimal sequence length. More...
 
#define BLAST_SEQSRC_EXCLUDED   -3
 Sequence excluded due to filtering. More...
 
#define BLAST_SEQSRC_ERROR   -2
 Error while retrieving sequence. More...
 
#define BLAST_SEQSRC_EOF   -1
 No more sequences available. More...
 
#define BLAST_SEQSRC_SUCCESS   0
 Successful sequence retrieval. More...
 

Typedefs

typedef struct BlastSeqSrc BlastSeqSrc
 The BlastSeqSrc ADT is an opaque data type that defines an interface which is used by the core BLAST code to retrieve sequences. More...
 
typedef struct BlastSeqSrcIterator BlastSeqSrcIterator
 Blast Sequence Source Iterator, designed to be used in conjunction with the BlastSeqSrc to provide MT-safe iteration over the sequences in the BlastSeqSrc. More...
 
typedef struct BlastSeqSrcNewInfo BlastSeqSrcNewInfo
 Structure that contains the information needed for BlastSeqSrcNew to fully populate the BlastSeqSrc structure it returns. More...
 
typedef struct BlastSeqSrcSetRangesArg BlastSeqSrcSetRangesArg
 Structure used as the argument to function SetRanges. More...
 
typedef struct BlastSeqSrcGetSeqArg BlastSeqSrcGetSeqArg
 Structure used as the second argument to functions satisfying the GetSeqBlkFnPtr signature, associated with index-based implementations of the BlastSeqSrc interface. More...
 

Functions

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...
 

Variables

const unsigned int kBlastSeqSrcDefaultChunkSize
 How many database sequences to process in one database chunk. More...
 

Detailed Description

Declaration of ADT to retrieve sequences for the BLAST engine.

Definition in file blast_seqsrc.h.

Macro Definition Documentation

◆ BLAST_SEQSRC_EOF

#define BLAST_SEQSRC_EOF   -1

No more sequences available.

Definition at line 292 of file blast_seqsrc.h.

◆ BLAST_SEQSRC_ERROR

#define BLAST_SEQSRC_ERROR   -2

Error while retrieving sequence.

Definition at line 291 of file blast_seqsrc.h.

◆ BLAST_SEQSRC_EXCLUDED

#define BLAST_SEQSRC_EXCLUDED   -3

Sequence excluded due to filtering.

Definition at line 290 of file blast_seqsrc.h.

◆ BLAST_SEQSRC_MINGAP

#define BLAST_SEQSRC_MINGAP   1024

Minimal gap allowed in range list.

Definition at line 203 of file blast_seqsrc.h.

◆ BLAST_SEQSRC_MINLENGTH

#define BLAST_SEQSRC_MINLENGTH   10

Default minimal sequence length.

Definition at line 205 of file blast_seqsrc.h.

◆ BLAST_SEQSRC_OVERHANG

#define BLAST_SEQSRC_OVERHANG   1024

Extension for each new range added.

Definition at line 204 of file blast_seqsrc.h.

◆ BLAST_SEQSRC_SUCCESS

#define BLAST_SEQSRC_SUCCESS   0

Successful sequence retrieval.

Definition at line 293 of file blast_seqsrc.h.

Typedef Documentation

◆ BlastSeqSrc

typedef struct BlastSeqSrc 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:

  • Retrieving number of sequences in a set
  • Retrieving the total length (in bases/residues) of sequences in a set.
  • Retrieving the length of the longest sequence in a set
  • Retrieving an individual sequence in a user-specified encoding by ordinal id (index into a set)
  • Retrieving the length of a given sequence in a set by ordinal id
  • Allow MT-safe iteration over sequences in a set through the BlastSeqSrcIterator abstraction, as well as resetting of any applicable implementation internal 'bookmarks' which keep track of the iteration progress, as to allow multiple passes over the set of sequences (
    See also
    BlastSeqSrcResetChunkIterator). Currently available client implementations of the BlastSeqSrc API include:
  • ReaddbBlastSeqSrcInit (C toolkit)
  • SeqDbBlastSeqSrcInit (C++ toolkit)
  • MultiSeqBlastSeqSrcInit (C/C++ toolkit)

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

Blast Sequence Source Iterator, designed to be used in conjunction with the BlastSeqSrc to provide MT-safe iteration over the sequences in the BlastSeqSrc.

Definition at line 1 of file blast_seqsrc.h.

◆ 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.

Function Documentation

◆ BlastSeqSrcCopy()

BlastSeqSrc* BlastSeqSrcCopy ( const BlastSeqSrc seq_src)

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
seq_srcBlastSeqSrc to copy [in]
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()

BlastSeqSrc* BlastSeqSrcFree ( 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).

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
seq_srcBlastSeqSrc to free [in]
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()

Int4 BlastSeqSrcGetAvgSeqLen ( const BlastSeqSrc seq_src)

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

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 211 of file blast_seqsrc.c.

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

Referenced by BLAST_PreliminarySearchEngine(), BOOST_AUTO_TEST_CASE(), and s_checkDbSeqSrcFunctions().

◆ BlastSeqSrcGetInitError()

char* BlastSeqSrcGetInitError ( const BlastSeqSrc seq_src)

Function to retrieve NULL terminated string containing the description of an initialization error or NULL.

This function MUST ALWAYS be called after calling one of the client implementation's Init functions. If the return value is not NULL, invoking any other functionality from the BlastSeqSrc will result in undefined behavior. Caller is responsible for deallocating the return value.

Parameters
seq_srcBlastSeqSrc from which to get an error [in]
Returns
error message or NULL

Definition at line 159 of file blast_seqsrc.c.

References BlastSeqSrc::InitErrorStr, NULL, and strdup.

Referenced by BOOST_AUTO_TEST_CASE(), TestUtil::CheckForBlastSeqSrcErrors(), CSetupFactory::CreateBlastSeqSrc(), s_CheckForBlastSeqSrcErrors(), and CVDBBlastUtil::x_MakeVDBSeqSrc().

◆ BlastSeqSrcGetIsProt()

Boolean BlastSeqSrcGetIsProt ( const BlastSeqSrc seq_src)

Find if the Blast Sequence Source contains protein or nucleotide sequences.

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 243 of file blast_seqsrc.c.

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

Referenced by BOOST_AUTO_TEST_CASE(), CLocalDbAdapter::IsProtein(), s_checkDbSeqSrcFunctions(), and s_InitSeqInfoSrc().

◆ BlastSeqSrcGetMaxSeqLen()

Int4 BlastSeqSrcGetMaxSeqLen ( const BlastSeqSrc seq_src)

Get the length of the longest sequence in the sequence source.

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 193 of file blast_seqsrc.c.

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

Referenced by BLAST_GapAlignSetUp(), Blast_RedoAlignmentCore_MT(), BOOST_AUTO_TEST_CASE(), and s_checkDbSeqSrcFunctions().

◆ BlastSeqSrcGetMinSeqLen()

Int4 BlastSeqSrcGetMinSeqLen ( const BlastSeqSrc seq_src)

Get the length of the longest sequence in the sequence source.

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 201 of file blast_seqsrc.c.

References ASSERT, BLAST_SEQSRC_MINLENGTH, BlastSeqSrc::DataStructure, BlastSeqSrc::GetMinSeqLen, and NULL.

Referenced by BLAST_GapAlignSetUp().

◆ BlastSeqSrcGetName()

const char* BlastSeqSrcGetName ( const BlastSeqSrc seq_src)

Get the Blast Sequence source name (e.g.

: BLAST database name). Here the full name (path and file name) should be returned. If an alias file is present the return value should be the full name of the alias file.

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 235 of file blast_seqsrc.c.

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

Referenced by BlastSetupPreliminarySearchEx(), BOOST_AUTO_TEST_CASE(), CBlastTracebackSearch::CBlastTracebackSearch(), CVDBBlastUtil::FillVDBInfo(), s_checkDbSeqSrcFunctions(), and s_InitSeqInfoSrc().

◆ BlastSeqSrcGetNumSeqs()

Int4 BlastSeqSrcGetNumSeqs ( const BlastSeqSrc seq_src)

◆ BlastSeqSrcGetNumSeqsStats()

Int4 BlastSeqSrcGetNumSeqsStats ( const BlastSeqSrc seq_src)

Get the number of sequences used for calculation of expect values etc.

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 185 of file blast_seqsrc.c.

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

Referenced by BLAST_GapAlignSetUp(), BLAST_GetSubjectTotals(), and SplitQuery_SetEffectiveSearchSpace().

◆ BlastSeqSrcGetSeqLen()

Int4 BlastSeqSrcGetSeqLen ( const BlastSeqSrc seq_src,
void *  oid 
)

Retrieve sequence length (number of residues/bases)

Parameters
seq_srcthe BLAST sequence source [in]
oidordinal id of the sequence desired (should be Uint4) [in]

Definition at line 281 of file blast_seqsrc.c.

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

Referenced by BLAST_GapAlignSetUp(), BLAST_GetSubjectTotals(), BLAST_SetupPartialFetching(), BOOST_AUTO_TEST_CASE(), CVDBSeqInfoSrc::GetLength(), s_checkDbSeqSrcFunctions(), and s_MatchingSequenceInitialize().

◆ BlastSeqSrcGetSequence()

Int2 BlastSeqSrcGetSequence ( const BlastSeqSrc seq_src,
BlastSeqSrcGetSeqArg getseq_arg 
)

Retrieve an individual sequence.

Parameters
seq_srcthe BLAST sequence source [in]
getseq_argarguments 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()

Boolean BlastSeqSrcGetSupportsPartialFetching ( const BlastSeqSrc seq_src)

Find if the Blast Sequence Source supports partial fetching.

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 251 of file blast_seqsrc.c.

References ASSERT, BlastSeqSrc::DataStructure, FALSE, BlastSeqSrc::GetSupportsPartialFetching, and NULL.

Referenced by BLAST_ComputeTraceback_MT(), Blast_RedoAlignmentCore_MT(), and BLAST_SetupPartialFetching().

◆ BlastSeqSrcGetTotLen()

Int8 BlastSeqSrcGetTotLen ( const BlastSeqSrc seq_src)

◆ BlastSeqSrcGetTotLenStats()

Int8 BlastSeqSrcGetTotLenStats ( const BlastSeqSrc seq_src)

Get the total length of all sequences for calculation of expect value etc.

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 227 of file blast_seqsrc.c.

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

Referenced by BLAST_GapAlignSetUp(), BLAST_GetSubjectTotals(), and SplitQuery_SetEffectiveSearchSpace().

◆ BlastSeqSrcIteratorFree()

BlastSeqSrcIterator* BlastSeqSrcIteratorFree ( BlastSeqSrcIterator itr)

◆ BlastSeqSrcIteratorNew()

BlastSeqSrcIterator* BlastSeqSrcIteratorNew ( void  )

Allocate and initialize an iterator over a BlastSeqSrc with a default chunk size for MT-safe iteration.

Returns
pointer to initialized iterator for BlastSeqSrc

Definition at line 380 of file blast_seqsrc.c.

References BlastSeqSrcIteratorNewEx().

Referenced by BOOST_AUTO_TEST_CASE(), PrintSAMHeader(), and s_checkDbSeqSrcFunctions().

◆ BlastSeqSrcIteratorNewEx()

BlastSeqSrcIterator* BlastSeqSrcIteratorNewEx ( unsigned int  chunk_sz)

Allocate and initialize an iterator over a BlastSeqSrc.

Parameters
chunk_szsets 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()

Int4 BlastSeqSrcIteratorNext ( const BlastSeqSrc seq_src,
BlastSeqSrcIterator itr 
)

◆ BlastSeqSrcNew()

BlastSeqSrc* BlastSeqSrcNew ( 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.

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_infoStructure 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()

void BlastSeqSrcReleaseSequence ( const BlastSeqSrc seq_src,
BlastSeqSrcGetSeqArg getseq_arg 
)

◆ BlastSeqSrcResetChunkIterator()

void BlastSeqSrcResetChunkIterator ( BlastSeqSrc seq_src)

Reset the internal "bookmark" of the last chunk for iteration provided by this object.

Parameters
seq_srcthe BLAST sequence source [in]

Definition at line 436 of file blast_seqsrc.c.

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

Referenced by PrintSAMHeader(), CLocalDbAdapter::ResetBlastSeqSrcIteration(), CBlastPrelimSearch::Run(), s_NaHashLookupScanSubjectForWordCounts(), s_ScanSubjectForWordCounts(), and SplitQuery_CreateChunkData().

◆ BlastSeqSrcSetNumberOfThreads()

void BlastSeqSrcSetNumberOfThreads ( BlastSeqSrc seq_src,
int  nthreads 
)

Set the number of threads for MT mode.

Parameters
nthreadsthe number of threads [in]

Definition at line 168 of file blast_seqsrc.c.

References BlastSeqSrc::DataStructure, and BlastSeqSrc::SetNumberOfThreads.

Referenced by CBlastPrelimSearch::x_LaunchMultiThreadedSearch().

◆ BlastSeqSrcSetRangesArgAddRange()

Int2 BlastSeqSrcSetRangesArgAddRange ( BlastSeqSrcSetRangesArg arg,
Int4  begin,
Int4  end,
Int4  len 
)

add new range

Returns
0 in case of success, otherwise 1

Definition at line 467 of file blast_seqsrc.c.

References ASSERT, BLAST_SEQSRC_OVERHANG, BlastSeqSrcSetRangesArg::capacity, len, MAX, MIN, BlastSeqSrcSetRangesArg::num_ranges, and BlastSeqSrcSetRangesArg::ranges.

Referenced by BLAST_SetupPartialFetching().

◆ BlastSeqSrcSetRangesArgBuild()

void BlastSeqSrcSetRangesArgBuild ( BlastSeqSrcSetRangesArg arg)

◆ BlastSeqSrcSetRangesArgFree()

BlastSeqSrcSetRangesArg* BlastSeqSrcSetRangesArgFree ( BlastSeqSrcSetRangesArg arg)

◆ BlastSeqSrcSetRangesArgNew()

BlastSeqSrcSetRangesArg* BlastSeqSrcSetRangesArgNew ( Int4  num_ranges)

◆ BlastSeqSrcSetSeqRanges()

void BlastSeqSrcSetSeqRanges ( const BlastSeqSrc seq_src,
BlastSeqSrcSetRangesArg setranges_arg 
)

Setting the ranges for partial fetching.

Definition at line 261 of file blast_seqsrc.c.

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

Variable Documentation

◆ 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().

Modified on Mon Jun 17 05:09:17 2024 by modify_doxy.py rev. 669887