| 1 |
#ifndef BWT_LITE_H_ |
| 2 |
#define BWT_LITE_H_ |
| 3 |
|
| 4 |
#include <stdint.h> |
| 5 |
|
| 6 |
typedef struct { |
| 7 |
uint32_t seq_len, bwt_size, n_occ; |
| 8 |
uint32_t primary; |
| 9 |
uint32_t *bwt, *occ, *sa, L2[5]; |
| 10 |
uint32_t cnt_table[256]; |
| 11 |
} bwtl_t; |
| 12 |
|
| 13 |
#define bwtl_B0(b, k) ((b)->bwt[(k)>>4]>>((~(k)&0xf)<<1)&3) |
| 14 |
|
| 15 |
#ifdef __cplusplus |
| 16 |
extern "C" { |
| 17 |
#endif |
| 18 |
|
| 19 |
bwtl_t *bwtl_seq2bwtl(int len, const uint8_t *seq); |
| 20 |
uint32_t bwtl_occ(const bwtl_t *bwt, uint32_t k, uint8_t c); |
| 21 |
void bwtl_occ4(const bwtl_t *bwt, uint32_t k, uint32_t cnt[4]); |
| 22 |
void bwtl_2occ4(const bwtl_t *bwt, uint32_t k, uint32_t l, uint32_t cntk[4], uint32_t cntl[4]); |
| 23 |
void bwtl_destroy(bwtl_t *bwt); |
| 24 |
|
| 25 |
#ifdef __cplusplus |
| 26 |
} |
| 27 |
#endif |
| 28 |
|
| 29 |
#endif |