NCBI C++ ToolKit
Macros | Functions | Variables
jumper.c File Reference
#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"
+ Include dependency graph for jumper.c:

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 JumperPrelimEditBlockJumperPrelimEditBlockNew (Int4 size)
 
static JumperPrelimEditBlockJumperPrelimEditBlockFree (JumperPrelimEditBlock *block)
 
Int4 JumperPrelimEditBlockAdd (JumperPrelimEditBlock *block, JumperOpType op)
 
static void s_CreateTable (Uint4 *table)
 
JumperGapAlignJumperGapAlignFree (JumperGapAlign *jgap_align)
 
JumperGapAlignJumperGapAlignNew (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)
 
GapEditScriptJumperPrelimEditBlockToGapEditScript (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...
 
JumperEditsBlockJumperEditsBlockFree (JumperEditsBlock *block)
 
JumperEditsBlockJumperEditsBlockNew (Int4 num)
 
JumperEditsBlockJumperEditsBlockDup (const JumperEditsBlock *block)
 
JumperEditsBlockJumperFindEdits (const Uint1 *query, const Uint1 *subject, BlastGapAlignStruct *gap_align)
 
JumperEditsBlockJumperEditsBlockCombine (JumperEditsBlock **block_ptr, JumperEditsBlock **append_ptr)
 
GapEditScriptGapEditScriptCombine (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...
 
SequenceOverhangsSequenceOverhangsFree (SequenceOverhangs *overhangs)
 
static Int4 s_SaveSubjectOverhangs (BlastHSP *hsp, Uint1 *subject, Int4 query_len)
 
static int s_CompareOffsetPairsByDiagQuery (const void *a, const void *b)
 
static BlastHSPs_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 BlastHSPs_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...
 
SubjectIndexSubjectIndexFree (SubjectIndex *sindex)
 Free subject index structure. More...
 
static void s_SubjectIndexNewCleanup (BLAST_SequenceBlk *sequence, BlastSeqLoc *seqloc, LookupTableOptions *opt, QuerySetUpOptions *query_opt, SubjectIndex *sindex)
 
SubjectIndexSubjectIndexNew (BLAST_SequenceBlk *subject, Int4 width, Int4 word_size)
 Index a sequence, used for indexing compressed nucleotide subject sequence. More...
 
SubjectIndexIteratorSubjectIndexIteratorFree (SubjectIndexIterator *it)
 Free memory reserved for subject index word iterator. More...
 
SubjectIndexIteratorSubjectIndexIteratorNew (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 []
 

Macro Definition Documentation

◆ GET_BASE

#define GET_BASE (   seq,
  pos,
  compressed 
)    (compressed ? NCBI2NA_UNPACK_BASE(seq[pos >> 2], 3 - (pos & 3)) : seq[pos])

Definition at line 89 of file jumper.c.

◆ JOP_TO_NUM

#define JOP_TO_NUM (   op)    (op > 0 ? op : 1)

Definition at line 105 of file jumper.c.

◆ JOP_TO_OP

#define JOP_TO_OP (   op)    (op >= 0 ? eGapAlignSub : (op == JUMPER_INSERTION ? eGapAlignIns : eGapAlignDel))

Definition at line 102 of file jumper.c.

◆ JUMPER_EDIT_BLOCK_ADD

#define JUMPER_EDIT_BLOCK_ADD (   block,
  op 
)    ((block)->edit_ops[(block)->num_ops++] = op)

Definition at line 98 of file jumper.c.

◆ MAX_NUM_MATCHES

#define MAX_NUM_MATCHES   10

Definition at line 4137 of file jumper.c.

◆ NUM_DIMERS

#define NUM_DIMERS   (1 << 4)

Definition at line 4479 of file jumper.c.

◆ NUM_SIGNALS

#define NUM_SIGNALS   8

Definition at line 2943 of file jumper.c.

◆ UNPACK_BASE

#define UNPACK_BASE (   seq,
  pos 
)    (NCBI2NA_UNPACK_BASE((seq)[(pos) / 4], 3 - ((pos) & 3)))

Definition at line 95 of file jumper.c.

◆ UNPACK_BASE_OLD

#define UNPACK_BASE_OLD (   seq,
  pos 
)    ((((seq)[(pos) >> 2] << (2 * ((pos) & 3))) & 0xC0) >> 6)

Definition at line 92 of file jumper.c.

Function Documentation

◆ BlastNaExtendJumper()

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().

◆ DoAnchoredScan()

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 
)
static

◆ 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.

Parameters
queryConcatenated query [in]
subjectSubject sequence [in]
word_sizeMinimum word size to use in scanning [in]
query_infoQuery information structure [in]
gap_alignData for gapped alignment [in|out]
score_paramsAlignment scoring parameters [in]
hit_paramsHit saving parameters [in]
hsp_streamQueries will be selected based on hits in hsp_stream and new hits will be written to it [in|out]
Returns
Status

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().

