1
/* $Id: blast_kappa.c,v 1.100 2010/07/30 17:44:35 kazimird Exp $
1
/* $Id: blast_kappa.c,v 1.110 2011/05/31 16:09:30 kazimird Exp $
2
2
* ==========================================================================
4
4
* PUBLIC DOMAIN NOTICE
35
35
#ifndef SKIP_DOXYGEN_PROCESSING
36
36
static char const rcsid[] =
37
"$Id: blast_kappa.c,v 1.100 2010/07/30 17:44:35 kazimird Exp $";
37
"$Id: blast_kappa.c,v 1.110 2011/05/31 16:09:30 kazimird Exp $";
38
38
#endif /* SKIP_DOXYGEN_PROCESSING */
402
402
hitParams->link_hsp_params, TRUE);
405
Blast_HSPListGetEvalues(queryInfo, hsp_list, TRUE, sbp,
405
Blast_HSPListGetEvalues(queryInfo, subject_length, hsp_list, TRUE, FALSE, sbp,
406
406
0.0, /* use a non-zero gap decay
407
407
only when linking HSPs */
408
408
1.0); /* Use scaling factor equal to
1467
1467
/* We must recompute the start for the gapped alignment, as the
1468
1468
one in the HSP was unacceptable.*/
1470
BlastGetStartForGappedAlignment(query_data->data,
1470
BlastGetOffsetsForGappedAlignment(query_data->data,
1471
1471
subject_data->data, sbp,
1475
hsp->subject.offset,
1477
hsp->subject.offset);
1479
(hsp->subject.offset - hsp->query.offset) + q_start;
1475
/* ASSERT(retval == TRUE); */
1476
if (retval == FALSE)
1481
1479
/* Undo the shift so there is no side effect on the incoming HSP
2059
2057
p-value is desired; value needs to be passed in eventually*/
2060
2058
int compositionTestIndex = extendParams->options->unifiedP;
2061
2059
Uint1* genetic_code_string = GenCodeSingletonFind(default_db_genetic_code);
2060
Boolean perform_partial_fetch = BlastSeqSrcGetSupportsPartialFetching(seqSrc);
2063
2062
ASSERT(program_number == eBlastTypeBlastp ||
2064
2063
program_number == eBlastTypeTblastn ||
2195
2194
if (BlastCompo_EarlyTermination(thisMatch->best_evalue,
2196
2195
redoneMatches, numQueries)) {
2196
Blast_HSPListFree(thisMatch);
2199
2199
/* Get the sequence for this match */
2200
if (perform_partial_fetch) {
2202
Int4 oid = thisMatch->oid;
2204
BlastHSPRangeList *range_list = NULL;
2205
BlastSeqSrcSetRangesArg *arg = NULL;
2207
ASSERT(Blast_SubjectIsTranslated(program_number));
2208
for (i=0; i<thisMatch->hspcnt; i++) {
2209
BlastHSP *hsp = thisMatch->hsp_array[i];
2210
Int4 begin = (hsp->subject.offset - 2) * CODON_LENGTH;
2211
Int4 end = (hsp->subject.end + 2) * CODON_LENGTH;
2212
if (hsp->subject.frame < 0) {
2213
Int4 len = BlastSeqSrcGetSeqLen(seqSrc, &oid);
2214
Int4 begin_new = len - end;
2218
range_list = BlastHSPRangeListAddRange(range_list, begin, end);
2220
arg = BlastSeqSrcSetRangesArgNew(thisMatch->hspcnt);
2223
BlastHSPRangeBuildSetRangesArg(range_list, arg);
2224
BlastSeqSrcSetSeqRanges(seqSrc, arg);
2225
BlastHSPRangeListFree(range_list);
2226
BlastSeqSrcSetRangesArgFree(arg);
2201
2230
s_MatchingSequenceInitialize(&matchingSeq, program_number,
2202
2231
seqSrc, default_db_genetic_code,