NCBI C++ ToolKit
|
Pseudo lookup table structure and database scanning functions used in PHI-BLAST. More...
#include <algo/blast/core/ncbi_std.h>
#include <algo/blast/core/blast_def.h>
#include <algo/blast/core/blast_stat.h>
#include <algo/blast/core/pattern.h>
#include <algo/blast/core/lookup_wrap.h>
Go to the source code of this file.
Go to the SVN repository for this file.
Functions | |
Int2 | SPHIPatternSearchBlkNew (char *pattern, Boolean is_dna, BlastScoreBlk *sbp, SPHIPatternSearchBlk **pattern_blk, Blast_Message **error_msg) |
Initialize the pattern items structure, serving as a "pseudo" lookup table in a PHI BLAST search. More... | |
SPHIPatternSearchBlk * | SPHIPatternSearchBlkFree (SPHIPatternSearchBlk *pattern_blk) |
Deallocate memory for the PHI BLAST lookup table. More... | |
Int4 | PHIBlastScanSubject (const LookupTableWrap *lookup_wrap, const BLAST_SequenceBlk *query_blk, const BLAST_SequenceBlk *subject, Int4 *offset, BlastOffsetPair *offset_pairs, Int4 array_size) |
Scans the subject sequence from "offset" to the end of the sequence. More... | |
Pseudo lookup table structure and database scanning functions used in PHI-BLAST.
Definition in file phi_lookup.h.
Int4 PHIBlastScanSubject | ( | const LookupTableWrap * | lookup_wrap, |
const BLAST_SequenceBlk * | query_blk, | ||
const BLAST_SequenceBlk * | subject_blk, | ||
Int4 * | offset_ptr, | ||
BlastOffsetPair * | offset_pairs, | ||
Int4 | array_size | ||
) |
Scans the subject sequence from "offset" to the end of the sequence.
Copies at most array_size hits. Returns the number of hits found. If there isn't enough room to copy all the hits, return early, and update "offset".
lookup_wrap | contains the pseudo lookup table with offsets of pattern occurrences in query [in] |
query_blk | the query sequence [in] |
subject | the subject sequence [in] |
offset | the offset in the subject at which to begin scanning [in/out] |
offset_pairs | Array of start and end positions of pattern in subject [out] |
array_size | length of the offset arrays [in] |
Scans the subject sequence from "offset" to the end of the sequence.
lookup_wrap | PHI BLAST lookup table [in] |
query_blk | Query sequence [in] |
subject_blk | Subject sequence [in] |
offset_ptr | Next offset in subject - set to end of sequence [out] |
offset_pairs | Starts and stops for pattern occurrences in subject [out] |
array_size | Not used. |
Definition at line 725 of file phi_lookup.c.
References ASSERT, count, ePhiLookupTable, ePhiNaLookupTable, FindPatternHits(), BLAST_SequenceBlk::length, LookupTableWrap::lut, LookupTableWrap::lut_type, PHI_MAX_HIT, BLAST_SequenceBlk::sequence, and subject.
Referenced by BOOST_AUTO_TEST_CASE(), PHIBlastWordFinder(), and CSeedTop::Run().
SPHIPatternSearchBlk* SPHIPatternSearchBlkFree | ( | SPHIPatternSearchBlk * | pattern_blk | ) |
Deallocate memory for the PHI BLAST lookup table.
pattern_blk | The structure to deallocate [in] |
Definition at line 690 of file phi_lookup.c.
References SShortPatternItems::dna_items, SLongPatternItems::dna_items, eVeryLong, SLongPatternItems::extra_long_items, SPHIPatternSearchBlk::flagPatternLength, SPHIPatternSearchBlk::multi_word_items, NULL, SPHIPatternSearchBlk::one_word_items, SPHIPatternSearchBlk::pattern, sfree, and SShortPatternItems::whichPositionPtr.
Referenced by LookupTableWrapFree(), and CMultiAligner::x_FindPatternHits().
Int2 SPHIPatternSearchBlkNew | ( | char * | pattern, |
Boolean | is_dna, | ||
BlastScoreBlk * | sbp, | ||
SPHIPatternSearchBlk ** | pattern_blk, | ||
Blast_Message ** | error_msg | ||
) |
Initialize the pattern items structure, serving as a "pseudo" lookup table in a PHI BLAST search.
pattern | String describing the pattern to search for [in] |
is_dna | boolean describing whether the strings are DNA or protein [in] |
sbp | Scoring block with statistical parameters [in] |
pattern_blk | The initialized structure [out] |
error_msg | Error message, if any. |
Definition at line 388 of file phi_lookup.c.
References AMINOACID_TO_NCBISTDAA, Blast_MessageWrite(), Blast_ResFreqFree(), Blast_ResFreqNew(), Blast_ResFreqStdComp(), BLASTAA_SIZE, calloc(), eBlastSevWarning, eMultiWord, eVeryLong, SLongPatternItems::extra_long_items, SPHIPatternSearchBlk::flagPatternLength, SExtraLongPatternItems::highestPlace, if(), SLongPatternItems::inputPatternMasked, int, IUPACNA_TO_NCBI4NA, kBlastMessageNoContext, kMaskAaAlphabetBits, malloc(), SShortPatternItems::match_mask, SPHIPatternSearchBlk::minPatternMatchLength, SPHIPatternSearchBlk::multi_word_items, NULL, SPHIPatternSearchBlk::one_word_items, SPHIPatternSearchBlk::pattern, SPHIPatternSearchBlk::patternProbability, PHI_ASCII_SIZE, PHI_BITS_PACKED_PER_WORD, PHI_MAX_PATTERN_LENGTH, Blast_ResFreq::prob, s_ExpandPattern(), s_InitDNAPattern(), s_MakePatternUpperCase(), s_PackLongPattern(), s_PackPattern(), s_PackVeryLongPattern(), s_PatternSearchItemsInit(), and SShortPatternItems::whichPositionPtr.
Referenced by LookupTableWrapInit_MT(), and CMultiAligner::x_FindPatternHits().