2013-02-01 02:59:48 +08:00
|
|
|
#ifndef BWAMEM_H_
|
|
|
|
|
#define BWAMEM_H_
|
|
|
|
|
|
|
|
|
|
#include "bwt.h"
|
|
|
|
|
|
2013-02-02 03:38:44 +08:00
|
|
|
struct __smem_i;
|
|
|
|
|
typedef struct __smem_i smem_i;
|
2013-02-01 02:59:48 +08:00
|
|
|
|
2013-02-01 04:55:22 +08:00
|
|
|
typedef struct {
|
2013-02-01 05:26:05 +08:00
|
|
|
int64_t rbeg;
|
|
|
|
|
int32_t qbeg, len;
|
2013-02-02 05:39:50 +08:00
|
|
|
} mem_seed_t;
|
2013-02-01 04:55:22 +08:00
|
|
|
|
2013-02-01 02:59:48 +08:00
|
|
|
typedef struct {
|
|
|
|
|
int a, b, q, r, w;
|
2013-02-01 04:55:22 +08:00
|
|
|
int min_seed_len, max_occ, max_chain_gap;
|
2013-02-02 05:39:50 +08:00
|
|
|
} mem_opt_t;
|
2013-02-01 02:59:48 +08:00
|
|
|
|
2013-02-01 04:55:22 +08:00
|
|
|
typedef struct {
|
|
|
|
|
int n, m;
|
|
|
|
|
int64_t pos;
|
2013-02-02 05:39:50 +08:00
|
|
|
mem_seed_t *seeds;
|
|
|
|
|
} mem_chain1_t;
|
2013-02-01 04:55:22 +08:00
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int n, m;
|
2013-02-02 05:39:50 +08:00
|
|
|
mem_chain1_t *chains;
|
|
|
|
|
} mem_chain_t;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int64_t pos;
|
|
|
|
|
int n_cigar, len, score;
|
|
|
|
|
uint32_t *cigar;
|
|
|
|
|
} mem_aln_t;
|
2013-02-01 04:55:22 +08:00
|
|
|
|
2013-02-01 02:59:48 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
smem_i *smem_itr_init(const bwt_t *bwt);
|
|
|
|
|
void smem_itr_destroy(smem_i *itr);
|
2013-02-02 03:20:38 +08:00
|
|
|
void smem_set_query(smem_i *itr, int len, const uint8_t *query);
|
2013-02-02 03:38:44 +08:00
|
|
|
const bwtintv_v *smem_next(smem_i *itr, int split_len);
|
2013-02-01 02:59:48 +08:00
|
|
|
|
2013-02-02 05:39:50 +08:00
|
|
|
mem_opt_t *mem_opt_init(void);
|
2013-02-01 02:59:48 +08:00
|
|
|
|
2013-02-02 05:39:50 +08:00
|
|
|
mem_chain_t mem_chain(const mem_opt_t *opt, const bwt_t *bwt, int len, const uint8_t *seq);
|
|
|
|
|
mem_aln_t mem_chain2aln(int64_t l_pac, const uint8_t *pac, int l_query, const uint8_t *query, const mem_chain1_t *c);
|
2013-02-01 05:26:05 +08:00
|
|
|
|
2013-02-01 02:59:48 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|