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


Detailed Description

Auxiliary setup functions for Blast objects interface.

Definition in file blast_setup_cxx.cpp.

#include <ncbi_pch.hpp>
#include <corelib/ncbiapp.hpp>
#include <corelib/metareg.hpp>
#include <algo/blast/api/blast_options.hpp>
#include <algo/blast/core/blast_setup.h>
#include <algo/blast/core/blast_util.h>
#include <algo/blast/core/gencode_singleton.h>
#include <objtools/blast/seqdb_reader/seqdb.hpp>
#include <objects/seqloc/Seq_point.hpp>
#include "blast_setup.hpp"

Include dependency graph for blast_setup_cxx.cpp:

Go to the source code of this file.

Functions

 USING_SCOPE (objects)
static void s_QueryInfo_SetContext (BlastQueryInfo *qinfo, Uint4 index, Uint4 length)
 Set field values for one element of the context array of a concatenated query.
static objects::ENa_strand s_BlastSetup_GetStrand (objects::ENa_strand seqloc_strand, EBlastProgramType program, objects::ENa_strand strand_opt)
 Internal function to choose between the strand specified in a Seq-loc (which specified the query strand) and the strand obtained from the CBlastOptions.
objects::ENa_strand BlastSetup_GetStrand (const objects::CSeq_loc &query_seqloc, EBlastProgramType program, objects::ENa_strand strand_option)
 Choose between a Seq-loc specified query strand and the strand obtained from the CBlastOptions.
static void s_AdjustFirstContext (BlastQueryInfo *query_info, EBlastProgramType prog, ENa_strand strand_opt, const IBlastQuerySource &queries)
 Adjust first context depending on the first query strand.
void SetupQueryInfo_OMF (const IBlastQuerySource &queries, EBlastProgramType prog, objects::ENa_strand strand_opt, BlastQueryInfo **qinfo)
 ObjMgr Free version of SetupQueryInfo.
static void s_ComputeStartEndContexts (ENa_strand strand, int num_contexts, int &start, int &end)
 Calculate the starting and ending contexts for a given strand.
static void s_AddMask (EBlastProgramType prog, BlastMaskLoc *mask, int query_index, CBlastQueryFilteredFrames &seqloc_frames, ENa_strand strand, TSeqPos query_length)
 Adds seqloc_frames to mask.
static void s_RestrictSeqLocs_Multiframe (CBlastQueryFilteredFrames &frame_to_bsl, const IBlastQuerySource &queries, int query_index, const BlastQueryInfo *qinfo)
 Restricts the masked locations in frame_to_bsl for the case when the BLAST program requires the query to be translated into multiple frames.
static CRef< CBlastQueryFilteredFramess_GetRestrictedBlastSeqLocs (IBlastQuerySource &queries, int query_index, const BlastQueryInfo *qinfo, EBlastProgramType program)
 Extract the masking locations for a single query into a CBlastQueryFilteredFrames object and adjust the masks so that they correspond to the range specified by the Seq-loc in queries.
static void s_InvalidateQueryContexts (BlastQueryInfo *qinfo, int query_index)
 Mark the contexts corresponding to the query identified by query_index as invalid.
void SetupQueries_OMF (IBlastQuerySource &queries, BlastQueryInfo *qinfo, BLAST_SequenceBlk **seqblk, EBlastProgramType prog, objects::ENa_strand strand_opt, TSearchMessages &messages)
 ObjMgr Free version of SetupQueries.
static void s_SeqLoc2MaskedSubjRanges (const CSeq_loc *slp, CSeqDB::TSequenceRanges &output)
void SetupSubjects_OMF (IBlastQuerySource &subjects, EBlastProgramType program, vector< BLAST_SequenceBlk * > *seqblk_vec, unsigned int *max_subjlen)
 Object manager free version of SetupSubjects.
static bool s_IsValidResidue (Uint1 res)
 Tests if a number represents a valid residue.
static SBlastSequence GetSequenceProtein (IBlastSeqVector &sv, string *warnings=0)
 Protein sequences are always encoded in eBlastEncodingProtein and always have sentinel bytes around sequence data.
static SBlastSequence GetSequenceCompressedNucleotide (IBlastSeqVector &sv)
 Auxiliary function to retrieve plus strand in compressed (ncbi4na) format.
static SBlastSequence GetSequenceSingleNucleotideStrand (IBlastSeqVector &sv, EBlastEncoding encoding, objects::ENa_strand strand, ESentinelType sentinel)
 Auxiliary function to retrieve a single strand of a nucleotide sequence.
static SBlastSequence GetSequenceNucleotideBothStrands (IBlastSeqVector &sv, EBlastEncoding encoding, ESentinelType sentinel)
 Auxiliary function to retrieve both strands of a nucleotide sequence.
SBlastSequence GetSequence_OMF (IBlastSeqVector &sv, EBlastEncoding encoding, objects::ENa_strand strand, ESentinelType sentinel, std::string *warnings=0)
 Object manager free version of GetSequence.
EBlastEncoding GetQueryEncoding (EBlastProgramType program)
 Returns the encoding for the sequence data used in BLAST for the query.
EBlastEncoding GetSubjectEncoding (EBlastProgramType program)
 Returns the encoding for the sequence data used in BLAST2Sequences for the subject.
SBlastSequence CompressNcbi2na (const SBlastSequence &source)
 Compresses the sequence data passed in to the function from 1 base per byte to 4 bases per byte.
TSeqPos CalculateSeqBufferLength (TSeqPos sequence_length, EBlastEncoding encoding, objects::ENa_strand strand=objects::eNa_strand_unknown, ESentinelType sentinel=eSentinels) THROWS((CBlastException))
 Calculates the length of the buffer to allocate given the desired encoding, strand (if applicable) and use of sentinel bytes around sequence.
Uint1 GetSentinelByte (EBlastEncoding encoding) THROWS((CBlastException))
 Convenience function to centralize the knowledge of which sentinel bytes we use for supported encodings.
char * s_GetCStringOfMatrixPath (string &full_path, const string &matrix_name)
 Get the path to the matrix, without the actual matrix name.
char * BlastFindMatrixPath (const char *matrix_name, Boolean is_prot)
 Returns the path to a specified matrix.
static bool BlastDbFileExists (string &path, bool is_prot)
 Checks if a BLAST database exists at a given file path: looks for an alias file first, then for an index file.
string FindBlastDbPath (const char *dbname, bool is_prot)
 Returns the path (including a trailing path separator) to the location where the BLAST database can be found.
unsigned int GetNumberOfContexts (EBlastProgramType p)
 Returns the number of contexts for a given BLAST program.
BLAST_SequenceBlkSafeSetupQueries (IBlastQuerySource &queries, const CBlastOptions *options, BlastQueryInfo *query_info, TSearchMessages &messages)
 Wrapper around SetupQueries.
BlastQueryInfoSafeSetupQueryInfo (const IBlastQuerySource &queries, const CBlastOptions *options)
 Wrapper around SetupQueryInfo.
static set< CSeqLocInfo::ETranslationFrames_GetAllAvailableFrames ()
 Auxiliary function to retrieve all available frames.

Variables

static char const rcsid []


Variable Documentation

char const rcsid[] [static]
 

Initial value:

    "$Id: blast_setup_cxx.cpp 162130 2009-06-03 13:44:30Z camacho $"

Definition at line 2 of file blast_setup_cxx.cpp.


Generated on Mon Dec 7 06:54:10 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:21:37 2009 by modify_doxy.py rev. 173732