fast-bwa/fmt_idx.c

27 lines
666 B
C
Raw Normal View History

/*
Description: fmt-idxseedfm-index twice search in one time
Copyright : All right reserved by ICT
Author : Zhang Zhonghai
Date : 2023/12/24
*/
#include <stdio.h>
#include <stdlib.h>
#include "fmt_idx.h"
// 创建fmt-index索引数据
void BuildBwtdFromBwt(bwt_t *bwt, bwtd_t **bwtd_p) {
*bwtd_p = (bwtd_t *)malloc(sizeof(bwtd_t));
bwtd_t *bwtd = *bwtd_p;
const int baseLen = 12;
const int kmerSize = 1 << (baseLen << 1);
bwtd->kmer_range = (kmer_range_t *)malloc(kmerSize * sizeof(kmer_range_t));
printf("kmer size: %ld M\n", kmerSize * sizeof(kmer_range_t) / 1024 / 1024);
exit(0);
}