◆ FilterQueriesForMapping()

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().

◆ GapEditScriptCombine()

GapEditScript* GapEditScriptCombine ( GapEditScript **  edit_script_ptr,
GapEditScript **  append_ptr 
)

◆ GetCutoffScore()

Int4 GetCutoffScore ( Int4  query_length)

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().

◆ JumperEditsBlockCombine()

JumperEditsBlock* JumperEditsBlockCombine ( JumperEditsBlock **  block_ptr,
JumperEditsBlock **  append_ptr 
)

◆ JumperEditsBlockDup()

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().

◆ JumperEditsBlockFree()

JumperEditsBlock* JumperEditsBlockFree ( JumperEditsBlock block)

◆ JumperEditsBlockNew()

JumperEditsBlock* JumperEditsBlockNew ( Int4  num)

◆ JumperExtendLeft()

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 
)

◆ JumperExtendLeftCompressed()

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 
)

Definition at line 1749 of file jumper.c.

References JUMP::dcp, JUMP::dcq, i, jumper_default, JUMP::lng, n, NULL, JUMP::ok, query, subject, table, trace, and UNPACK_BASE.

◆ JumperExtendLeftCompressedWithTraceback()

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 
)

◆ JumperExtendLeftCompressedWithTracebackOptimal()

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 
)

◆ JumperExtendRight()

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 
)

◆ JumperExtendRightCompressed()

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 
)

Definition at line 734 of file jumper.c.

References JUMP::dcp, JUMP::dcq, FALSE, i, jumper_default, JUMP::lng, n, NULL, JUMP::ok, query, subject, table, trace, TRUE, and UNPACK_BASE.

◆ JumperExtendRightCompressedWithTraceback()

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 
)

◆ JumperExtendRightCompressedWithTracebackOptimal()

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 
)

◆ JumperExtendRightWithTraceback()

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 
)

◆ JumperFindEdits()

JumperEditsBlock* JumperFindEdits ( const Uint1 query,
const Uint1 subject,
BlastGapAlignStruct gap_align 
)

◆ JumperFindSpliceSignals()

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.

Parameters
hspHSP [in|out]
query_lenLength of the query/read [in]
subjectSubject sequence [in]
subject_lenSubject length [in]
Returns
Zero on success

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().

◆ JumperGapAlignFree()

JumperGapAlign* JumperGapAlignFree ( JumperGapAlign jgap_align)

◆ JumperGapAlignNew()

JumperGapAlign* JumperGapAlignNew ( Int4  size)

◆ JumperGappedAlignmentCompressedWithTraceback()

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 
)

◆ JumperGoodAlign()

Boolean JumperGoodAlign ( const BlastGapAlignStruct gap_align,
const BlastHitSavingParameters hit_params,
Int4  num_identical,
BlastContextInfo context_info 
)

◆ JumperPrelimEditBlockAdd()

Int4 JumperPrelimEditBlockAdd ( JumperPrelimEditBlock block,
JumperOpType  op 
)

◆ JumperPrelimEditBlockFree()

static JumperPrelimEditBlock* JumperPrelimEditBlockFree ( JumperPrelimEditBlock block)
static

◆ JumperPrelimEditBlockNew()

static JumperPrelimEditBlock* JumperPrelimEditBlockNew ( Int4  size)
static

◆ JumperPrelimEditBlockToGapEditScript()

GapEditScript* JumperPrelimEditBlockToGapEditScript ( JumperPrelimEditBlock rev_prelim_block,
JumperPrelimEditBlock fwd_prelim_block 
)

◆ s_CompareOffsetPairsByDiagQuery()

static int s_CompareOffsetPairsByDiagQuery ( const void *  a,
const void *  b 
)
static

◆ s_ComputeExtensionScore()

static Int4 s_ComputeExtensionScore ( JumperPrelimEditBlock edit_script,
Int4  match_score,
Int4  mismatch_score,
Int4  gap_open_score,
Int4  gap_extend_score 
)
static

◆ s_CreateHSP()

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 
)
static

◆ s_CreateHSPForWordHit()

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

◆ s_CreateTable()

static void s_CreateTable ( Uint4 table)
static

Definition at line 164 of file jumper.c.

References ASSERT, i, and table.

Referenced by JumperGapAlignNew().

◆ s_FindDimerEntropy()

static Int4 s_FindDimerEntropy ( Uint1 sequence,
Int4  length 
)
static

Definition at line 4482 of file jumper.c.

References i, log, and NUM_DIMERS.

Referenced by FilterQueriesForMapping().

