include/algo/blast/core/blast_def.h File Reference


Detailed Description

Definitions used throughout BLAST.

Definition in file blast_def.h.

#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_export.h>
#include <algo/blast/core/blast_program.h>

Include dependency graph for blast_def.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  BlastOffsetPair
 Structure holding a pair of offsets. More...
struct  SSeqRange
 A structure containing two integers, used e.g. More...
struct  BlastSeqLoc
 Used to hold a set of positions, mostly used for filtering. More...
struct  BlastMaskLoc
 Structure for keeping the query masking information. More...
struct  BLAST_SequenceBlk
 Structure to hold a sequence. More...
struct  SPHIPatternInfo
 Information about a single pattern occurence in the query. More...
struct  SPHIQueryInfo
 In PHI BLAST, structure containing information about all pattern occurrences in query. More...
struct  SBlastTargetTranslation
 Information about target translations. More...
struct  SBlastProgress
 Progress monitoring structure. More...

Defines

#define CODON_LENGTH   3
 Codons are always of length 3.
#define DEFAULT_LONGEST_INTRON   122
 For translated gapped searches, this is the default value in nucleotides of longest_intron (for ungapped translated searches, the default value of longest_intron is zero, which causes a legacy method of HSP linking that does not use longest_intron to be invoked).
#define COMPRESSION_RATIO   4
 Compression ratio of nucleotide bases (4 bases in 1 byte).
#define NUM_FRAMES   6
 Number of frames to which we translate in translating searches.
#define NUM_STRANDS   2
 Number of frames in a nucleotide sequence.
#define GENCODE_STRLEN   64
 Length of the genetic code string.
#define BLAST_CMP(a, b)   ((a)>(b) ? 1 : ((a)<(b) ? -1 : 0))
 A macro expression that returns 1, 0, -1 if a is greater than, equal to or less than b, respectively.
#define sfree(x)   __sfree((void**)(void*)&(x))
 Safe free a pointer: belongs to a higher level header.

Typedefs

typedef Boolean(* TInterruptFnPtr )(SBlastProgress *progress_info)
 Prototype for function pointer to determine whether the BLAST search should proceed or be interrupted.

Enumerations

enum  EBlastStage { eNone = 0x0, ePrelimSearch = 0x1 << 0, eTracebackSearch = 0x1 << 1, eBoth = (ePrelimSearch | eTracebackSearch) }
 Enumeration for the stages in the BLAST search. More...

Functions

void __sfree (void **x)
 Implemented in blast_util.c.
SSeqRange SSeqRangeNew (Int4 start, Int4 stop)
 Create a new SSeqRange structure with both fields initialized.
static NCBI_INLINE Boolean SSeqRangeIntersectsWith (const SSeqRange *a, const SSeqRange *b)
 Determine if two ranges intersect.
Int4 SSeqRangeArrayLessThanOrEqual (const SSeqRange *ranges, Int4 num_ranges, Int4 target)
 Returns the index of the range, such that this element is the first range that either contains the target or if no such range exists, the index of the first range, such that the target is less than this range.
SBlastProgressSBlastProgressNew (void *user_data)
 Allocates and initializes a new SBlastProgress structure.
SBlastProgressSBlastProgressFree (SBlastProgress *progress_info)
 Deallocates a SBlastProgress structure.
void SBlastProgressReset (SBlastProgress *progress_info)
 Resets the progress structure to its original state (as if newly allocated) for a fresh start without touching the user_data field.

Variables

const int kDustLevel
 Level parameter used by dust.
const int kDustWindow
 Window parameter used by dust.
const int kDustLinker
 Parameter used by dust to link together close low-complexity segments.
const int kSegWindow
 Window that SEG examines at once.
const double kSegLocut
 Locut parameter for SEG.
const double kSegHicut
 Hicut parameter for SEG.
const int kUngappedHSPNumMax
 Maximum number of HPSs to be saved in an ungapped search.


Define Documentation

#define BLAST_CMP a,
 )     ((a)>(b) ? 1 : ((a)<(b) ? -1 : 0))
 

A macro expression that returns 1, 0, -1 if a is greater than, equal to or less than b, respectively.

This macro evaluates its arguments more than once.

Definition at line 107 of file blast_def.h.

Referenced by s_EvalueCompareHSPLists(), s_ScoreCompareHSPWithContext(), s_SGenCodeNodeCompare(), score_compare_match(), and ScoreCompareHSPs().

#define CODON_LENGTH   3
 

Codons are always of length 3.

