fast-bwa/fmt_idx.c

27 lines
666 B
C
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
Description: 通过fmt-idx数据结构对seed过程进行加速fm-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);
}