◆ s_GetSeqPositions()

static int s_GetSeqPositions ( JumperPrelimEditBlock edit_script,
Int4  edit_index,
Int4 query_pos,
Int4 subject_pos 
)
static

◆ s_MaskSequence()

static Int2 s_MaskSequence ( Int4  offset,
Int4  length,
BlastSeqLoc **  seq_locs 
)
static

◆ s_ResetJumperPrelimEditBlocks()

static void s_ResetJumperPrelimEditBlocks ( JumperPrelimEditBlock left,
JumperPrelimEditBlock right 
)
static

Definition at line 229 of file jumper.c.

References JumperPrelimEditBlock::num_ops.

Referenced by JumperGappedAlignmentCompressedWithTraceback().

◆ s_SaveSubjectOverhangs()

static Int4 s_SaveSubjectOverhangs ( BlastHSP hsp,
Uint1 subject,
Int4  query_len 
)
static

◆ s_ShiftGaps()

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

◆ s_ShiftGapsRight()

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

◆ s_SubjectIndexNewCleanup()

static void s_SubjectIndexNewCleanup ( BLAST_SequenceBlk sequence,
BlastSeqLoc seqloc,
LookupTableOptions opt,
QuerySetUpOptions query_opt,
SubjectIndex sindex 
)
static

◆ s_TrimExtension()

static void s_TrimExtension ( JumperPrelimEditBlock jops,
int  margin,
const Uint1 **  cp,
Int4 cq,
Int4 num_identical,
Boolean  is_right_ext 
)
static

◆ SequenceOverhangsFree()

SequenceOverhangs* SequenceOverhangsFree ( SequenceOverhangs overhangs)

◆ SubjectIndexFree()

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().

◆ SubjectIndexIteratorFree()

SubjectIndexIterator* SubjectIndexIteratorFree ( SubjectIndexIterator it)

Free memory reserved for subject index word iterator.

Definition at line 3972 of file jumper.c.

References free(), and NULL.

Referenced by BlastNaExtendJumper(), and SubjectIndexIteratorNew().

◆ SubjectIndexIteratorNew()

SubjectIndexIterator* SubjectIndexIteratorNew ( SubjectIndex s_index,
Int4  word,
Int4  from,
Int4  to 
)

Create an iterator for locations of a given word.

Parameters
s_indexSequence index [in]
wordNucleotide word to be searched [in]
fromSequence location to begin search [in]
toSequence location to end search [in]
Returns
Word location iterator

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().

◆ SubjectIndexIteratorNext()

Int4 SubjectIndexIteratorNext ( SubjectIndexIterator it)

Return the next location of a word in an indexed sequence.

Parameters
itIterator [in|out]
Returns
Word location or value less than zero if no more words are found

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().

◆ SubjectIndexIteratorPrev()

Int4 SubjectIndexIteratorPrev ( SubjectIndexIterator it)

Return the previous location of a word in an indexed sequence.

Parameters
itIterator [in|out]
Returns
Word location or value less than zero if no more words are found

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().

◆ SubjectIndexNew()

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.

Parameters
subjectSequence to be indexed [in]
widthNumber of bases covered by a single lookup table [in]
word_sizeWord size to be used in the lookup table [in]
Returns
Pointer to the created index

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().

Variable Documentation

◆ jumper_default

JUMP jumper_default[]
Initial value:
= {
{1, 1, 9, 0},
{1, 0, 10, 0},
{0, 1, 10, 0},
{2, 0, 10, 0},
{0, 2, 10, 0},
{3, 0, 13, 0},
{0, 3, 13, 0},
{2, 2, 12, 0},
{1, 0, 10, 2},
{0, 1, 10, 2},
{2, 0, 10, 2},
{0, 2, 10, 2},
{3, 0, 13, 2},
{0, 3, 13, 2},
{1, 1, 0, 0}
}

Definition at line 41 of file jumper.c.

Referenced by JumperExtendLeft(), JumperExtendLeftCompressed(), JumperExtendLeftCompressedWithTracebackOptimal(), JumperExtendRight(), JumperExtendRightCompressed(), and JumperExtendRightCompressedWithTracebackOptimal().

◆ jumper_edge

JUMP jumper_edge[]
Initial value:
= {
{1, 0, 6, 0},
{0, 1, 6, 0},
{1, 0, 2, 0},
{0, 1, 2, 0},
{1, 1, 0, 0}
}

Definition at line 75 of file jumper.c.

◆ jumper_ungapped

JUMP jumper_ungapped[]
Initial value:
= {
{1, 1, 0, 0}
}

Definition at line 84 of file jumper.c.

Modified on Fri Sep 20 14:57:22 2024 by modify_doxy.py rev. 669887