Definition at line 63 of file blast_def.h.

Referenced by BLAST_CreateMixedFrameDNATranslation(), BLAST_GappedAlignmentWithTraceback(), BLAST_GetGappedScore(), Blast_GetPartialTranslation(), BLAST_GetTranslatedProteinLength(), BLAST_GetTranslation(), Blast_HSPGetPartialSubjectTranslation(), Blast_HSPGetTargetTranslation(), Blast_TracebackFromHSPList(), BLAST_TranslateCompressedSequence(), BlastMaskLocDNAToProtein(), BlastMaskLocProteinToDNA(), BOOST_AUTO_TEST_CASE(), CalculateLinkHSPCutoffs(), s_Blast_HSPGetOOFNumIdentities(), s_BlastProtGappedAlignment(), s_BlastSegGetTranslatedOffsets(), s_ComputeNumIdentities(), s_CreateStdSegs(), s_GetAlignmentStart(), s_GetProteinFrameLength(), s_GetShiftForTranslatedNegStrand(), s_OutOfFrameAlignWithTraceback(), s_OutOfFrameGappedAlign(), s_SetUpLocalBlastSequenceBlk(), s_TranslateHSPsToDNAPCoord(), SplitQuery_CalculateNumChunks(), SplitQuery_GetChunkSize(), CBlastQueryFilteredFrames::UseProteinCoords(), CQuerySplitter::x_ComputeContextOffsets_TranslatedQueries(), CQuerySplitter::x_ComputeQueryContextsForChunks(), CBlastTracebackSearch::x_SetSubjectRangesForPartialFetching(), and x_UngappedHSPToStdSeg().

#define COMPRESSION_RATIO   4
 

Compression ratio of nucleotide bases (4 bases in 1 byte).

Definition at line 83 of file blast_def.h.

Referenced by BLAST_PackDNA(), BlastChooseNaExtend(), BOOST_AUTO_TEST_CASE(), CalculateSeqBufferLength(), CompressNcbi2na(), s_AdjustSubjectChunks(), s_BlastDynProgNtGappedAlignment(), s_BlastNaExtend(), s_BlastNaExtendAligned(), s_BlastNaScanSubject_8_4(), s_BlastNaScanSubject_Any(), s_BlastSmallNaExtend(), s_BlastSmallNaExtendAlignedOneByte(), s_BlastSmallNaScanSubject_4_1(), s_BlastSmallNaScanSubject_5_1(), s_BlastSmallNaScanSubject_6_1(), s_BlastSmallNaScanSubject_6_2(), s_BlastSmallNaScanSubject_7_1(), s_BlastSmallNaScanSubject_7_2(), s_BlastSmallNaScanSubject_7_3(), s_BlastSmallNaScanSubject_8_1Mod4(), s_BlastSmallNaScanSubject_8_2Mod4(), s_BlastSmallNaScanSubject_8_3Mod4(), s_BlastSmallNaScanSubject_8_4(), s_BlastSmallNaScanSubject_Any(), s_MB_DiscWordScanSubject_1(), s_MB_DiscWordScanSubject_11_18_1(), s_MB_DiscWordScanSubject_11_21_1(), s_MB_DiscWordScanSubject_TwoTemplates_1(), s_MBChooseScanSubject(), s_MBScanSubject_10_1(), s_MBScanSubject_10_2(), s_MBScanSubject_10_3(), s_MBScanSubject_11_1Mod4(), s_MBScanSubject_11_2Mod4(), s_MBScanSubject_11_3Mod4(), s_MBScanSubject_9_1(), s_MBScanSubject_9_2(), s_MBScanSubject_Any(), s_NuclUngappedExtend(), s_NuclUngappedExtendExact(), s_SmallNaChooseScanSubject(), s_TypeOfWord(), TestFixture::ScanCheckHitsCore(), and TestFixture::SetUpSubject().

#define DEFAULT_LONGEST_INTRON   122
 

For translated gapped searches, this is the default value in nucleotides of longest_intron (for ungapped translated searches, the default value of longest_intron is zero, which causes a legacy method of HSP linking that does not use longest_intron to be invoked).

The value 122 corresponds to 40 amino acids: 40 codons * 3 nucleotides per codon + up to 2 frame shifts. 40 amino acids is the maximum gap size in the untranslated sequence, so DEFAULT_LONGEST_INTRON makes these two gap sizes equal.

Definition at line 78 of file blast_def.h.

Referenced by BlastHitSavingParametersNew().

#define GENCODE_STRLEN   64
 

