| 1 |
#ifndef BWTGAP_H_ |
| 2 |
#define BWTGAP_H_ |
| 3 |
|
| 4 |
#include "bwt.h" |
| 5 |
#include "bwtaln.h" |
| 6 |
|
| 7 |
typedef struct { // recursion stack |
| 8 |
uint32_t info; // score<<21 | i |
| 9 |
uint32_t n_mm:8, n_gapo:8, n_gape:8, state:2, n_seed_mm:6; |
| 10 |
uint32_t n_ins:16, n_del:16; |
| 11 |
int last_diff_pos; |
| 12 |
bwtint_t k, l; // (k,l) is the SA region of [i,n-1] |
| 13 |
} gap_entry_t; |
| 14 |
|
| 15 |
typedef struct { |
| 16 |
int n_entries, m_entries; |
| 17 |
gap_entry_t *stack; |
| 18 |
} gap_stack1_t; |
| 19 |
|
| 20 |
typedef struct { |
| 21 |
int n_stacks, best, n_entries; |
| 22 |
gap_stack1_t *stacks; |
| 23 |
} gap_stack_t; |
| 24 |
|
| 25 |
#ifdef __cplusplus |
| 26 |
extern "C" { |
| 27 |
#endif |
| 28 |
|
| 29 |
gap_stack_t *gap_init_stack2(int max_score); |
| 30 |
gap_stack_t *gap_init_stack(int max_mm, int max_gapo, int max_gape, const gap_opt_t *opt); |
| 31 |
void gap_destroy_stack(gap_stack_t *stack); |
| 32 |
bwt_aln1_t *bwt_match_gap(bwt_t *const bwt, int len, const ubyte_t *seq, bwt_width_t *w, |
| 33 |
bwt_width_t *seed_w, const gap_opt_t *opt, int *_n_aln, gap_stack_t *stack); |
| 34 |
void bwa_aln2seq(int n_aln, const bwt_aln1_t *aln, bwa_seq_t *s); |
| 35 |
|
| 36 |
#ifdef __cplusplus |
| 37 |
} |
| 38 |
#endif |
| 39 |
|
| 40 |
#endif |