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

« back to all changes in this revision

Viewing changes to algo/blast/core/greedy_align.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: greedy_align.h,v 1.23 2005/11/16 14:31:37 madden Exp $
 
1
/* $Id: greedy_align.h,v 1.26 2007/04/17 16:55:32 kazimird Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
31
31
 * Prototypes and structures for greedy gapped alignment
32
32
 */
33
33
 
34
 
#ifndef _GREEDY_H_
35
 
#define _GREEDY_H_
 
34
#ifndef ALGO_BLAST_CORE__GREEDY_ALIGN__H
 
35
#define ALGO_BLAST_CORE__GREEDY_ALIGN__H
36
36
 
37
 
#include <algo/blast/core/blast_def.h>
 
37
#include <algo/blast/core/ncbi_std.h>
38
38
#include <algo/blast/core/gapinfo.h>
39
39
 
40
40
#ifdef __cplusplus
94
94
                                           SGreedyOffset structs */
95
95
} SGreedyAlignMem;
96
96
 
 
97
/** Structure for locating high-scoring seeds for greedy alignment */
 
98
typedef struct SGreedySeed {
 
99
    Int4 start_q;       /**< query offset of start of run of matches */
 
100
    Int4 start_s;       /**< subject offset of start of run of matches */
 
101
    Int4 match_length;  /**< length of run of matches */
 
102
} SGreedySeed;
 
103
 
97
104
/** Perform the greedy extension algorithm with non-affine gap penalties.
98
105
 * @param seq1 First sequence (always uncompressed) [in]
99
106
 * @param len1 Maximal extension length in first sequence [in]
110
117
 *          Traceback is not saved if NULL is passed. [in] [out]
111
118
 * @param rem Offset within a byte of the compressed second sequence. 
112
119
 *          Set to 4 if sequence is uncompressed. [in]
 
120
 * @param fence_hit True is returned here if overrun is detected. [in]
 
121
 * @param seed Structure to remember longest run of exact matches [out]
113
122
 * @return The minimum distance between the two sequences, i.e.
114
123
 *          the number of mismatches plus gaps in the resulting alignment
115
124
 */
120
129
                   Int4 match_cost, Int4 mismatch_cost,
121
130
                   Int4* seq1_align_len, Int4* seq2_align_len, 
122
131
                   SGreedyAlignMem* aux_data, 
123
 
                   GapPrelimEditBlock *edit_block, Uint1 rem);
 
132
                   GapPrelimEditBlock *edit_block, Uint1 rem,
 
133
                   Boolean * fence_hit, SGreedySeed *seed);
124
134
 
125
135
/** Perform the greedy extension algorithm with affine gap penalties.
126
136
 * @param seq1 First sequence (always uncompressed) [in]
140
150
 *          Traceback is not saved if NULL is passed. [in] [out]
141
151
 * @param rem Offset within a byte of the compressed second sequence.
142
152
 *          Set to 4 if sequence is uncompressed. [in]
 
153
 * @param fence_hit True is returned here if overrun is detected. [in]
 
154
 * @param seed Structure to remember longest run of exact matches [out]
143
155
 * @return The score of the alignment
144
156
 */
145
157
Int4 
150
162
                         Int4 in_gap_open, Int4 in_gap_extend,
151
163
                         Int4* seq1_align_len, Int4* seq2_align_len, 
152
164
                         SGreedyAlignMem* aux_data, 
153
 
                         GapPrelimEditBlock *edit_block, Uint1 rem);
 
165
                         GapPrelimEditBlock *edit_block, Uint1 rem,
 
166
                         Boolean * fence_hit, SGreedySeed *seed);
154
167
 
155
168
#ifdef __cplusplus
156
169
}
157
170
#endif
158
 
#endif /* _GREEDY_H_ */
 
171
#endif /* !ALGO_BLAST_CORE__GREEDY_ALIGN__H */