Length of the genetic code string.

Definition at line 98 of file blast_def.h.

Referenced by DynamicSGenCodeNodeArray_Append().

#define NUM_FRAMES   6
 

Number of frames to which we translate in translating searches.

Definition at line 88 of file blast_def.h.

Referenced by BLAST_ContextToFrame(), BLAST_GetAllTranslations(), BLAST_GetGappedScore(), BLAST_GetNumberOfContexts(), Blast_GetQueryIndexFromContext(), BLAST_SmithWatermanGetGappedScore(), BlastHitSavingParametersUpdate(), BlastHSPStreamMerge(), BlastMaskLocDNAToProtein(), BlastMaskLocProteinToDNA(), BlastRPSWordFinder(), BlastTargetTranslationNew(), BOOST_AUTO_TEST_CASE(), s_FwdCompareHSPsTransl(), s_GetTranslatedQueryDNALength(), s_RevCompareHSPsTbx(), s_RevCompareHSPsTransl(), and CQuerySplitter::x_ComputeQueryContextsForChunks().

#define NUM_STRANDS   2
 

Number of frames in a nucleotide sequence.

Definition at line 93 of file blast_def.h.

Referenced by BLAST_ContextToFrame(), BLAST_GetNumberOfContexts(), Blast_GetQueryIndexFromContext(), BOOST_AUTO_TEST_CASE(), and s_BlastEvenGapLinkHSPs().

#define sfree  )     __sfree((void**)(void*)&(x))
 

Safe free a pointer: belongs to a higher level header.

Definition at line 112 of file blast_def.h.

