2026-01-11 12:55:11 +08:00
|
|
|
|
/*
|
|
|
|
|
|
Description: 针对paired数据,计算生成sam步骤的优化
|
|
|
|
|
|
|
|
|
|
|
|
Copyright : All right reserved by ICT
|
|
|
|
|
|
|
|
|
|
|
|
Author : Zhang Zhonghai
|
|
|
|
|
|
Date : 2026/01/08
|
|
|
|
|
|
*/
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
#include "bwamem.h"
|
|
|
|
|
|
|
|
|
|
|
|
// for avx512
|
|
|
|
|
|
#define SIMD512_WIDTH8 64
|
|
|
|
|
|
#define SIMD512_WIDTH16 32
|
|
|
|
|
|
|
2026-01-13 23:37:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
2026-01-11 12:55:11 +08:00
|
|
|
|
void gen_paired_sam(mem_worker_t* w);
|
|
|
|
|
|
|
|
|
|
|
|
extern int mem_sam_pe(const mem_opt_t* opt, const bntseq_t* bns, const uint8_t* pac, const mem_pestat_t pes[4], uint64_t id, bseq1_t s[2],
|
|
|
|
|
|
mem_alnreg_v a[2], seq_sam_t ss[2], int tid);
|
|
|
|
|
|
|
|
|
|
|
|
extern void mem_reg2ovlp(const mem_opt_t* opt, const bntseq_t* bns, const uint8_t* pac, bseq1_t* s, mem_alnreg_v* a);
|
|
|
|
|
|
|
2026-01-13 23:37:06 +08:00
|
|
|
|
extern void kt_for(int n_threads, void (*func)(void*, int, int), void* data, int n);
|
|
|
|
|
|
|
|
|
|
|
|
extern int mem_sort_dedup_patch(const mem_opt_t* opt, const bntseq_t* bns, const uint8_t* pac, uint8_t* query, int n, mem_alnreg_t* a);
|
|
|
|
|
|
|
|
|
|
|
|
extern void mem_reg2sam(const mem_opt_t* opt, const bntseq_t* bns, const uint8_t* pac, bseq1_t* s, mem_alnreg_v* a, int extra_flag,
|
|
|
|
|
|
const mem_aln_t* m, seq_sam_t* ss);
|
|
|
|
|
|
|
|
|
|
|
|
extern void mem_aln2sam(const mem_opt_t* opt, const bntseq_t* bns, kstring_t* str, bseq1_t* s, int n, const mem_aln_t* list, int which,
|
|
|
|
|
|
const mem_aln_t* m);
|
|
|
|
|
|
|
|
|
|
|
|
extern int mem_mark_primary_se(const mem_opt_t* opt, int n, mem_alnreg_t* a, int64_t id);
|
|
|
|
|
|
extern int mem_approx_mapq_se(const mem_opt_t* opt, const mem_alnreg_t* a);
|
|
|
|
|
|
|
|
|
|
|
|
extern char** mem_gen_alt(const mem_opt_t* opt, const bntseq_t* bns, const uint8_t* pac, const mem_alnreg_v* a, int l_query, const char* query);
|
|
|
|
|
|
|
|
|
|
|
|
extern void mem_reorder_primary5(int T, mem_alnreg_v* a);
|
|
|
|
|
|
|
|
|
|
|
|
extern int mem_pair(const mem_opt_t* opt, const bntseq_t* bns, const uint8_t* pac, const mem_pestat_t pes[4], bseq1_t s[2], mem_alnreg_v a[2], int id,
|
|
|
|
|
|
int* sub, int* n_sub, int z[2], int n_pri[2]);
|