From a4c2411d99b2b165812f0f913287531eaf83516e Mon Sep 17 00:00:00 2001 From: zzh Date: Mon, 19 Jan 2026 15:00:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E5=BC=95=E8=B5=B7=E5=B4=A9=E6=BA=83=E7=9A=84bug?= =?UTF-8?q?=EF=BC=8C=E5=B0=B1=E6=98=AF=E8=AF=BB=E5=8F=96reads=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=88=9D=E5=A7=8B=E5=BC=80=E8=BE=9F=E7=9A=84seqs?= =?UTF-8?q?=E4=B8=AA=E6=95=B0=E5=8F=AF=E8=83=BD=E4=B8=8D=E5=A4=9F=EF=BC=8C?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E8=B6=85=E5=87=BAseqs=E5=86=85=E5=AD=98?= =?UTF-8?q?=EF=BC=8C=E6=9C=80=E7=BB=88=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 3 ++- Makefile | 2 +- bwa.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 34f8f4b..9451ef3 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,7 +13,8 @@ "args": [ "mem", "-t", - "1", + "128", + "-K", "800000000", "-M", "-R", "'@RG\\tID:normal\\tSM:normal\\tPL:illumina\\tLB:normal\\tPG:bwa'", diff --git a/Makefile b/Makefile index e2a86ae..884a90b 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ OPTIMIZE=-O3 CFLAGS= -g -Wall -Wno-unused-function $(AVX2) $(AVX512BW) $(OPTIMIZE) WRAP_MALLOC=-DUSE_MALLOC_WRAPPERS -#SAM_EXACT= -DSAM_EXACT +SAM_EXACT= -DSAM_EXACT SHOW_PERF= -DSHOW_PERF SHOW_DATA_PERF= -DSHOW_DATA_PERF DEBUG_FILE_OUTPUT= -DDEBUG_FILE_OUTPUT diff --git a/bwa.c b/bwa.c index 23e3a72..08e5308 100644 --- a/bwa.c +++ b/bwa.c @@ -159,7 +159,8 @@ void bseq_read_pe_mt(int chunk_size, int* n_, void* ks1_, void* ks2_, int copy_c *m_ = n; return; } - m = (chunk_size + size / init_n_reads - 1) / (size / init_n_reads); + float bases_per_read = size * 1.0 / init_n_reads; + m = (chunk_size + bases_per_read * 100) / (bases_per_read); // 多开辟100个reads的冗余空间 #else m = 50000; #endif