1
/* $Id: blast_tback.c,v 1.1 2004/10/06 19:03:15 dondosha Exp $
2
* ===========================================================================
5
* National Center for Biotechnology Information
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.
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
22
* Please cite the author in any work or product based on this material.
24
* ===========================================================================
26
* Author: Ilya Dondoshansky
30
/** @file blast_tback.c
31
* API level functions to perform the traceback stage of the BLAST algorithm
34
static char const rcsid[] =
35
"$Id: blast_tback.c,v 1.1 2004/10/06 19:03:15 dondosha Exp $";
37
#include <algo/blast/api/blast_tback.h>
38
#include <algo/blast/core/blast_traceback.h>
39
#include <algo/blast/core/blast_setup.h>
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)
53
BlastScoringParameters* score_params = NULL; /**< Scoring parameters */
54
BlastExtensionParameters* ext_params = NULL; /**< Gapped extension
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 */
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);
68
/* Prohibit any subsequent writing to the HSP stream. */
69
BlastHSPStreamClose(hsp_stream);
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);
76
/* Do not destruct score block here */
77
gap_align->sbp = NULL;
78
BLAST_GapAlignStructFree(gap_align);
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);