~ubuntu-branches/ubuntu/precise/ncbi-tools6/precise

« back to all changes in this revision

Viewing changes to algo/blast/api/blast_tback.c

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2005-03-27 12:00:15 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050327120015-embhesp32nj73p9r
Tags: 6.1.20041020-3
* Fix FTBFS under GCC 4.0 caused by inconsistent use of "static" on
  functions.  (Closes: #295110.)
* Add a watch file, now that we can.  (Upstream's layout needs version=3.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: blast_tback.c,v 1.1 2004/10/06 19:03:15 dondosha Exp $
 
2
 * ===========================================================================
 
3
 *
 
4
 *                            PUBLIC DOMAIN NOTICE
 
5
 *               National Center for Biotechnology Information
 
6
 *
 
7
 *  This software/database is a "United States Government Work" under the
 
8
 *  terms of the United States Copyright Act.  It was written as part of
 
9
 *  the author's offical duties as a United States Government employee and
 
10
 *  thus cannot be copyrighted.  This software/database is freely available
 
11
 *  to the public for use. The National Library of Medicine and the U.S.
 
12
 *  Government have not placed any restriction on its use or reproduction.
 
13
 *
 
14
 *  Although all reasonable efforts have been taken to ensure the accuracy
 
15
 *  and reliability of the software and data, the NLM and the U.S.
 
16
 *  Government do not and cannot warrant the performance or results that
 
17
 *  may be obtained by using this software or data. The NLM and the U.S.
 
18
 *  Government disclaim all warranties, express or implied, including
 
19
 *  warranties of performance, merchantability or fitness for any particular
 
20
 *  purpose.
 
21
 *
 
22
 *  Please cite the author in any work or product based on this material.
 
23
 *
 
24
 * ===========================================================================
 
25
 *
 
26
 * Author: Ilya Dondoshansky
 
27
 *
 
28
 */
 
29
 
 
30
/** @file blast_tback.c
 
31
 * API level functions to perform the traceback stage of the BLAST algorithm
 
32
 */
 
33
 
 
34
static char const rcsid[] = 
 
35
    "$Id: blast_tback.c,v 1.1 2004/10/06 19:03:15 dondosha Exp $";
 
36
 
 
37
#include <algo/blast/api/blast_tback.h>
 
38
#include <algo/blast/core/blast_traceback.h>
 
39
#include <algo/blast/core/blast_setup.h>
 
40
 
 
41
Int2 
 
42
Blast_RunTracebackSearch(EBlastProgramType program, 
 
43
   BLAST_SequenceBlk* query, BlastQueryInfo* query_info, 
 
44
   const BlastSeqSrc* seq_src, const BlastScoringOptions* score_options,
 
45
   const BlastExtensionOptions* ext_options,
 
46
   const BlastHitSavingOptions* hit_options,
 
47
   const BlastEffectiveLengthsOptions* eff_len_options,
 
48
   const BlastDatabaseOptions* db_options, 
 
49
   const PSIBlastOptions* psi_options, BlastScoreBlk* sbp,
 
50
   BlastHSPStream* hsp_stream, BlastHSPResults** results)
 
51
{
 
52
   Int2 status = 0;
 
53
   BlastScoringParameters* score_params = NULL; /**< Scoring parameters */
 
54
   BlastExtensionParameters* ext_params = NULL; /**< Gapped extension 
 
55
                                                   parameters */
 
56
   BlastHitSavingParameters* hit_params = NULL; /**< Hit saving parameters*/
 
57
   BlastEffectiveLengthsParameters* eff_len_params = NULL; /**< Parameters
 
58
                                        for effective lengths calculations */
 
59
   BlastGapAlignStruct* gap_align = NULL; /**< Gapped alignment structure */
 
60
 
 
61
   status = 
 
62
      BLAST_GapAlignSetUp(program, seq_src, score_options, eff_len_options, 
 
63
         ext_options, hit_options, query_info, sbp, &score_params, 
 
64
         &ext_params, &hit_params, &eff_len_params, &gap_align);
 
65
   if (status)
 
66
      return status;
 
67
 
 
68
   /* Prohibit any subsequent writing to the HSP stream. */
 
69
   BlastHSPStreamClose(hsp_stream);
 
70
 
 
71
   status = 
 
72
      BLAST_ComputeTraceback(program, hsp_stream, query, query_info,
 
73
         seq_src, gap_align, score_params, ext_params, hit_params,
 
74
         eff_len_params, db_options, psi_options, results);
 
75
 
 
76
   /* Do not destruct score block here */
 
77
   gap_align->sbp = NULL;
 
78
   BLAST_GapAlignStructFree(gap_align);
 
79
 
 
80
   score_params = BlastScoringParametersFree(score_params);
 
81
   hit_params = BlastHitSavingParametersFree(hit_params);
 
82
   ext_params = BlastExtensionParametersFree(ext_params);
 
83
   eff_len_params = BlastEffectiveLengthsParametersFree(eff_len_params);
 
84
   return status;
 
85
}