2013-02-01 02:59:48 +08:00
|
|
|
#ifndef BWAMEM_H_
|
|
|
|
|
#define BWAMEM_H_
|
|
|
|
|
|
|
|
|
|
#include "bwt.h"
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
const bwt_t *bwt;
|
|
|
|
|
const uint8_t *query;
|
|
|
|
|
int start, len, min_intv;
|
|
|
|
|
bwtintv_v *tmpvec[2], *matches;
|
|
|
|
|
} smem_i;
|
|
|
|
|
|
2013-02-01 04:55:22 +08:00
|
|
|
typedef struct {
|
|
|
|
|
int64_t qbeg, rbeg, len;
|
|
|
|
|
} memseed_t;
|
|
|
|
|
|
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-01 02:59:48 +08:00
|
|
|
} memopt_t;
|
|
|
|
|
|
2013-02-01 04:55:22 +08:00
|
|
|
typedef struct {
|
|
|
|
|
int n, m;
|
|
|
|
|
int64_t pos;
|
|
|
|
|
memseed_t *seeds;
|
|
|
|
|
} memchain1_t;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
int n, m;
|
|
|
|
|
memchain1_t *chains;
|
|
|
|
|
} memchain_t;
|
|
|
|
|
|
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);
|
|
|
|
|
void smem_set_query(smem_i *itr, int min_intv, int len, const uint8_t *query);
|
|
|
|
|
int smem_next(smem_i *itr);
|
|
|
|
|
|
|
|
|
|
memopt_t *mem_opt_init(void);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|