forked from lh3/bwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbwamem.h
58 lines (45 loc) · 1.39 KB
/
bwamem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef BWAMEM_H_
#define BWAMEM_H_
#include "bwt.h"
struct __smem_i;
typedef struct __smem_i smem_i;
typedef struct {
int64_t rbeg;
int32_t qbeg, len;
} mem_seed_t;
typedef struct {
int a, b, q, r, w;
int min_seed_len, max_occ, max_chain_gap;
int8_t mat[25]; // scoring matrix; mat[0] == 0 if unset
float mask_level, chain_drop_ratio;
} mem_opt_t;
typedef struct {
int n, m;
int64_t pos;
mem_seed_t *seeds;
} mem_chain1_t;
typedef struct {
int n, m;
mem_chain1_t *chains;
} mem_chain_t;
typedef struct {
int64_t rb, re;
int score, qb, qe, sub;
} mem_alnreg_t;
#ifdef __cplusplus
extern "C" {
#endif
smem_i *smem_itr_init(const bwt_t *bwt);
void smem_itr_destroy(smem_i *itr);
void smem_set_query(smem_i *itr, int len, const uint8_t *query);
const bwtintv_v *smem_next(smem_i *itr, int split_len);
mem_opt_t *mem_opt_init(void);
void mem_fill_scmat(int a, int b, int8_t mat[25]);
mem_chain_t mem_chain(const mem_opt_t *opt, const bwt_t *bwt, int len, const uint8_t *seq);
int mem_chain_flt(const mem_opt_t *opt, int n_chn, mem_chain1_t *chains);
void mem_chain2aln(const mem_opt_t *opt, int64_t l_pac, const uint8_t *pac, int l_query, const uint8_t *query, const mem_chain1_t *c, mem_alnreg_t *a);
uint32_t *mem_gen_cigar(const mem_opt_t *opt, int64_t l_pac, const uint8_t *pac, int l_query, uint8_t *query, int64_t rb, int64_t re, int *score, int *n_cigar);
#ifdef __cplusplus
}
#endif
#endif