Referenced by _PSIAlignedBlockFree(), _PSIDeallocateMatrix(), _PSIInternalPssmDataFree(), _PSIMatrixFrequencyRatiosFree(), _PSIMsaFree(), _PSIPackedMsaFree(), _PSISaveDiagnostics(), _PSISequenceWeightsFree(), ALIGN_EX(), BLAST_CheckRewardPenaltyScores(), Blast_DiagnosticsFree(), BLAST_FillQuerySetUpOptions(), BLAST_GapAlignStructFree(), BLAST_GetNucleotideGapExistenceExtendParams(), Blast_HitListFree(), Blast_HitListHSPListsFree(), Blast_HSPFree(), Blast_HSPGetPartialSubjectTranslation(), Blast_HSPGetTargetTranslation(), Blast_HSPResultsFree(), Blast_HSPStreamResultBatchFree(), BLAST_InitHitListFree(), Blast_IntervalTreeFree(), Blast_KarlinBlkFree(), Blast_KarlinBlkNuclGappedCalc(), Blast_MessageFree(), Blast_ProgramNameFromType(), Blast_ResFreqFree(), Blast_ResFreqStdComp(), Blast_ScoreBlkMatrixFill(), Blast_ScoreFreqFree(), BLAST_ScoreSetAmbigRes(), Blast_SemiGappedAlign(), BlastAaLookupTableDestruct(), BlastDatabaseOptionsFree(), BlastEffectiveLengthsOptionsFree(), BlastEffectiveLengthsParametersFree(), BlastExtendWordFree(), BlastExtendWordNew(), BlastExtensionOptionsFree(), BlastExtensionParametersFree(), BlastFilteringOptionsFromString(), BlastHitSavingOptionsFree(), BlastHitSavingParametersFree(), BlastHSPBestHitOptionsFree(), BlastHSPBestHitParamsFree(), BlastHSPCollectorParamsFree(), BlastHSPCullingOptionsFree(), BlastHSPCullingParamsFree(), BlastHSPFilteringOptionsFree(), BlastHSPPipeNew(), BlastHSPWriterNew(), BlastInitHitListReset(), BlastInitialWordOptionsFree(), BlastInitialWordParametersFree(), BlastLinkHSPParametersFree(), BlastMBLookupTableDestruct(), BlastNaLookupTableDestruct(), BlastNaLookupTableNew(), BlastQueryInfoFree(), BlastQuerySetUpOptionsFree(), BlastResCompDestruct(), BlastScoringOptionsFree(), BlastScoringOptionsSetMatrix(), BlastScoringOptionsValidate(), BlastScoringParametersFree(), BlastSeqLocNodeFree(), BlastSeqSrcFree(), BlastSeqSrcIteratorFree(), BlastSeqSrcIteratorNewEx(), BlastSeqSrcNew(), BlastSequenceBlkClean(), BlastSequenceBlkFree(), BlastSmallNaLookupTableDestruct(), BlastSmallNaLookupTableNew(), BlastTargetTranslationFree(), BlastTargetTranslationNew(), BOOST_AUTO_TEST_CASE(), TestUtil::CheckForBlastSeqSrcErrors(), CSetupFactory::CreateBlastSeqSrc(), debruijn(), DynamicInt4ArrayFree(), DynamicSGenCodeNodeArrayFree(), DynamicUint4ArrayFree(), GapEditScriptDelete(), GapPrelimEditBlockFree(), GapStateFree(), Kappa_compactSearchItemsFree(), Kappa_posSearchItemsFree(), ListNodeFree(), ListNodeFreeData(), LookupTableOptionsFree(), LookupTableWrapFree(), MatrixInfoDestruct(), MBSpaceFree(), MBSpaceNew(), PSIBlastOptionsFree(), PSIDiagnosticsRequestFree(), PSIDiagnosticsResponseFree(), PSIMatrixFree(), PSIMsaFree(), RPSfindUngappedLambda(), RPSLookupTableDestruct(), RPSPsiMatrixDetach(), RPSRescalePssm(), CRedoAlignmentTestFixture::runRedoAlignmentCoreUnitTest(), s_AlphaFree(), s_BlastAlignPackedNucl(), s_BlastCoreAuxStructFree(), s_BlastDiagHashFree(), s_BlastDiagTableFree(), s_BlastGreedyAlignMemAlloc(), s_BlastGreedyAlignsFree(), s_BlastHSPBestHitFree(), s_BlastHSPBestHitPipeFree(), s_BlastHSPCollectorFree(), s_BlastHSPCollectorRun(), s_BlastHSPCullingFree(), s_BlastHSPCullingPipeFree(), s_BlastInitHitListClean(), s_BlastSearchEngineCoreCleanUp(), s_BlastSequenceBlkFreeSeqRanges(), s_CheckForBlastSeqSrcErrors(), s_CloseWin(), s_GapGetState(), s_HSPFree(), s_LinkedHSPSetArrayCleanUp(), s_MatrixDataFree(), s_MatrixDataReset(), s_MergeSegs(), s_MultiSeqReleaseSequence(), s_NuclSmithWaterman(), s_OutOfFrameAlignWithTraceback(), s_OutOfFrameGappedAlign(), s_PSICreatePssmFromFrequencyRatiosCleanUp(), s_QueryFactoryReleaseSequence(), s_RestoreSeqRanges(), s_RestrictedGappedAlign(), s_RetNode(), s_RPSComputeTraceback(), s_SafeStrCat(), s_SegFree(), s_SeqDbGetNextChunk(), s_SmithWatermanScoreOnly(), s_SSequenceFree(), SBlastFilterOptionsFree(), SBlastHitsParametersFree(), SBlastProgressFree(), SBlastScoreMatrixFree(), SCompressedAlphabetFree(), SDustOptionsFree(), SegParametersFree(), CBlastOptionsLocal::SetEffectiveSearchSpace(), CBlastOptionsLocal::SetFilterString(), CBlastOptionsLocal::SetMatrixName(), CBlastOptionsLocal::SetPHIPattern(), CBl2Seq::SetupSearch(), SMessageOriginFree(), SPHIPatternSearchBlkFree(), SPHIQueryInfoFree(), SplitQueryBlkFree(), SPsiBlastScoreMatrixFree(), SRepeatFilterOptionsFree(), SRepeatFilterOptionsResetDB(), SSegOptionsFree(), SWindowMaskerOptionsFree(), SWindowMaskerOptionsResetDB(), TestFixture::TearDownLookupTable(), CBlastRPSAuxInfo::x_DoDestroy(), AascanTestFixture::~AascanTestFixture(), and CBlastExtendTestFixture::~CBlastExtendTestFixture().


Typedef Documentation

typedef Boolean(* TInterruptFnPtr)(SBlastProgress *progress_info)
 

Prototype for function pointer to determine whether the BLAST search should proceed or be interrupted.

If this function returns true, all processing must stop and the search must discard all interim results

Note:
In order to avoid undue overhead, this function should not perform any time consuming operations and should always return (i.e.: it should never block)

Definition at line 333 of file blast_def.h.


Enumeration Type Documentation

enum EBlastStage
 

Enumeration for the stages in the BLAST search.

Enumerator:
eNone  None specified.
ePrelimSearch  Preliminary stage.
eTracebackSearch  Traceback stage.
eBoth  Both preliminary and traceback stages.

