~ubuntu-branches/debian/experimental/ncbi-tools6/experimental

« back to all changes in this revision

Viewing changes to algo/blast/core/na_ungapped.h

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2008-07-14 19:43:15 UTC
  • mfrom: (2.1.12 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080714194315-ed44u9ek7txva2rz
Tags: 6.1.20080302-3
tools/readdb.c: enable madvise()-based code on all glibc (hence all
Debian) systems, not just Linux.  (Closes: #490437.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: na_ungapped.h,v 1.3 2007/01/05 16:11:39 papadopo 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 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.
 
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 na_ungapped.h
 
31
 * Nucleotide ungapped extension code.
 
32
 */
 
33
 
 
34
#ifndef ALGO_BLAST_CORE__NA_UNGAPPED__H
 
35
#define ALGO_BLAST_CORE__NA_UNGAPPED__H
 
36
 
 
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>
 
45
 
 
46
#ifdef __cplusplus
 
47
extern "C" {
 
48
#endif
 
49
 
 
50
/** Signature of function used to compute ungapped alignments */
 
51
typedef Int4 (*TNaExtendFunction)(const BlastOffsetPair* offset_pairs, 
 
52
                    Int4 num_hits, 
 
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);
 
59
 
 
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 
 
64
 *        case) [in]
 
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]
 
76
 */
 
77
Int2 BlastNaWordFinder(BLAST_SequenceBlk* subject, 
 
78
                       BLAST_SequenceBlk* query,
 
79
                       BlastQueryInfo* query_info,
 
80
                       LookupTableWrap* lookup_wrap,
 
81
                       Int4** matrix,
 
82
                       const BlastInitialWordParameters* word_params, 
 
83
                       Blast_ExtendWord* ewp,
 
84
                       BlastOffsetPair* offset_pairs,
 
85
                       Int4 max_hits,
 
86
                       BlastInitHitList* init_hitlist, 
 
87
                       BlastUngappedStats* ungapped_stats);
 
88
 
 
89
 
 
90
/** Choose the best routine to use for creating ungapped alignments
 
91
 * @param lookup_wrap Lookup table that influences routine choice [in][out]
 
92
 */
 
93
void BlastChooseNaExtend(LookupTableWrap *lookup_wrap);
 
94
 
 
95
#ifdef __cplusplus
 
96
}
 
97
#endif
 
98
#endif /* !ALGO_BLAST_CORE__NA_UNGAPPED__H */