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/prelim__stage_8cpp_source.html below:

NCBI C++ ToolKit: src/algo/blast/api/prelim_stage.cpp Source File

65

: m_QueryFactory(query_factory), m_InternalData(new

SInternalData

),

66

m_Options(options), m_DbAdapter(

NULL

), m_DbInfo(&dbinfo)

72

m_InternalData->m_SeqSrc = wrapped_src;

79

: m_QueryFactory(query_factory), m_InternalData(new

SInternalData

),

80

m_Options(options), m_DbAdapter(db), m_DbInfo(

NULL

)

86  if

(num_threads > 1) {

95

: m_QueryFactory(query_factory), m_InternalData(new

SInternalData

),

96

m_Options(options), m_DbAdapter(

NULL

), m_DbInfo(

NULL

)

98  x_Init

(query_factory, options, pssm, seqsrc);

117

unique_ptr<const CBlastOptionsMemento> opts_memento

136  copy

(setup_data->m_Masks.begin(), setup_data->m_Masks.end(),

144  typedef

vector< CRef<CPrelimSearchThread> > TBlastThreads;

147

unique_ptr<const CBlastOptionsMemento> opts_memento

159

opts_memento.get()));

160  if

(thread->Empty()) {

162  "Failed to create preliminary search thread"

);

180

(*thread)->Join(&

result

);

210  "Filtering resulted in an empty database."

;

224

unique_ptr<const CBlastOptionsMemento> opts_memento

241  _TRACE

(

"Query chunk "

<<

i

<<

"/"

<<

254

chunk_queries, lut_options, word_options );

282  const string

err_msg1(

"search cannot proceed due to errors " 283  "in all contexts/frames of query " 334

vector<bool> *rm_hsps_info)

const 336  bool

any_query_hsp_limited =

false

;

337

unique_ptr<const CBlastOptionsMemento> opts_memento

344

opts_memento->m_ExtnOpts,

345

opts_memento->m_ScoringOpts,

356

(*rm_hsps_info)[ query_index ] = removed_hsps[query_index] ==

FALSE

?

false

:

true

;

357  if

( (*rm_hsps_info)[ query_index ] ) any_query_hsp_limited =

true

;

360  delete

[] removed_hsps;

361  if

( rm_hsps ) *rm_hsps = any_query_hsp_limited ;

379  for

(

i

=0;

i

< hsp_list->

hspcnt

;

i

++)

382  if

(gapped_calculation)

406  _TRACE

(

"HSP Stream is empty"

);

417  _TRACE

(

"This method does not support CBlastPrelimSearch constructed with BlastSeqSrc"

);

422  if

(

NULL

== hsp_stream)

424  _TRACE

(

"NULL HSP Stream Pointer"

);

437  int

num_queries =

results

->num_queries;

441  l

.resize(num_queries);

444  for

(

int i

=0;

i

< num_queries;

i

++)

449  if

(

NULL

!= hit_list)

Auxiliary functions for BLAST.

Declarations for indexed blast databases.

BlastDiagnostics * Blast_DiagnosticsFree(BlastDiagnostics *diagnostics)

Free the BlastDiagnostics structure and all substructures.

Structures and API used for saving BLAST hits.

BlastHSPResults * Blast_HSPResultsFromHSPStreamWithLimitEx(struct BlastHSPStream *hsp_stream, Uint4 num_queries, SBlastHitsParameters *hit_param, Uint4 max_num_hsps, Boolean *removed_hsps)

As Blast_HSPResultsFromHSPStreamWithLimit, except accept and return array of Boolen flags specifying ...

BlastHSPResults * Blast_HSPResultsFree(BlastHSPResults *results)

Deallocate memory for BLAST results.

Int2 Blast_HSPResultsSortByEvalue(BlastHSPResults *results)

Sort each hit list in the BLAST results by best e-value.

Int2 SBlastHitsParametersNew(const BlastHitSavingOptions *hit_options, const BlastExtensionOptions *ext_options, const BlastScoringOptions *scoring_options, SBlastHitsParameters **retval)

Sets up small structures used by blast_hit.c for saving HSPs.