Definition at line 303 of file blast_def.h.


Function Documentation

void __sfree void **  x  ) 
 

Implemented in blast_util.c.

See also:
sfree

Definition at line 45 of file blast_util.c.

References free().

SBlastProgress* SBlastProgressFree SBlastProgress progress_info  ) 
 

Deallocates a SBlastProgress structure.

Implemented in blast_util.c

Definition at line 1360 of file blast_util.c.

References sfree.

SBlastProgress* SBlastProgressNew void *  user_data  ) 
 

Allocates and initializes a new SBlastProgress structure.

Parameters:
user_data user-provided data (not owned by the resulting structure) [in] Implemented in blast_util.c

Definition at line 1350 of file blast_util.c.

References calloc(), and SBlastProgress::user_data.

Referenced by CBl2Seq::SetInterruptCallback().

void SBlastProgressReset SBlastProgress progress_info  ) 
 

Resets the progress structure to its original state (as if newly allocated) for a fresh start without touching the user_data field.

Definition at line 1369 of file blast_util.c.

References ePrelimSearch, and SBlastProgress::stage.

Referenced by CBl2Seq::RunFullSearch().

Int4 SSeqRangeArrayLessThanOrEqual const SSeqRange ranges,
Int4  num_ranges,
Int4  target
 

Returns the index of the range, such that this element is the first range that either contains the target or if no such range exists, the index of the first range, such that the target is less than this range.

Precondition:
ranges array is sorted on the starting coordinates (i.e.: SSeqRange::left)
Parameters:
ranges array of SSeqRange structures to search [in]
num_ranges number of elements in the ranges array [in]
target element to look for [in]
Returns:
the index of interest in the ranges array or -1 if the function was called with invalid parameters

Definition at line 61 of file blast_util.c.

Referenced by BOOST_AUTO_TEST_CASE(), and s_AdjustSubjectChunks().

static NCBI_INLINE Boolean SSeqRangeIntersectsWith const SSeqRange a,
const SSeqRange b
[static]
 

Determine if two ranges intersect.

Parameters:
a first range to compare [in]
b second range to compare [in]
Returns:
TRUE if they intersect, otherwise FALSE

Definition at line 167 of file blast_def.h.

References FALSE, SSeqRange::left, SSeqRange::right, and TRUE.

Referenced by BOOST_AUTO_TEST_CASE().

SSeqRange SSeqRangeNew Int4  start,
Int4  stop
 

Create a new SSeqRange structure with both fields initialized.

Parameters:
start the start of the range [in]
stop the end of the range [in]

Definition at line 52 of file blast_util.c.

References SSeqRange::left, and SSeqRange::right.

Referenced by BOOST_AUTO_TEST_CASE().


Variable Documentation

const int kDustLevel
 

Level parameter used by dust.

Definition at line 52 of file blast_options.c.

Referenced by BlastFilteringOptionsToString(), s_MergeDustOptions(), and SDustOptionsNew().

const int kDustLinker
 

Parameter used by dust to link together close low-complexity segments.

Definition at line 54 of file blast_options.c.

Referenced by BlastFilteringOptionsToString(), s_MergeDustOptions(), and SDustOptionsNew().

const int kDustWindow
 

Window parameter used by dust.

Definition at line 53 of file blast_options.c.

Referenced by BlastFilteringOptionsToString(), s_MergeDustOptions(), and SDustOptionsNew().

const double kSegHicut
 

Hicut parameter for SEG.

Definition at line 50 of file blast_seg.c.

Referenced by BlastFilteringOptionsToString(), s_MergeSegOptions(), SegParametersNewAa(), and SSegOptionsNew().

const double kSegLocut
 

Locut parameter for SEG.

Definition at line 49 of file blast_seg.c.

Referenced by BlastFilteringOptionsToString(), s_MergeSegOptions(), SegParametersNewAa(), and SSegOptionsNew().

const int kSegWindow
 

Window that SEG examines at once.

Definition at line 48 of file blast_seg.c.

Referenced by BlastFilteringOptionsToString(), s_MergeSegOptions(), SegParametersNewAa(), and SSegOptionsNew().

const int kUngappedHSPNumMax
 

Maximum number of HPSs to be saved in an ungapped search.

number of HSPs for an ungapped search.

Definition at line 47 of file blast_options.c.

Referenced by BLAST_FillHitSavingOptions(), and BlastHspNumMax().


Generated on Wed Dec 9 05:29:57 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Wed Dec 09 08:18:16 2009 by modify_doxy.py rev. 173732