NCBI C++ ToolKit
|
#include "blast_gapalign_priv.h"
#include <algo/blast/core/blast_nalookup.h>
#include <algo/blast/core/blast_hits.h>
#include <algo/blast/core/hspfilter_mapper.h>
#include "jumper.h"
Go to the source code of this file.
Go to the SVN repository for this file.
Macros | |
#define | GET_BASE(seq, pos, compressed) (compressed ? NCBI2NA_UNPACK_BASE(seq[pos >> 2], 3 - (pos & 3)) : seq[pos]) |
#define | UNPACK_BASE_OLD(seq, pos) ((((seq)[(pos) >> 2] << (2 * ((pos) & 3))) & 0xC0) >> 6) |
#define | UNPACK_BASE(seq, pos) (NCBI2NA_UNPACK_BASE((seq)[(pos) / 4], 3 - ((pos) & 3))) |
#define | JUMPER_EDIT_BLOCK_ADD(block, op) ((block)->edit_ops[(block)->num_ops++] = op) |
#define | JOP_TO_OP(op) (op >= 0 ? eGapAlignSub : (op == JUMPER_INSERTION ? eGapAlignIns : eGapAlignDel)) |
#define | JOP_TO_NUM(op) (op > 0 ? op : 1) |
#define | NUM_SIGNALS 8 |
#define | MAX_NUM_MATCHES 10 |
#define | NUM_DIMERS (1 << 4) |
Functions | |
static JumperPrelimEditBlock * | JumperPrelimEditBlockNew (Int4 size) |
static JumperPrelimEditBlock * | JumperPrelimEditBlockFree (JumperPrelimEditBlock *block) |
Int4 | JumperPrelimEditBlockAdd (JumperPrelimEditBlock *block, JumperOpType op) |
static void | s_CreateTable (Uint4 *table) |
JumperGapAlign * | JumperGapAlignFree (JumperGapAlign *jgap_align) |
JumperGapAlign * | JumperGapAlignNew (Int4 size) |
static void | s_ResetJumperPrelimEditBlocks (JumperPrelimEditBlock *left, JumperPrelimEditBlock *right) |
static int | s_GetSeqPositions (JumperPrelimEditBlock *edit_script, Int4 edit_index, Int4 *query_pos, Int4 *subject_pos) |
static int | s_ShiftGapsRight (JumperPrelimEditBlock *edit_script, const Uint1 *query, const Uint1 *subject, Int4 query_offset, Int4 subject_offset, Int4 query_length, Int4 subject_length, Int4 *score, Int4 err_score, Int4 *num_identical) |
static int | s_ShiftGaps (BlastGapAlignStruct *gap_align, const Uint1 *query, const Uint1 *subject, Int4 query_length, Int4 subject_length, Int4 err_score, Int4 *num_identical) |
static void | s_TrimExtension (JumperPrelimEditBlock *jops, int margin, const Uint1 **cp, Int4 *cq, Int4 *num_identical, Boolean is_right_ext) |
GapEditScript * | JumperPrelimEditBlockToGapEditScript (JumperPrelimEditBlock *rev_prelim_block, JumperPrelimEditBlock *fwd_prelim_block) |
Convert Jumper's preliminary edit script to GapEditScript. More... | |
static Int4 | s_ComputeExtensionScore (JumperPrelimEditBlock *edit_script, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score) |
Int4 | JumperExtendRightCompressed (const Uint1 *query, const Uint1 *subject, int query_length, int subject_length, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, Uint4 *table, Int4 *query_ext_len, Int4 *subject_ext_len, Int4 *num_identical, Int4 *ungapped_ext_len) |
Int4 | JumperExtendRightCompressedWithTraceback (const Uint1 *query, const Uint1 *subject, int query_length, int subject_length, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, Uint4 *table, Int4 *query_ext_len, Int4 *subject_ext_len, JumperPrelimEditBlock *edit_script, Int4 *num_identical, Boolean left_extension, Int4 *ungapped_ext_len, JUMP *jumper) |
Int4 | JumperExtendRightCompressedWithTracebackOptimal (const Uint1 *query, const Uint1 *subject, int query_length, int subject_length, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, Int4 x_drop, Uint4 *table, Int4 *query_ext_len, Int4 *subject_ext_len, JumperPrelimEditBlock *edit_script, Int4 *best_num_identical, Boolean left_extension, Int4 *ungapped_ext_len) |
Int4 | JumperExtendRight (const Uint1 *query, const Uint1 *subject, int query_length, int subject_length, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, int *query_ext_len, int *subject_ext_len, GapPrelimEditBlock *edit_script, Boolean left_extension) |
Int4 | JumperExtendRightWithTraceback (const Uint1 *query, const Uint1 *subject, int query_length, int subject_length, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, Int4 *query_ext_len, Int4 *subject_ext_len, JumperPrelimEditBlock *edit_script, Int4 *num_identical, Boolean left_extension, Int4 *ungapped_ext_len, JUMP *jumper) |
Right extension with traceback. More... | |
Int4 | JumperExtendLeftCompressed (const Uint1 *query, const Uint1 *subject, Int4 query_offset, Int4 subject_offset, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, Uint4 *table, Int4 *query_ext_len, Int4 *subject_ext_len, Int4 *num_identical) |
Int4 | JumperExtendLeftCompressedWithTraceback (const Uint1 *query, const Uint1 *subject, Int4 query_offset, Int4 subject_offset, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, Uint4 *table, Int4 *query_ext_len, Int4 *subject_ext_len, JumperPrelimEditBlock *edit_script, Int4 *num_identical, JUMP *jumper) |
Int4 | JumperExtendLeftCompressedWithTracebackOptimal (const Uint1 *query, const Uint1 *subject, Int4 query_offset, Int4 subject_offset, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, Int4 x_drop, Uint4 *table, Int4 *query_ext_len, Int4 *subject_ext_len, JumperPrelimEditBlock *edit_script, Int4 *best_num_identical) |
Int4 | JumperExtendLeft (const Uint1 *query, const Uint1 *subject, Int4 query_offset, Int4 subject_offset, Int4 match_score, Int4 mismatch_score, Int4 gap_open_score, Int4 gap_extend_score, int max_mismatches, int window, int *query_ext_len, int *subject_ext_len, GapPrelimEditBlock *edit_script) |
int | JumperGappedAlignmentCompressedWithTraceback (const Uint1 *query, const Uint1 *subject, Int4 query_length, Int4 subject_length, Int4 query_start, Int4 subject_start, BlastGapAlignStruct *gap_align, const BlastScoringParameters *score_params, Int4 *num_identical, Int4 *right_ungapped_ext_len) |
Jumper gapped alignment with traceback; 1 base per byte in query, 4 bases per byte in subject. More... | |
Boolean | JumperGoodAlign (const BlastGapAlignStruct *gap_align, const BlastHitSavingParameters *hit_params, Int4 num_identical, BlastContextInfo *context_info) |
Test whether an HSP should be saved. More... | |
JumperEditsBlock * | JumperEditsBlockFree (JumperEditsBlock *block) |
JumperEditsBlock * | JumperEditsBlockNew (Int4 num) |
JumperEditsBlock * | JumperEditsBlockDup (const JumperEditsBlock *block) |
JumperEditsBlock * | JumperFindEdits (const Uint1 *query, const Uint1 *subject, BlastGapAlignStruct *gap_align) |
JumperEditsBlock * | JumperEditsBlockCombine (JumperEditsBlock **block_ptr, JumperEditsBlock **append_ptr) |
GapEditScript * | GapEditScriptCombine (GapEditScript **edit_script_ptr, GapEditScript **append_ptr) |
int | JumperFindSpliceSignals (BlastHSP *hsp, Int4 query_len, const Uint1 *subject, Int4 subject_len) |
Find splice signals at the edges of an HSP and save them in the HSP. More... | |
SequenceOverhangs * | SequenceOverhangsFree (SequenceOverhangs *overhangs) |
static Int4 | s_SaveSubjectOverhangs (BlastHSP *hsp, Uint1 *subject, Int4 query_len) |
static int | s_CompareOffsetPairsByDiagQuery (const void *a, const void *b) |
static BlastHSP * | s_CreateHSPForWordHit (Int4 q_offset, Int4 s_offset, Int4 length, Int4 context, const Uint1 *query, const BlastQueryInfo *query_info, const BLAST_SequenceBlk *subject, Int4 query_len) |
static BlastHSP * | s_CreateHSP (Uint1 *query_seq, Int4 query_len, Int4 context, BlastQueryInfo *query_info, BlastGapAlignStruct *gap_align, BLAST_SequenceBlk *subject, const BlastScoringParameters *score_params, const BlastHitSavingParameters *hit_params) |
Int4 | BlastNaExtendJumper (BlastOffsetPair *offset_pairs, Int4 num_hits, const BlastInitialWordParameters *word_params, const BlastScoringParameters *score_params, const BlastHitSavingParameters *hit_params, LookupTableWrap *lookup_wrap, BLAST_SequenceBlk *query, BLAST_SequenceBlk *subject, BlastQueryInfo *query_info, BlastGapAlignStruct *gap_align, BlastHSPList *hsp_list, Uint4 s_range, SubjectIndex *s_index) |
Extend a list of word hits. More... | |
SubjectIndex * | SubjectIndexFree (SubjectIndex *sindex) |
Free subject index structure. More... | |
static void | s_SubjectIndexNewCleanup (BLAST_SequenceBlk *sequence, BlastSeqLoc *seqloc, LookupTableOptions *opt, QuerySetUpOptions *query_opt, SubjectIndex *sindex) |
SubjectIndex * | SubjectIndexNew (BLAST_SequenceBlk *subject, Int4 width, Int4 word_size) |
Index a sequence, used for indexing compressed nucleotide subject sequence. More... | |
SubjectIndexIterator * | SubjectIndexIteratorFree (SubjectIndexIterator *it) |
Free memory reserved for subject index word iterator. More... | |
SubjectIndexIterator * | SubjectIndexIteratorNew (SubjectIndex *s_index, Int4 word, Int4 from, Int4 to) |
Create an iterator for locations of a given word. More... | |
Int4 | SubjectIndexIteratorNext (SubjectIndexIterator *it) |
Return the next location of a word in an indexed sequence. More... | |
Int4 | SubjectIndexIteratorPrev (SubjectIndexIterator *it) |
Return the previous location of a word in an indexed sequence. More... | |
static Int4 | DoAnchoredScan (Uint1 *query_seq, Int4 query_len, Int4 query_from, Int4 context, BLAST_SequenceBlk *subject, Int4 subject_from, Int4 subject_to, BlastQueryInfo *query_info, BlastGapAlignStruct *gap_align, const BlastScoringParameters *score_params, const BlastHitSavingParameters *hit_params, BlastHSPList *hsp_list) |
Int2 | DoAnchoredSearch (BLAST_SequenceBlk *query, BLAST_SequenceBlk *subject, Int4 word_size, BlastQueryInfo *query_info, BlastGapAlignStruct *gap_align, const BlastScoringParameters *score_params, const BlastHitSavingParameters *hit_params, BlastHSPStream *hsp_stream) |
Do a search against a single subject with smaller word size and with no database word frequency filtering, for queries that have partial hits. More... | |
static Int4 | s_FindDimerEntropy (Uint1 *sequence, Int4 length) |
static Int2 | s_MaskSequence (Int4 offset, Int4 length, BlastSeqLoc **seq_locs) |
Int2 | FilterQueriesForMapping (Uint1 *sequence, Int4 length, Int4 offset, const SReadQualityOptions *options, BlastSeqLoc **seq_loc) |
Int4 | GetCutoffScore (Int4 query_length) |
Get alignment cutoff score for a given query length. More... | |
Variables | |
JUMP | jumper_default [] |
JUMP | jumper_edge [] |
JUMP | jumper_ungapped [] |
#define GET_BASE | ( | seq, | |
pos, | |||
compressed | |||
) | (compressed ? NCBI2NA_UNPACK_BASE(seq[pos >> 2], 3 - (pos & 3)) : seq[pos]) |
#define JOP_TO_OP | ( | op | ) | (op >= 0 ? eGapAlignSub : (op == JUMPER_INSERTION ? eGapAlignIns : eGapAlignDel)) |
#define JUMPER_EDIT_BLOCK_ADD | ( | block, | |
op | |||
) | ((block)->edit_ops[(block)->num_ops++] = op) |
#define UNPACK_BASE | ( | seq, | |
pos | |||
) | (NCBI2NA_UNPACK_BASE((seq)[(pos) / 4], 3 - ((pos) & 3))) |
#define UNPACK_BASE_OLD | ( | seq, | |
pos | |||
) | ((((seq)[(pos) >> 2] << (2 * ((pos) & 3))) & 0xC0) >> 6) |
Int4 BlastNaExtendJumper | ( | BlastOffsetPair * | offset_pairs, |
Int4 | num_hits, | ||
const BlastInitialWordParameters * | word_params, | ||
const BlastScoringParameters * | score_params, | ||
const BlastHitSavingParameters * | hit_params, | ||
LookupTableWrap * | lookup_wrap, | ||
BLAST_SequenceBlk * | query, | ||
BLAST_SequenceBlk * | subject, | ||
BlastQueryInfo * | query_info, | ||
BlastGapAlignStruct * | gap_align, | ||
BlastHSPList * | hsp_list, | ||
Uint4 | s_range, | ||
SubjectIndex * | s_index | ||
) |
Extend a list of word hits.
Definition at line 3253 of file jumper.c.
References ASSERT, Blast_HSPInit(), Blast_HSPListSaveHSP(), BlastHSPMappingInfoNew(), BSearchContextInfo(), COMPRESSION_RATIO, context, BlastQueryInfo::contexts, BlastGapAlignStruct::edit_script, BlastHSPMappingInfo::edits, eMBLookupTable, BlastSeg::end, BlastHSP::evalue, FALSE, BlastContextInfo::frame, i, BlastGapAlignStruct::jumper, JumperFindEdits(), JumperFindSpliceSignals(), JumperGappedAlignmentCompressedWithTraceback(), JumperGoodAlign(), JumperPrelimEditBlockToGapEditScript(), JumperGapAlign::left_prelim_block, BlastHitSavingOptions::longest_intron, LookupTableWrap::lut, LookupTableWrap::lut_type, BlastNaLookupTable::lut_word_length, BlastMBLookupTable::lut_word_length, BlastHSP::map_info, MAX, MIN, NULL, BlastHSP::num_ident, BlastSeg::offset, BlastHitSavingParameters::options, BlastScoringParameters::penalty, BlastOffsetPair::q_off, BlastOffsetPair::qs_offsets, BlastHSP::query, query, BlastContextInfo::query_length, BlastContextInfo::query_offset, BlastGapAlignStruct::query_start, BlastGapAlignStruct::query_stop, JumperGapAlign::right_prelim_block, round(), s_CompareOffsetPairsByDiagQuery(), s_CreateHSPForWordHit(), BlastOffsetPair::s_off, s_SaveSubjectOverhangs(), s_ShiftGaps(), BlastGapAlignStruct::score, BlastHitSavingOptions::splice, st(), BlastHSP::subject, subject, SUBJECT_INDEX_WORD_LENGTH, BlastGapAlignStruct::subject_start, BlastGapAlignStruct::subject_stop, SubjectIndexIteratorFree(), SubjectIndexIteratorNew(), SubjectIndexIteratorNext(), SubjectIndexIteratorPrev(), UNPACK_BASE, BlastNaLookupTable::word_length, and BlastMBLookupTable::word_length.
Referenced by JumperNaWordFinder().
|
static |
Definition at line 4139 of file jumper.c.
References ASSERT, Blast_HSPFree(), Blast_HSPListSaveHSP(), COMPRESSION_RATIO, context, i, JumperGappedAlignmentCompressedWithTraceback(), mask, MAX, MAX_NUM_MATCHES, MIN, NULL, s_CreateHSP(), BlastGapAlignStruct::score, BlastHSP::score, subject, and UNPACK_BASE.
Referenced by DoAnchoredSearch().
Int2 DoAnchoredSearch | ( | BLAST_SequenceBlk * | query, |
BLAST_SequenceBlk * | subject, | ||
Int4 | word_size, | ||
BlastQueryInfo * | query_info, | ||
BlastGapAlignStruct * | gap_align, | ||
const BlastScoringParameters * | score_params, | ||
const BlastHitSavingParameters * | hit_params, | ||
BlastHSPStream * | hsp_stream | ||
) |
Do a search against a single subject with smaller word size and with no database word frequency filtering, for queries that have partial hits.
The subject is scanned only where one expects to find an exon. This is to find smaller and low complexity exons.
query | Concatenated query [in] |
subject | Subject sequence [in] |
word_size | Minimum word size to use in scanning [in] |
query_info | Query information structure [in] |
gap_align | Data for gapped alignment [in|out] |
score_params | Alignment scoring parameters [in] |
hit_params | Hit saving parameters [in] |
hsp_stream | Queries will be selected based on hits in hsp_stream and new hits will be written to it [in|out] |
Definition at line 4394 of file jumper.c.
References Blast_HSPListFree(), Blast_HSPListNew(), Blast_HSPListSaveHSP(), BLASTERR_MEMORY, BlastHSPStreamWrite(), BlastHSP::context, context, BlastQueryInfo::contexts, BlastHSPWriter::data, DoAnchoredScan(), eMT_Lock, eMT_Unlock, BlastSeg::end, FindPartialyCoveredQueries(), HSPContainer::hsp, HSPChainFree(), HSPChain::hsps, BlastHitSavingOptions::longest_intron, MAX, MT_LOCK_Do, HSPContainer::next, HSPChain::next, NULL, BlastQueryInfo::num_queries, BlastSeg::offset, BlastHSPList::oid, BlastHitSavingParameters::options, BlastHSP::query, query, BlastContextInfo::query_length, BlastContextInfo::query_offset, BlastHSP::subject, subject, BlastHSPStream::writer, and BlastHSPStream::x_lock.
Referenced by BLAST_PreliminarySearchEngine().
Int2 FilterQueriesForMapping | ( | Uint1 * | sequence, |
Int4 | length, | ||
Int4 | offset, | ||
const SReadQualityOptions * | options, | ||
BlastSeqLoc ** | seq_loc | ||
) |
Definition at line 4531 of file jumper.c.
References SReadQualityOptions::frac_ambig, i, offset, s_FindDimerEntropy(), and s_MaskSequence().
Referenced by BlastSetUp_Filter().
GapEditScript* GapEditScriptCombine | ( | GapEditScript ** | edit_script_ptr, |
GapEditScript ** | append_ptr | ||
) |
Definition at line 2895 of file jumper.c.
References append(), GapEditScriptDelete(), i, NULL, GapEditScript::num, GapEditScript::op_type, and GapEditScript::size.
Referenced by s_ExtendAlignment().
Get alignment cutoff score for a given query length.
The function assumes that score for match is 1
Definition at line 4563 of file jumper.c.
Referenced by JumperGoodAlign(), and s_BlastHSPMapperSplicedPairedRun().
JumperEditsBlock* JumperEditsBlockCombine | ( | JumperEditsBlock ** | block_ptr, |
JumperEditsBlock ** | append_ptr | ||
) |
Definition at line 2860 of file jumper.c.
References append(), JumperEditsBlock::edits, i, JumperEditsBlockFree(), NULL, and JumperEditsBlock::num_edits.
Referenced by s_ExtendAlignment().
JumperEditsBlock* JumperEditsBlockDup | ( | const JumperEditsBlock * | block | ) |
Definition at line 2737 of file jumper.c.
References JumperEditsBlock::edits, JumperEditsBlockNew(), NULL, and JumperEditsBlock::num_edits.
Referenced by Blast_HSPClone().
JumperEditsBlock* JumperEditsBlockFree | ( | JumperEditsBlock * | block | ) |
Definition at line 2704 of file jumper.c.
References JumperEditsBlock::edits, NULL, and sfree.
Referenced by BlastHSPMappingInfoFree(), JumperEditsBlockCombine(), JumperEditsBlockNew(), and s_ExtendAlignmentCleanup().
JumperEditsBlock* JumperEditsBlockNew | ( | Int4 | num | ) |
Definition at line 2718 of file jumper.c.
References calloc(), JumperEditsBlock::edits, JumperEditsBlockFree(), NULL, and JumperEditsBlock::num_edits.
Referenced by JumperEditsBlockDup(), JumperFindEdits(), and s_CreateHSPForWordHit().
Int4 JumperExtendLeft | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
Int4 | query_offset, | ||
Int4 | subject_offset, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
int * | query_ext_len, | ||
int * | subject_ext_len, | ||
GapPrelimEditBlock * | edit_script | ||
) |
Definition at line 2354 of file jumper.c.
References ASSERT, JUMP::dcp, JUMP::dcq, eGapAlignDel, eGapAlignIns, eGapAlignSub, GapPrelimEditBlockAdd(), i, int, jumper_default, JUMP::lng, n, JUMP::ok, query, subject, and trace.
Int4 JumperExtendLeftCompressed | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
Int4 | query_offset, | ||
Int4 | subject_offset, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
Uint4 * | table, | ||
Int4 * | query_ext_len, | ||
Int4 * | subject_ext_len, | ||
Int4 * | num_identical | ||
) |
Int4 JumperExtendLeftCompressedWithTraceback | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
Int4 | query_offset, | ||
Int4 | subject_offset, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
Uint4 * | table, | ||
Int4 * | query_ext_len, | ||
Int4 * | subject_ext_len, | ||
JumperPrelimEditBlock * | edit_script, | ||
Int4 * | num_identical, | ||
JUMP * | jumper | ||
) |
Definition at line 1917 of file jumper.c.
References ASSERT, JUMP::dcp, JUMP::dcq, FALSE, i, JUMPER_DELETION, JUMPER_EDIT_BLOCK_ADD, JUMPER_INSERTION, JUMPER_MISMATCH, JUMP::lng, n, JumperPrelimEditBlock::num_allocated, JumperPrelimEditBlock::num_ops, JUMP::ok, query, s_ComputeExtensionScore(), s_TrimExtension(), subject, table, trace, and UNPACK_BASE.
Int4 JumperExtendLeftCompressedWithTracebackOptimal | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
Int4 | query_offset, | ||
Int4 | subject_offset, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
Int4 | x_drop, | ||
Uint4 * | table, | ||
Int4 * | query_ext_len, | ||
Int4 * | subject_ext_len, | ||
JumperPrelimEditBlock * | edit_script, | ||
Int4 * | best_num_identical | ||
) |
Definition at line 2110 of file jumper.c.
References ASSERT, JUMP::dcp, JUMP::dcq, i, jumper_default, JUMPER_DELETION, JUMPER_EDIT_BLOCK_ADD, JUMPER_INSERTION, JUMPER_MISMATCH, JUMP::lng, n, NULL, JumperPrelimEditBlock::num_allocated, JumperPrelimEditBlock::num_ops, JUMP::ok, query, subject, table, trace, and UNPACK_BASE.
Referenced by JumperGappedAlignmentCompressedWithTraceback().
Int4 JumperExtendRight | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
int | query_length, | ||
int | subject_length, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
int * | query_ext_len, | ||
int * | subject_ext_len, | ||
GapPrelimEditBlock * | edit_script, | ||
Boolean | left_extension | ||
) |
Definition at line 1384 of file jumper.c.
References ASSERT, JUMP::dcp, JUMP::dcq, eGapAlignDel, eGapAlignIns, eGapAlignSub, GapPrelimEditBlockAdd(), i, jumper_default, JUMP::lng, n, JUMP::ok, query, subject, and trace.
Int4 JumperExtendRightCompressed | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
int | query_length, | ||
int | subject_length, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
Uint4 * | table, | ||
Int4 * | query_ext_len, | ||
Int4 * | subject_ext_len, | ||
Int4 * | num_identical, | ||
Int4 * | ungapped_ext_len | ||
) |
Int4 JumperExtendRightCompressedWithTraceback | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
int | query_length, | ||
int | subject_length, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
Uint4 * | table, | ||
Int4 * | query_ext_len, | ||
Int4 * | subject_ext_len, | ||
JumperPrelimEditBlock * | edit_script, | ||
Int4 * | num_identical, | ||
Boolean | left_extension, | ||
Int4 * | ungapped_ext_len, | ||
JUMP * | jumper | ||
) |
Definition at line 915 of file jumper.c.
References ASSERT, JUMP::dcp, JUMP::dcq, FALSE, i, JUMPER_DELETION, JUMPER_EDIT_BLOCK_ADD, JUMPER_INSERTION, JUMPER_MISMATCH, JUMP::lng, n, JumperPrelimEditBlock::num_allocated, JumperPrelimEditBlock::num_ops, JUMP::ok, query, s_ComputeExtensionScore(), s_TrimExtension(), subject, table, trace, TRUE, and UNPACK_BASE.
Int4 JumperExtendRightCompressedWithTracebackOptimal | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
int | query_length, | ||
int | subject_length, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
Int4 | x_drop, | ||
Uint4 * | table, | ||
Int4 * | query_ext_len, | ||
Int4 * | subject_ext_len, | ||
JumperPrelimEditBlock * | edit_script, | ||
Int4 * | best_num_identical, | ||
Boolean | left_extension, | ||
Int4 * | ungapped_ext_len | ||
) |
Definition at line 1124 of file jumper.c.
References ASSERT, JUMP::dcp, JUMP::dcq, FALSE, i, jumper_default, JUMPER_DELETION, JUMPER_EDIT_BLOCK_ADD, JUMPER_INSERTION, JUMPER_MISMATCH, JUMP::lng, n, NULL, JumperPrelimEditBlock::num_allocated, JumperPrelimEditBlock::num_ops, ok, JUMP::ok, query, subject, table, trace, TRUE, and UNPACK_BASE.
Referenced by JumperGappedAlignmentCompressedWithTraceback().
Int4 JumperExtendRightWithTraceback | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
int | query_length, | ||
int | subject_length, | ||
Int4 | match_score, | ||
Int4 | mismatch_score, | ||
Int4 | gap_open_score, | ||
Int4 | gap_extend_score, | ||
int | max_mismatches, | ||
int | window, | ||
Int4 * | query_ext_len, | ||
Int4 * | subject_ext_len, | ||
JumperPrelimEditBlock * | edit_script, | ||
Int4 * | num_identical, | ||
Boolean | left_extension, | ||
Int4 * | ungapped_ext_len, | ||
JUMP * | jumper | ||
) |
Right extension with traceback.
Definition at line 1552 of file jumper.c.
References ASSERT, JUMP::dcp, JUMP::dcq, FALSE, i, JUMPER_DELETION, JUMPER_EDIT_BLOCK_ADD, JUMPER_INSERTION, JUMPER_MISMATCH, JUMP::lng, n, JumperPrelimEditBlock::num_allocated, JumperPrelimEditBlock::num_ops, JUMP::ok, query, s_ComputeExtensionScore(), s_TrimExtension(), subject, trace, and TRUE.
Referenced by s_ExtendAlignment().
JumperEditsBlock* JumperFindEdits | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
BlastGapAlignStruct * | gap_align | ||
) |
Definition at line 2755 of file jumper.c.
References ASSERT, JumperPrelimEditBlock::edit_ops, JumperEditsBlock::edits, i, BlastGapAlignStruct::jumper, JUMPER_DELETION, JUMPER_INSERTION, JUMPER_MISMATCH, JumperEditsBlockNew(), JumperGapAlign::left_prelim_block, len, NULL, JumperEditsBlock::num_edits, JumperPrelimEditBlock::num_ops, query, BlastGapAlignStruct::query_start, BlastGapAlignStruct::query_stop, JumperGapAlign::right_prelim_block, subject, BlastGapAlignStruct::subject_start, BlastGapAlignStruct::subject_stop, and UNPACK_BASE.
Referenced by BlastNaExtendJumper(), s_CreateHSP(), s_ExtendAlignment(), and ShortRead_IndexedWordFinder().
int JumperFindSpliceSignals | ( | BlastHSP * | hsp, |
Int4 | query_len, | ||
const Uint1 * | subject, | ||
Int4 | subject_len | ||
) |
Find splice signals at the edges of an HSP and save them in the HSP.
hsp | HSP [in|out] |
query_len | Length of the query/read [in] |
subject | Subject sequence [in] |
subject_len | Subject length [in] |
Definition at line 2947 of file jumper.c.
References BlastSeg::end, BlastHSPMappingInfo::left_edge, BlastHSP::map_info, MAPPER_EXON, BlastSeg::offset, BlastHSP::query, BlastHSPMappingInfo::right_edge, BlastHSP::subject, subject, and UNPACK_BASE.
Referenced by BlastNaExtendJumper(), s_CreateHSP(), s_CreateHSPForWordHit(), and ShortRead_IndexedWordFinder().
JumperGapAlign* JumperGapAlignFree | ( | JumperGapAlign * | jgap_align | ) |
Definition at line 183 of file jumper.c.
References free(), JumperPrelimEditBlockFree(), JumperGapAlign::left_prelim_block, NULL, JumperGapAlign::right_prelim_block, sfree, and JumperGapAlign::table.
Referenced by BLAST_GapAlignStructFree(), and JumperGapAlignNew().
JumperGapAlign* JumperGapAlignNew | ( | Int4 | size | ) |
Definition at line 199 of file jumper.c.
References calloc(), JumperGapAlignFree(), JumperPrelimEditBlockNew(), JumperGapAlign::left_prelim_block, NULL, JumperGapAlign::right_prelim_block, s_CreateTable(), ncbi::grid::netcache::search::fields::size, and JumperGapAlign::table.
Referenced by BLAST_GapAlignStructNew(), and s_ExtendAlignment().
int JumperGappedAlignmentCompressedWithTraceback | ( | const Uint1 * | query, |
const Uint1 * | subject, | ||
Int4 | query_length, | ||
Int4 | subject_length, | ||
Int4 | query_start, | ||
Int4 | subject_start, | ||
BlastGapAlignStruct * | gap_align, | ||
const BlastScoringParameters * | score_params, | ||
Int4 * | num_identical, | ||
Int4 * | right_ungapped_ext_len | ||
) |
Jumper gapped alignment with traceback; 1 base per byte in query, 4 bases per byte in subject.
Definition at line 2512 of file jumper.c.
References ASSERT, COMPRESSION_RATIO, FALSE, BlastScoringParameters::gap_extend, BlastScoringParameters::gap_open, BlastGapAlignStruct::gap_x_dropoff, i, BlastGapAlignStruct::jumper, JUMPER_EDIT_BLOCK_ADD, JumperExtendLeftCompressedWithTracebackOptimal(), JumperExtendRightCompressedWithTracebackOptimal(), JumperPrelimEditBlockFree(), JumperPrelimEditBlockNew(), JumperGapAlign::left_prelim_block, BlastGapAlignStruct::max_mismatches, MIN, BlastGapAlignStruct::mismatch_window, JumperPrelimEditBlock::num_allocated, BlastScoringParameters::penalty, query, BlastGapAlignStruct::query_start, BlastGapAlignStruct::query_stop, BlastScoringParameters::reward, JumperGapAlign::right_prelim_block, s_ResetJumperPrelimEditBlocks(), BlastGapAlignStruct::score, subject, BlastGapAlignStruct::subject_start, BlastGapAlignStruct::subject_stop, JumperGapAlign::table, and TRUE.
Referenced by BlastNaExtendJumper(), DoAnchoredScan(), and ShortRead_IndexedWordFinder().
Boolean JumperGoodAlign | ( | const BlastGapAlignStruct * | gap_align, |
const BlastHitSavingParameters * | hit_params, | ||
Int4 | num_identical, | ||
BlastContextInfo * | context_info | ||
) |
Test whether an HSP should be saved.
Definition at line 2650 of file jumper.c.
References BlastHitSavingOptions::cutoff_score, BlastHitSavingOptions::cutoff_score_fun, FALSE, GetCutoffScore(), MAX, BlastHitSavingOptions::max_edit_distance, BlastHitSavingParameters::options, BlastHitSavingOptions::percent_identity, BlastContextInfo::query_length, BlastGapAlignStruct::query_start, BlastGapAlignStruct::query_stop, BlastGapAlignStruct::score, BlastHitSavingOptions::splice, BlastGapAlignStruct::subject_start, BlastGapAlignStruct::subject_stop, and TRUE.
Referenced by BlastNaExtendJumper(), and ShortRead_IndexedWordFinder().
Int4 JumperPrelimEditBlockAdd | ( | JumperPrelimEditBlock * | block, |
JumperOpType | op | ||
) |
Definition at line 139 of file jumper.c.
References JumperPrelimEditBlock::edit_ops, JumperPrelimEditBlock::num_allocated, and JumperPrelimEditBlock::num_ops.
Referenced by s_ExtendAlignment(), and s_ShiftGapsRight().
|
static |
Definition at line 125 of file jumper.c.
References JumperPrelimEditBlock::edit_ops, free(), and NULL.
Referenced by JumperGapAlignFree(), JumperGappedAlignmentCompressedWithTraceback(), and s_ShiftGaps().
|
static |
Definition at line 108 of file jumper.c.
References calloc(), JumperPrelimEditBlock::edit_ops, free(), NULL, JumperPrelimEditBlock::num_allocated, and ncbi::grid::netcache::search::fields::size.
Referenced by JumperGapAlignNew(), JumperGappedAlignmentCompressedWithTraceback(), and s_ShiftGaps().
GapEditScript* JumperPrelimEditBlockToGapEditScript | ( | JumperPrelimEditBlock * | rev_prelim_block, |
JumperPrelimEditBlock * | fwd_prelim_block | ||
) |
Convert Jumper's preliminary edit script to GapEditScript.
Definition at line 610 of file jumper.c.
References JumperPrelimEditBlock::edit_ops, GapEditScriptNew(), i, JOP_TO_NUM, JOP_TO_OP, NULL, GapEditScript::num, JumperPrelimEditBlock::num_ops, GapEditScript::op_type, and ncbi::grid::netcache::search::fields::size.
Referenced by BlastNaExtendJumper(), s_CreateHSP(), s_ExtendAlignment(), and ShortRead_IndexedWordFinder().
Definition at line 3064 of file jumper.c.
References a, b, first(), BlastOffsetPair::q_off, BlastOffsetPair::qs_offsets, and BlastOffsetPair::s_off.
Referenced by BlastNaExtendJumper().
|
static |
Definition at line 693 of file jumper.c.
References JumperPrelimEditBlock::edit_ops, i, and JumperPrelimEditBlock::num_ops.
Referenced by JumperExtendLeftCompressedWithTraceback(), JumperExtendRightCompressedWithTraceback(), and JumperExtendRightWithTraceback().
|
static |
Definition at line 3188 of file jumper.c.
References Blast_HSPInit(), BlastHSPMappingInfoNew(), context, BlastQueryInfo::contexts, BlastGapAlignStruct::edit_script, BlastHSPMappingInfo::edits, BlastHSP::evalue, BlastContextInfo::frame, BlastGapAlignStruct::jumper, JumperFindEdits(), JumperFindSpliceSignals(), JumperPrelimEditBlockToGapEditScript(), JumperGapAlign::left_prelim_block, BlastHSP::map_info, NULL, BlastHSP::num_ident, BlastHitSavingParameters::options, BlastScoringParameters::penalty, BlastGapAlignStruct::query_start, BlastGapAlignStruct::query_stop, JumperGapAlign::right_prelim_block, s_SaveSubjectOverhangs(), s_ShiftGaps(), BlastGapAlignStruct::score, BlastHitSavingOptions::splice, subject, BlastGapAlignStruct::subject_start, and BlastGapAlignStruct::subject_stop.
Referenced by DoAnchoredScan().
|
static |
Definition at line 3098 of file jumper.c.
References ASSERT, Blast_HSPFree(), Blast_HSPInit(), BlastHSPMappingInfoNew(), context, BlastQueryInfo::contexts, BlastHSPMappingInfo::edits, JumperEditsBlock::edits, eGapAlignSub, BlastHSP::evalue, BlastContextInfo::frame, GapEditScriptDelete(), GapEditScriptNew(), i, JumperEditsBlockNew(), JumperFindSpliceSignals(), BlastHSP::map_info, NULL, GapEditScript::num, JumperEditsBlock::num_edits, BlastHSP::num_ident, GapEditScript::op_type, query, s_SaveSubjectOverhangs(), subject, and UNPACK_BASE.
Referenced by BlastNaExtendJumper().
Definition at line 4482 of file jumper.c.
References i, log, and NUM_DIMERS.
Referenced by FilterQueriesForMapping().
|
static |
Definition at line 245 of file jumper.c.
References ASSERT, JumperPrelimEditBlock::edit_ops, JUMPER_DELETION, JUMPER_INSERTION, and JUMPER_MISMATCH.
Referenced by s_ShiftGapsRight().
|
static |
Definition at line 4513 of file jumper.c.
References BLASTERR_MEMORY, calloc(), free(), SSeqRange::left, offset, SSeqRange::right, and BlastSeqLoc::ssr.
Referenced by FilterQueriesForMapping().
|
static |
Definition at line 229 of file jumper.c.
References JumperPrelimEditBlock::num_ops.
Referenced by JumperGappedAlignmentCompressedWithTraceback().
Definition at line 2995 of file jumper.c.
References calloc(), BlastSeg::end, i, SequenceOverhangs::left, SequenceOverhangs::left_len, len, BlastHSP::map_info, MAX, MIN, NULL, BlastSeg::offset, BlastHSP::query, SequenceOverhangs::right, SequenceOverhangs::right_len, SequenceOverhangsFree(), BlastHSP::subject, subject, BlastHSPMappingInfo::subject_overhangs, and UNPACK_BASE.
Referenced by BlastNaExtendJumper(), s_CreateHSP(), and s_CreateHSPForWordHit().
|
static |
Definition at line 457 of file jumper.c.
References JumperPrelimEditBlock::edit_ops, i, BlastGapAlignStruct::jumper, JUMPER_DELETION, JUMPER_EDIT_BLOCK_ADD, JumperPrelimEditBlockFree(), JumperPrelimEditBlockNew(), JumperGapAlign::left_prelim_block, JumperPrelimEditBlock::num_allocated, JumperPrelimEditBlock::num_ops, query, BlastGapAlignStruct::query_start, BlastGapAlignStruct::query_stop, JumperGapAlign::right_prelim_block, s_ShiftGapsRight(), BlastGapAlignStruct::score, subject, BlastGapAlignStruct::subject_start, and BlastGapAlignStruct::subject_stop.
Referenced by BlastNaExtendJumper(), and s_CreateHSP().
|
static |
Definition at line 286 of file jumper.c.
References ASSERT, b, JumperPrelimEditBlock::edit_ops, i, JUMPER_MISMATCH, JumperPrelimEditBlockAdd(), JumperPrelimEditBlock::num_ops, query, s_GetSeqPositions(), subject, tmp, and UNPACK_BASE.
Referenced by s_ShiftGaps().
|
static |
Definition at line 3843 of file jumper.c.
References free(), BlastSeqLoc::next, BLAST_SequenceBlk::sequence, BlastSeqLoc::ssr, and SubjectIndexFree().
Referenced by SubjectIndexNew().
|
static |
Definition at line 519 of file jumper.c.
References ASSERT, JumperPrelimEditBlock::edit_ops, eGapAlignDel, eGapAlignIns, eGapAlignSub, JOP_TO_OP, and JumperPrelimEditBlock::num_ops.
Referenced by JumperExtendLeftCompressedWithTraceback(), JumperExtendRightCompressedWithTraceback(), and JumperExtendRightWithTraceback().
SequenceOverhangs* SequenceOverhangsFree | ( | SequenceOverhangs * | overhangs | ) |
Definition at line 2976 of file jumper.c.
References SequenceOverhangs::left, NULL, SequenceOverhangs::right, and sfree.
Referenced by Blast_HSPClone(), BlastHSPMappingInfoFree(), and s_SaveSubjectOverhangs().
SubjectIndex* SubjectIndexFree | ( | SubjectIndex * | sindex | ) |
Free subject index structure.
Definition at line 3822 of file jumper.c.
References BlastNaLookupTableDestruct(), free(), i, SubjectIndex::lookups, NULL, and SubjectIndex::num_lookups.
Referenced by JumperNaWordFinder(), and s_SubjectIndexNewCleanup().
SubjectIndexIterator* SubjectIndexIteratorFree | ( | SubjectIndexIterator * | it | ) |
Free memory reserved for subject index word iterator.
Definition at line 3972 of file jumper.c.
Referenced by BlastNaExtendJumper(), and SubjectIndexIteratorNew().
SubjectIndexIterator* SubjectIndexIteratorNew | ( | SubjectIndex * | s_index, |
Int4 | word, | ||
Int4 | from, | ||
Int4 | to | ||
) |
Create an iterator for locations of a given word.
s_index | Sequence index [in] |
word | Nucleotide word to be searched [in] |
from | Sequence location to begin search [in] |
to | Sequence location to end search [in] |
Definition at line 3983 of file jumper.c.
References ASSERT, calloc(), lookup(), SubjectIndexIterator::lookup_index, SubjectIndexIterator::lookup_pos, SubjectIndex::lookups, NA_HITS_PER_CELL, NULL, SubjectIndex::num_lookups, SubjectIndexIterator::num_words, SubjectIndexIterator::subject_index, SubjectIndexIteratorFree(), SubjectIndexIterator::to, SubjectIndex::width, SubjectIndexIterator::word, and SubjectIndexIterator::word_index.
Referenced by BlastNaExtendJumper().
Int4 SubjectIndexIteratorNext | ( | SubjectIndexIterator * | it | ) |
Return the next location of a word in an indexed sequence.
it | Iterator [in|out] |
Definition at line 4045 of file jumper.c.
References ASSERT, lookup(), SubjectIndexIterator::lookup_index, SubjectIndexIterator::lookup_pos, SubjectIndex::lookups, NA_HITS_PER_CELL, NULL, SubjectIndex::num_lookups, SubjectIndexIterator::num_words, SubjectIndexIterator::subject_index, SubjectIndexIterator::to, SubjectIndexIterator::word, and SubjectIndexIterator::word_index.
Referenced by BlastNaExtendJumper().
Int4 SubjectIndexIteratorPrev | ( | SubjectIndexIterator * | it | ) |
Return the previous location of a word in an indexed sequence.
it | Iterator [in|out] |
Definition at line 4094 of file jumper.c.
References ASSERT, lookup(), SubjectIndexIterator::lookup_index, SubjectIndexIterator::lookup_pos, SubjectIndex::lookups, NA_HITS_PER_CELL, NULL, SubjectIndexIterator::num_words, SubjectIndexIterator::subject_index, SubjectIndexIterator::word, and SubjectIndexIterator::word_index.
Referenced by BlastNaExtendJumper().
SubjectIndex* SubjectIndexNew | ( | BLAST_SequenceBlk * | subject, |
Int4 | width, | ||
Int4 | word_size | ||
) |
Index a sequence, used for indexing compressed nucleotide subject sequence.
The index consists of a list of lookup tables, each covering width number of bases.
subject | Sequence to be indexed [in] |
width | Number of bases covered by a single lookup table [in] |
word_size | Word size to be used in the lookup table [in] |
Definition at line 3874 of file jumper.c.
References ASSERT, BlastNaLookupTableNew(), calloc(), free(), i, SSeqRange::left, SubjectIndex::lookups, malloc(), MIN, NULL, SubjectIndex::num_lookups, SSeqRange::right, s_SubjectIndexNewCleanup(), BLAST_SequenceBlk::sequence, BlastSeqLoc::ssr, subject, SubjectIndex::width, and LookupTableOptions::word_size.
Referenced by JumperNaWordFinder().
JUMP jumper_default[] |
Definition at line 41 of file jumper.c.
Referenced by JumperExtendLeft(), JumperExtendLeftCompressed(), JumperExtendLeftCompressedWithTracebackOptimal(), JumperExtendRight(), JumperExtendRightCompressed(), and JumperExtendRightCompressedWithTracebackOptimal().
JUMP jumper_edge[] |