1
/* $Id: na_ungapped.h,v 1.3 2007/01/05 16:11:39 papadopo 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 official 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 na_ungapped.h
31
* Nucleotide ungapped extension code.
34
#ifndef ALGO_BLAST_CORE__NA_UNGAPPED__H
35
#define ALGO_BLAST_CORE__NA_UNGAPPED__H
37
#include <algo/blast/core/ncbi_std.h>
38
#include <algo/blast/core/blast_def.h>
39
#include <algo/blast/core/blast_extend.h>
40
#include <algo/blast/core/blast_parameters.h>
41
#include <algo/blast/core/blast_query_info.h>
42
#include <algo/blast/core/lookup_wrap.h>
43
#include <algo/blast/core/blast_hits.h>
44
#include <algo/blast/core/blast_diagnostics.h>
50
/** Signature of function used to compute ungapped alignments */
51
typedef Int4 (*TNaExtendFunction)(const BlastOffsetPair* offset_pairs,
53
const BlastInitialWordParameters* word_params,
54
LookupTableWrap* lookup_wrap,
55
BLAST_SequenceBlk* query, BLAST_SequenceBlk* subject,
56
Int4** matrix, BlastQueryInfo* query_info,
57
Blast_ExtendWord* ewp,
58
BlastInitHitList* init_hitlist);
60
/** Find all words for a given subject sequence and perform
61
* ungapped extensions, assuming ordinary blastn.
62
* @param subject The subject sequence [in]
63
* @param query The query sequence (needed only for the discontiguous word
65
* @param query_info concatenated query information [in]
66
* @param lookup_wrap Pointer to the (wrapper) lookup table structure. Only
67
* traditional BLASTn lookup table supported. [in]
68
* @param matrix The scoring matrix [in]
69
* @param word_params Parameters for the initial word extension [in]
70
* @param ewp Structure needed for initial word information maintenance [in]
71
* @param offset_pairs Array for storing query and subject offsets. [in]
72
* @param max_hits size of offset arrays [in]
73
* @param init_hitlist Structure to hold all hits information. Has to be
74
* allocated up front [out]
75
* @param ungapped_stats Various hit counts. Not filled if NULL [out]
77
Int2 BlastNaWordFinder(BLAST_SequenceBlk* subject,
78
BLAST_SequenceBlk* query,
79
BlastQueryInfo* query_info,
80
LookupTableWrap* lookup_wrap,
82
const BlastInitialWordParameters* word_params,
83
Blast_ExtendWord* ewp,
84
BlastOffsetPair* offset_pairs,
86
BlastInitHitList* init_hitlist,
87
BlastUngappedStats* ungapped_stats);
90
/** Choose the best routine to use for creating ungapped alignments
91
* @param lookup_wrap Lookup table that influences routine choice [in][out]
93
void BlastChooseNaExtend(LookupTableWrap *lookup_wrap);
98
#endif /* !ALGO_BLAST_CORE__NA_UNGAPPED__H */