Int2 Blast_HSPListGetBitScores(BlastHSPList *hsp_list, Boolean gapped_calculation, const BlastScoreBlk *sbp)

Calculate bit scores from raw scores in an HSP list.

int BlastHSPStreamRegisterMTLock(BlastHSPStream *hsp_stream, MT_LOCK lock)

Attach a mutex lock to a stream to protect multiple access during writing.

int BlastHSPStreamMerge(SSplitQueryBlk *squery_blk, Uint4 chunk_num, BlastHSPStream *hsp_stream, BlastHSPStream *combined_hsp_stream)

Moves the HSPlists from an HSPStream into the list contained by a second HSPStream.

const char * kBlastErrMsg_CantCalculateUngappedKAParams

const int kBlastMessageNoContext

Declared in blast_message.h as extern const.

#define BLASTERR_DB_MEMORY_MAP

Database file error.

#define BLASTERR_DB_TOO_MANY_OPEN_FILES

C++ version of the initialization for the mutex locking interface.

EBlastProgramType

Defines the engine's notion of the different applications of the BLAST algorithm.

Utility function to convert internal BLAST result structures into objects::CSeq_align_set objects.

Int4 BlastSeqSrcGetNumSeqs(const BlastSeqSrc *seq_src)

Get the number of sequences contained in the sequence source.

BlastSeqSrc * BlastSeqSrcFree(BlastSeqSrc *seq_src)

Frees the BlastSeqSrc structure by invoking the destructor function set by the user-defined construct...

void BlastSeqSrcSetNumberOfThreads(BlastSeqSrc *seq_src, int nthreads)

Set the number of threads for MT mode.

void BlastSeqSrcResetChunkIterator(BlastSeqSrc *seq_src)

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

Definitions and prototypes used by blast_stat.c to calculate BLAST statistics.

int BlastScoreBlkCheck(BlastScoreBlk *sbp)

Check that score blk is valid, returns zero if it is.

Defines BLAST error codes (user errors included)

Encapsulates ALL the BLAST algorithm's options.

Search class to perform the preliminary stage of the BLAST search.

Wrapper class for BlastScoreBlk .

Defines system exceptions occurred while running BLAST.

Memento class to save, replace out, and restore the effective search space options of the CBlastOptio...

Interface to create a BlastSeqSrc suitable for use in CORE BLAST from a a variety of BLAST database/s...

Functor to run the preliminary stage of the BLAST search.

Thread class to run the preliminary stage of the BLAST search.

Abstract base class to encapsulate retrieval of sequence identifiers.

Source of query sequence data for BLAST Provides an interface for search classes to retrieve sequence...

virtual CConstRef< objects::CSeq_loc > GetSeq_loc(size_t index)=0

Get the Seq_loc for the sequence indicated by index.

CStructWrapper< BlastDiagnostics > TBlastDiagnostics

CRef< CBlastOptions > m_Options

int CheckInternalData()

Checks that internal data is valid.

size_t GetNumberOfThreads(void) const

Accessor for the number of threads to use.

void SplitQuery_SetEffectiveSearchSpace(CRef< CBlastOptions > options, CRef< IQueryFactory > full_query_fact, CRef< SInternalData > full_data)

this might supercede the function below...

void BLASTPrelminSearchHitListToStdSeg(EBlastProgramType program, BlastHitList *hit_list, const CSeq_loc &query_loc, TSeqPos query_length, const IBlastSeqInfoSrc *subject_seqinfo, list< CRef< CStd_seg > > &seg_list)

virtual void SetNumberOfThreads(size_t nthreads)

Mutator for the number of threads.

CRef< SBlastSetupData > BlastSetupPreliminarySearchEx(CRef< IQueryFactory > qf, CRef< CBlastOptions > options, CConstRef< CPssmWithParameters > pssm, BlastSeqSrc *seqsrc, size_t num_threads)

Extended interface to set up internal data structures used by the BLAST CORE engine.

static BlastDiagnostics * CreateDiagnosticsStructure()

Create and initialize the BlastDiagnostics structure for single-threaded applications.

SSplitQueryBlk * GetCStruct() const

