: m_QueryFactory (qf),
70m_SeqInfoSrc (seqinfosrc),
75m_InternalData->m_SeqSrc.Reset(
new TBlastSeqSrc(seqsrc, 0));
76m_InternalData->m_FnInterrupt =
NULL;
85: m_QueryFactory (qf),
87m_InternalData (internal_data),
88m_OptsMemento (opts->CreateSnapshot()),
89m_Messages (search_msgs),
90m_SeqInfoSrc (seqinfosrc),
150 const boolkIsPhiBlast =
159kIsPhiBlast ? &lookup_segments : 0,
226unique_ptr<CAutoEnvironmentVariable> omp_env;
266vector<TSeqLocInfoVector> subj_masks;
277vector< CConstRef<CSeq_id> > query_ids;
278query_ids.reserve(aligns.size());
329unique_ptr<CAutoEnvironmentVariable> omp_env;
Auxiliary functions for BLAST.
BlastDiagnostics * Blast_DiagnosticsFree(BlastDiagnostics *diagnostics)
Free the BlastDiagnostics structure and all substructures.
Structures and API used for saving BLAST hits.
BlastHSPResults * Blast_HSPResultsFree(BlastHSPResults *results)
Deallocate memory for BLAST results.
SBlastHitsParameters * SBlastHitsParametersFree(SBlastHitsParameters *param)
Deallocated SBlastHitsParameters.
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.
Classes that capture the state of the BLAST options (or subsets of options) and restore them later (u...
Boolean Blast_ProgramIsPhiBlast(EBlastProgramType p)
Returns true if program is PHI-BLAST (i.e.
Boolean Blast_ProgramIsRpsBlast(EBlastProgramType p)
Returns true if program is RPS-BLAST (i.e.
Utility function to convert internal BLAST result structures into objects::CSeq_align_set objects.
const char * BlastSeqSrcGetName(const BlastSeqSrc *seq_src)
Get the Blast Sequence source name (e.g.
Utilities initialize/setup BLAST.
BlastScoreBlk * BlastScoreBlkFree(BlastScoreBlk *sbp)
Deallocates BlastScoreBlk as well as all associated structures.
Functions to do gapped alignment with traceback.
Int2 Blast_RunTracebackSearchWithInterrupt(EBlastProgramType program, BLAST_SequenceBlk *query, BlastQueryInfo *query_info, const BlastSeqSrc *seq_src, const BlastScoringOptions *score_options, const BlastExtensionOptions *ext_options, const BlastHitSavingOptions *hit_options, const BlastEffectiveLengthsOptions *eff_len_options, const BlastDatabaseOptions *db_options, const PSIBlastOptions *psi_options, BlastScoreBlk *sbp, BlastHSPStream *hsp_stream, const BlastRPSInfo *rps_info, SPHIPatternSearchBlk *pattern_blk, BlastHSPResults **results, TInterruptFnPtr interrupt_search, SBlastProgress *progress_info, size_t num_threads)
Entry point from the API level to perform the traceback stage of a BLAST search, given the source of ...
vector< CRef< objects::CSeq_align_set > > TSeqAlignVector
Vector of Seq-align-sets.
EResultType
Specifies the style of Seq-aligns that should be built from the internal BLAST data structures.
@ eDatabaseSearch
Seq-aligns in the style of a database search.
CAutoEnvironmentVariable â.
Defines BLAST error codes (user errors included)
Encapsulates ALL the BLAST algorithm's options.
Wrapper for BlastSeqLoc structure.
Wrapper class for SBlastProgress .
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...
typedef for the messages for an entire BLAST search, which could be comprised of multiple query seque...
void GetMessages(TSearchMessages &messages) const
Retrieve all error/warning messages.
virtual CConstRef< objects::CSeq_loc > GetSeq_loc(size_t index)=0
Get the Seq_loc for the sequence indicated by index.
CStructWrapper< BlastDiagnostics > TBlastDiagnostics
void PsiBlastSetupScoreBlock(BlastScoreBlk *score_blk, CConstRef< objects::CPssmWithParameters > pssm, TSearchMessages &messages, CConstRef< CBlastOptions > options)
Setup CORE BLAST score block structure with data from the scoremat PSSM.
CBlastTracebackSearch(CRef< IQueryFactory > qf, CRef< CBlastOptions > opts, BlastSeqSrc *seqsrc, CRef< IBlastSeqInfoSrc > seqinfosrc, CRef< TBlastHSPStream > hsps, CConstRef< objects::CPssmWithParameters > pssm=null)
Create a BlastSeqSrc re-using an already created BlastSeqSrc.
static BlastDiagnostics * CreateDiagnosticsStructure()
Create and initialize the BlastDiagnostics structure for single-threaded applications.
CRef< IQueryFactory > m_QueryFactory
The query to search for.
CStructWrapper< LookupTableWrap > TLookupTableWrap
const CBlastOptionsMemento * CreateSnapshot() const
Create a snapshot of the state of this object for internal use of its data structures (BLAST C++ APIs...
static CRef< CBlastRPSInfo > CreateRpsStructures(const string &rps_dbname, CRef< CBlastOptions > options)
Initializes RPS-BLAST data structures.
CStructWrapper< BlastScoreBlk > TBlastScoreBlk
CRef< TBlastSeqSrc > m_SeqSrc
The source of subject sequence data.
CRef< SDatabaseScanData > m_DBscanInfo
Tracks information from database scanning phase.
CStructWrapper< TData > * WrapStruct(TData *obj, TData *(*del)(TData *))
Auxiliary function to create a CStructWrapper for a pointer to an object.
void SetDBScanInfo(CRef< SDatabaseScanData > dbscan_info)
Sets the m_DBscanInfo field.
CRef< CSearchResultSet > Run()
Run the traceback search.
virtual BLAST_SequenceBlk * GetSequenceBlk()=0
Accessor for the BLAST_SequenceBlk structure.
CRef< ILocalQueryData > MakeLocalQueryData(const CBlastOptions *opts)
Creates and caches an ILocalQueryData.
CRef< TLookupTableWrap > m_LookupTable
Lookup table, usually only needed in the preliminary stage of the search, but for PHI-BLAST it's also...
BlastEffectiveLengthsOptions * m_EffLenOpts
void SetResultType(EResultType type)
Specifies how the Seq-align-set returned as part of the results is formatted.
BlastHSPResults * RunSimple()
Runs the traceback but only returns the HSP's and not the Seq-Align.
static LookupTableWrap * CreateLookupTable(CRef< ILocalQueryData > query_data, const CBlastOptionsMemento *opts_memento, BlastScoreBlk *score_blk, CRef< CBlastSeqLocWrap > lookup_segments, const CBlastRPSInfo *rps_info=NULL, BlastSeqSrc *seqsrc=NULL, size_t num_threads=1)
Initialize the lookup table.
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.
SBlastProgress * Get() const
EBlastProgramType GetProgramType() const
Returns the CORE BLAST notion of program type.
CStructWrapper< BlastSeqSrc > TBlastSeqSrc
CRef< CBlastRPSInfo > m_RpsData
The RPS-BLAST related data.
BlastExtensionOptions * m_ExtnOpts
bool Validate() const
Validate the options.
CRef< TBlastScoreBlk > m_ScoreBlk
BLAST score block structure.
size_t m_NumThreads
Keep track of how many threads should be used.
TInterruptFnPtr m_FnInterrupt
The interrupt callback.
virtual BlastQueryInfo * GetQueryInfo()=0
Accessor for the BlastQueryInfo structure.
bool GetOutOfFrameMode() const
CRef< CSBlastProgress > m_ProgressMonitor
The user data structure to aid in progress monitoring.
BLAST_SequenceBlk * m_Queries
The query sequence data, these fields are "borrowed" from the query factory (which owns them)
TSearchMessages m_Messages
Warnings and Errors.
BlastHitSavingOptions * m_HitSaveOpts
BlastQueryInfo * m_QueryInfo
The query information structure.
EResultType m_ResultType
Determines if BLAST database search or BLAST 2 sequences style of results should be produced.
CRef< IBlastSeqInfoSrc > m_SeqInfoSrc
Pointer to the IBlastSeqInfoSrc object to use to generate the Seq-aligns.
virtual size_t GetNumQueries()=0
Get the number of queries.
void x_Init(CRef< IQueryFactory > qf, CRef< CBlastOptions > opts, CConstRef< objects::CPssmWithParameters > pssm, const string &dbname, CRef< TBlastHSPStream > hsps)
Common initialization performed when doing traceback only.
TSeqAlignVector LocalBlastResults2SeqAlign(BlastHSPResults *hsp_results, ILocalQueryData &local_data, const IBlastSeqInfoSrc &seqinfo_src, EBlastProgramType program, bool gapped, bool oof_mode, vector< TSeqLocInfoVector > &subj_masks, EResultType result_type)
Convert traceback output into Seq-align format.
PSIBlastOptions * m_PSIBlastOpts
virtual ~CBlastTracebackSearch()
Destructor.
EBlastProgramType m_ProgramType
CRef< TBlastDiagnostics > m_Diagnostics
Diagnostic output from preliminary and traceback stages.
const int kNoPhiBlastPattern
set to -1 in ctor, indicate that m_NumPatOccurInDB is unset or not applicable.
BlastScoringOptions * m_ScoringOpts
BlastDatabaseOptions * m_DbOpts
CRef< CSearchResultSet > BlastBuildSearchResultSet(const vector< CConstRef< CSeq_id > > &query_ids, const BlastScoreBlk *sbp, const BlastQueryInfo *qinfo, EBlastProgramType program, const TSeqAlignVector &alignments, TSearchMessages &messages, const vector< TSeqLocInfoVector > &subj_masks, const TSeqLocInfoVector *query_masks, const EResultType result_type)
Build a CSearchResultSet from internal BLAST data structures.
CRef< SInternalData > m_InternalData
Fields and data from the preliminary search.
CRef< CBlastOptions > m_Options
The options with which this search is configured.
int m_NumPatOccurInDB
Number of times pattern found to occur in database (for phi-blast only).
CRef< TBlastHSPStream > m_HspStream
HSP output of the preliminary stage goes here.
const CBlastOptionsMemento * m_OptsMemento
Options from the preliminary search.
bool GetGappedMode() const
Returns true if gapped BLAST is set, false otherwise.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Reset(void)
Reset reference object.
bool NotEmpty(void) const THROWS_NONE
Check if CConstRef is not empty â pointing to an object and has a non-null value.
#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.
char * dbname(DBPROCESS *dbproc)
Get name of current database.
unsigned int
A callback function used to compare two keys in a database.
LookupTableWrap * LookupTableWrapFree(LookupTableWrap *lookup)
Deallocate memory for the lookup table.
Declarations of auxiliary functions/classes for PSI-BLAST.
Defines BLAST database access classes.
Defines a concrete strategy for the IBlastSeqInfoSrc interface for sequence identifiers retrieval fro...
Return statistics from the BLAST search.
BlastUngappedStats * ungapped_stat
Ungapped extension counts.
The structure to contain all BLAST results, for multiple queries.
Int4 hitlist_size
Maximal number of database sequences to return results for.
Structure used for scoring calculations.
Used to hold a set of positions, mostly used for filtering.
Complete type definition of Blast Sequence Source ADT.
Int8 lookup_hits
Number of successful lookup table hits.
Wrapper structure for different types of BLAST lookup tables.
Keeps prelim_hitlist_size and HitSavingOptions together, mostly for use by hspstream.
Int4 prelim_hitlist_size
number of hits saved during preliminary part of search.
Structure to hold results of the preliminary (databases scanning phase) part of the search that are n...
Lightweight wrapper to enclose C structures needed for running the preliminary and traceback stages o...
Structure containing all auxiliary information needed in a pattern search.
Int4 num_patterns_db
Number of patterns actually found during the database search.
Declares classes to maintain lists of subject offset ranges in sequence data for targetted retrieval ...
NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...
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