From d41c03861644fb082820d038b08380a96826b244 Mon Sep 17 00:00:00 2001 From: zzh Date: Sat, 6 Apr 2024 16:08:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=B8=80=E4=BA=9Bfprintf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 2 +- bwa.c | 2 +- fastmap.c | 2 +- fmt_idx.c | 2 ++ run.sh | 10 +++++----- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 10e9363..3fd821a 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ PROG= fastbwa INCLUDES= LIBS= -lm -lz -lpthread -ldl SUBDIRS= . -JE_MALLOC=#/home/zzh/work/jemalloc/lib/libjemalloc.a +JE_MALLOC=/home/zzh/work/jemalloc/lib/libjemalloc.a ifeq ($(shell uname -s),Linux) LIBS += -lrt diff --git a/bwa.c b/bwa.c index db2973c..c02f9ea 100644 --- a/bwa.c +++ b/bwa.c @@ -470,7 +470,7 @@ FMTIndex *bwa_idx_load_fmt(const char *hint) return 0; } fmt = fmt_restore_fmt(fmt_idx_fn); - fprintf(stderr, "%s\n", kmer_idx_fn); + // fprintf(stderr, "%s\n", kmer_idx_fn); fmt->kmer_hash = fmt_restore_kmer_idx(kmer_idx_fn); strcpy(sa_fn, hint); diff --git a/fastmap.c b/fastmap.c index 13025c2..f2c160a 100644 --- a/fastmap.c +++ b/fastmap.c @@ -566,7 +566,7 @@ int main_mem(int argc, char *argv[]) if (opt->n_threads < 1) opt->n_threads = 1; if (opt->batch_size < 1) opt->batch_size = 256; - fprintf(stderr, "batch_size: %d\n", opt->batch_size); + // fprintf(stderr, "batch_size: %d\n", opt->batch_size); if (optind + 1 >= argc || optind + 3 < argc) { fprintf(stderr, "\n"); diff --git a/fmt_idx.c b/fmt_idx.c index 706dce2..d27faec 100644 --- a/fmt_idx.c +++ b/fmt_idx.c @@ -1053,6 +1053,8 @@ backward_search: fmt_reverse_intvs(curr); // s.t. smaller intervals (i.e. longer matches) visited first if (mt.num_match == 0) ret = curr->a[0].info; // this will be the returned value,扩展到的最远的位置 + else + ret = (uint32_t)mt.info; // 按照种子进行遍历,反向扩展 #define CHECK_ADD_MEM(pos, intv, mem) \ if (((int)((intv).info) - (pos) >= min_seed_len) && (mem->n == 0 || (pos) < mem->a[mem->n - 1].info >> 32)) \ diff --git a/run.sh b/run.sh index 0fd12e7..ed1408b 100755 --- a/run.sh +++ b/run.sh @@ -10,8 +10,8 @@ thread=64 ## d2 #n_r1=~/data/fastq/dataset/na12878_wgs_101/s_1.fq #n_r2=~/data/fastq/dataset/na12878_wgs_101/s_2.fq -n_r1=~/data/fastq/dataset/na12878_wgs_101/45m_r1.fq -n_r2=~/data/fastq/dataset/na12878_wgs_101/45m_r2.fq +#n_r1=~/data/fastq/dataset/na12878_wgs_101/45m_r1.fq +#n_r2=~/data/fastq/dataset/na12878_wgs_101/45m_r2.fq # d3 #n_r1=~/data/fastq/dataset/na12878_wgs_150/s_1.fq #n_r2=~/data/fastq/dataset/na12878_wgs_150/s_2.fq @@ -20,8 +20,8 @@ n_r2=~/data/fastq/dataset/na12878_wgs_101/45m_r2.fq ## d4 #n_r1=~/data/fastq/dataset/zy_wes/s_1.fq #n_r2=~/data/fastq/dataset/zy_wes/s_2.fq -#n_r1=~/data/fastq/dataset/zy_wes/45mr1.fq.gz -#n_r2=~/data/fastq/dataset/zy_wes/45mr2.fq.gz +n_r1=~/data/fastq/dataset/zy_wes/45mr1.fq.gz +n_r2=~/data/fastq/dataset/zy_wes/45mr2.fq.gz ## d5 #n_r1=~/data/fastq/dataset/zy_wgs/45mr1.fq.gz #n_r2=~/data/fastq/dataset/zy_wgs/45mr2.fq.gz @@ -36,7 +36,7 @@ reference=~/data1/fmt_ref/human_g1k_v37_decoy.fasta #out=./all.sam #out=./sn.sam #out=./ssn-x1.sam -out=~/data1/d2-45m.sam +out=~/data1/d4-45m.sam #out=~/data/out1.sam #out=/dev/null #out=./na12878.sam