Returns the C structure managed by objects of this class.

void s_FixNumIdent(BlastHSPList *hsp_list, bool gapped_calculation)

string BlastErrorCode2String(Int2 error_code)

Returns a string containing a human-readable interpretation of the error_code passed as this function...

CRef< CLocalDbAdapter > m_DbAdapter

bool IsQuerySplit() const

Determines whether the query sequence(s) are split or not.

const CBlastOptionsMemento * CreateSnapshot() const

Create a snapshot of the state of this object for internal use of its data structures (BLAST C++ APIs...

CRef< SInternalData > Run()

Borrow the internal data and results results.

CRef< TBlastSeqSrc > m_SeqSrc

The source of subject sequence data.

void AddMessageAllQueries(EBlastSeverity severity, int error_id, const string &message)

Add a message for all queries.

bool IsMultiThreaded(void) const

Returns true if more than 1 thread is specified.

TSeqLocInfoVector m_MasksForAllQueries

Query masking information.

virtual BLAST_SequenceBlk * GetSequenceBlk()=0

Accessor for the BLAST_SequenceBlk structure.

BlastSeqSrc * MakeSeqSrc()

Retrieves or constructs the BlastSeqSrc.

CRef< ILocalQueryData > MakeLocalQueryData(const CBlastOptions *opts)

Creates and caches an ILocalQueryData.

int x_LaunchMultiThreadedSearch(SInternalData &internal_data)

Runs the preliminary search in multi-threaded mode.

CRef< SInternalData > SplitQuery_CreateChunkData(CRef< IQueryFactory > qf, CRef< CBlastOptions > options, CRef< SInternalData > full_data, size_t num_threads)

Function used by search class to retrieve a query factory for a given chunk.

TSearchMessages m_Messages

Warnings and error messages.

void s_GetBitScores(BlastHitList *hit_list, bool gapped_calculation, const BlastScoreBlk *sbp)

static BlastDiagnostics * CreateDiagnosticsStructureMT()

Create and initialize the BlastDiagnostics structure for multi-threaded applications.

virtual void SetNumberOfThreads(size_t nthreads)

@inheritDoc

CRef< SInternalData > m_InternalData

static BlastScoreBlk * CreateScoreBlock(const CBlastOptionsMemento *opts_memento, CRef< ILocalQueryData > query_data, BlastSeqLoc **lookup_segments, TSearchMessages &search_messages, TSeqLocInfoVector *masked_query_regions=NULL, const CBlastRPSInfo *rps_info=NULL)

Initializes the BlastScoreBlk.

static BlastSeqSrc * CreateBlastSeqSrc(const CSearchDatabase &db)

Create a BlastSeqSrc from a CSearchDatabase (uses CSeqDB)

CStructWrapper< BlastSeqSrc > TBlastSeqSrc

CRef< TBlastScoreBlk > m_ScoreBlk

BLAST score block structure.

BLAST_SequenceBlk * m_Queries

The query sequence data, these fields are "borrowed" from the query factory (which owns them)

IBlastSeqInfoSrc * MakeSeqInfoSrc()

Retrieves or constructs the IBlastSeqInfoSrc.

BlastQueryInfo * m_QueryInfo

The query information structure.

DbIndexSetUsingThreadsFnType GetDbIndexSetUsingThreadsFn()

Return the appropriate callback to set the concurrency state in the index structure.

CRef< IQueryFactory > GetQueryFactoryForChunk(Uint4 chunk_num)

Returns a IQueryFactory suitable to be executed by a BLAST search class.

void FlushSequenceData()

Frees the cached sequence data structure (as this is usually the larger data structure).

DbIndexRunSearchFnType GetDbIndexRunSearchFn()

Return the appropriate callback to run indexed seed search.

DbIndexSetNumThreadsFnType GetDbIndexSetNumThreadsFn()

Return the appropriate callback to set the number of threads in the index structure.

CRef< IQueryFactory > m_QueryFactory

Query factory is retained to ensure the lifetime of the data (queries) produced by it.

bool x_BuildStdSegList(vector< list< CRef< CStd_seg > > > &list)

CRef< CSplitQueryBlk > Split()

Split the query sequence(s)

CBlastPrelimSearch(CRef< IQueryFactory > query_factory, CRef< CBlastOptions > options, const CSearchDatabase &dbinfo)

Constructor which creates and manages a BLAST database handle for the caller.

const CSearchDatabase * m_DbInfo

CRef< TBlastDiagnostics > m_Diagnostics

Diagnostic output from preliminary and traceback stages.

virtual size_t GetSeqLength(size_t index)=0

Get the length of the sequence indicated by index.

void x_Init(CRef< IQueryFactory > query_factory, CRef< CBlastOptions > options, CConstRef< objects::CPssmWithParameters > pssm, BlastSeqSrc *seqsrc, size_t num_threads=1)

Internal initialization function Initializes internal data structures except the BlastSeqSrc.

Uint4 GetNumberOfChunks() const

Returns the number of chunks the query/queries will be split into.

MT_LOCK Blast_CMT_LOCKInit(void)

Initialize a mutex locking mechanism for BLAST.

CRef< TBlastHSPStream > m_HspStream

HSP output of the preliminary stage goes here.

BlastHSPResults * ComputeBlastHSPResults(BlastHSPStream *stream, Uint4 max_num_hsps=0, bool *rm_hsps=NULL, vector< bool > *rm_hsps_info=NULL) const

Return HSPs in a structure other than the HSPStream? Provide conversion? How to combine this with CBl...

bool GetGappedMode() const

Returns true if gapped BLAST is set, false otherwise.

unsigned int TSeqPos

Type for sequence locations and lengths.

#define NON_CONST_ITERATE(Type, Var, Cont)

Non constant version of ITERATE macro.

#define NCBI_THROW(exception_class, err_code, message)

Generic macro to throw an exception, given the exception class, error code and message string.

const string & GetMsg(void) const

Get message string.

TObjectType * GetPointer(void) THROWS_NONE

Get pointer,.

void Reset(void)

Reset reference object.

bool Empty(void) const THROWS_NONE

Check if CRef is empty – not pointing to any object, which means having a null value.

int16_t Int2

2-byte (16-bit) signed integer

uint32_t Uint4

4-byte (32-bit) unsigned integer

uint64_t Uint8

8-byte (64-bit) unsigned integer

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define USING_SCOPE(ns)

Use the specified namespace.

#define END_SCOPE(ns)

End the previously defined scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

#define BEGIN_SCOPE(ns)

Define a new scope.

Uint1 Boolean

bool replacment for C

#define FALSE

bool replacment for C indicating false.

void copy(Njn::Matrix< S > *matrix_, const Njn::Matrix< T > &matrix0_)

Defines internal auxiliary functor object to run the preliminary stage of the BLAST search.

NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...

Declarations of auxiliary functions/classes for PSI-BLAST.

static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)

Auxiliary functions and classes to assist in query splitting.

Structure to hold a sequence.

Return statistics from the BLAST search.

The structure to hold all HSPs for a given sequence after the gapped alignment.

Int4 hspcnt

Number of HSPs saved.

BlastHSP ** hsp_array

Array of pointers to individual HSPs.

The structure to contain all BLAST results, for multiple queries.

Default implementation of BlastHSPStream.

EBlastProgramType program

BLAST program type.

Structure holding all information about an HSP.

Int4 num_ident

Number of identical base pairs in this HSP.

The structure to contain all BLAST results for one query sequence.

BlastHSPList ** hsplist_array

Array of HSP lists for individual database hits.

Int4 hsplist_count

Filled size of the HSP lists array.

Options needed for initial word finding and processing.

int num_queries

Number of query sequences.

Structure used for scoring calculations.

Complete type definition of Blast Sequence Source ADT.

Options needed to construct a lookup table Also needed: query sequence and query length.

Keeps prelim_hitlist_size and HitSavingOptions together, mostly for use by hspstream.

Return type of BlastSetupPreliminarySearch.

Lightweight wrapper to enclose C structures needed for running the preliminary and traceback stages o...

Uniform BLAST Search Interface.


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