~ubuntu-branches/ubuntu/raring/ncbi-tools6/raring

« back to all changes in this revision

Viewing changes to algo/blast/core/blast_kappa.c

  • Committer: Package Import Robot
  • Author(s): Aaron M. Ucko
  • Date: 2011-09-05 18:55:02 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: package-import@ubuntu.com-20110905185502-iuvmoe65ytljhckn
Tags: 6.1.20110713-1
* New upstream release.
* debian/*.symbols: update accordingly.
* make/makeshlb.unx: link libcn3dOGL.so against -lm for sqrt.
* doc/man/*.1: update for new release.
* debian/rules:
  - (VIB): add asnmacro, as upstream takes care to publish binaries thereof.
  - Retire obsolete multiarch-unaware checks for libpthread.
  - Fully modernize Debhelper usage; in particular, transition to overrides.
* debian/compat: advance to 9 per rules modernization.
* debian/ncbi-tools-bin.install: add asnmacro.
* make/makenet.unx: link asnmacro only against libraries it directly needs.
* doc/man/asnmacro.1: give asnmacro a man page.
* doc/man/Psequin.1: list it in SEE ALSO.
* network/id1arch/idfetch.c: revert redundant change (from #295110).
* Convert to multiarch.
  - debian/rules: Install libraries (and ncbithr.o) to multiarch directories.
  - debian/lib*.install: match multiarch library paths.
  - debian/control:
    + Build-Depends: debhelper (>= 8.1.3~), implying a recent dpkg-dev.
    + Set Multi-Arch: as appropriate across the board, and specify
      Pre-Depends: ${misc:Pre-Depends} for runtime libraries.
* debian/*.lintian-overrides: drop leading slashes for Lintian 2.5.x.
* debian/control: Standards-Version: 3.9.2 (already compliant).

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 * ==========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
34
34
 
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 */
39
39
 
40
40
#include <float.h>
402
402
                                hitParams->link_hsp_params, TRUE);
403
403
    } else {
404
404
        status =
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
1466
1466
    } else {
1467
1467
        /* We must recompute the start for the gapped alignment, as the
1468
1468
           one in the HSP was unacceptable.*/
1469
 
        q_start =
1470
 
            BlastGetStartForGappedAlignment(query_data->data,
 
1469
        Boolean retval =
 
1470
            BlastGetOffsetsForGappedAlignment(query_data->data,
1471
1471
                                            subject_data->data, sbp,
1472
 
                                            hsp->query.offset,
1473
 
                                            hsp->query.end -
1474
 
                                            hsp->query.offset,
1475
 
                                            hsp->subject.offset,
1476
 
                                            hsp->subject.end -
1477
 
                                            hsp->subject.offset);
1478
 
        s_start =
1479
 
            (hsp->subject.offset - hsp->query.offset) + q_start;
 
1472
                                            hsp,
 
1473
                                            &q_start, 
 
1474
                                            &s_start);
 
1475
        /* ASSERT(retval == TRUE); */
 
1476
        if (retval == FALSE)
 
1477
           return NULL;
1480
1478
    }
1481
1479
    /* Undo the shift so there is no side effect on the incoming HSP
1482
1480
       list. */
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);
2062
2061
 
2063
2062
    ASSERT(program_number == eBlastTypeBlastp ||
2064
2063
           program_number == eBlastTypeTblastn ||
2194
2193
        }
2195
2194
        if (BlastCompo_EarlyTermination(thisMatch->best_evalue,
2196
2195
                                        redoneMatches, numQueries)) {
 
2196
            Blast_HSPListFree(thisMatch);
2197
2197
            break;
2198
2198
        }
2199
2199
        /* Get the sequence for this match */
 
2200
        if (perform_partial_fetch) {
 
2201
            
 
2202
            Int4 oid = thisMatch->oid;
 
2203
            Int4 i;
 
2204
            BlastHSPRangeList *range_list = NULL;
 
2205
            BlastSeqSrcSetRangesArg *arg = NULL;
 
2206
 
 
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;
 
2215
                    end = len - begin;
 
2216
                    begin = begin_new;
 
2217
                }
 
2218
                range_list = BlastHSPRangeListAddRange(range_list, begin, end);
 
2219
            }
 
2220
            arg = BlastSeqSrcSetRangesArgNew(thisMatch->hspcnt);
 
2221
            arg->oid = oid;
 
2222
            
 
2223
            BlastHSPRangeBuildSetRangesArg(range_list, arg);
 
2224
            BlastSeqSrcSetSeqRanges(seqSrc, arg);
 
2225
            BlastHSPRangeListFree(range_list);
 
2226
            BlastSeqSrcSetRangesArgFree(arg);
 
2227
        }
 
2228
 
2200
2229
        status_code =
2201
2230
            s_MatchingSequenceInitialize(&matchingSeq, program_number,
2202
2231
                                         seqSrc, default_db_genetic_code,