From 876f043460d0a589e97cbfd341a9aa51959e23bc Mon Sep 17 00:00:00 2001 From: Heng Li Date: Mon, 12 Jul 2010 00:59:15 +0000 Subject: [PATCH] fixed a bug in sorting when output to stdout (by Peter Chines) --- bam_sort.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bam_sort.c b/bam_sort.c index 9884f3d..12b1b54 100644 --- a/bam_sort.c +++ b/bam_sort.c @@ -294,7 +294,7 @@ void bam_sort_core_ext(int is_by_qname, const char *fn, const char *prefix, size mem += ret; ++k; if (mem >= max_mem) { - sort_blocks(n++, k, buf, prefix, header, is_stdout); + sort_blocks(n++, k, buf, prefix, header, 0); mem = 0; k = 0; } } @@ -304,7 +304,7 @@ void bam_sort_core_ext(int is_by_qname, const char *fn, const char *prefix, size else { // then merge char **fns, *fnout; fprintf(stderr, "[bam_sort_core] merging from %d files...\n", n+1); - sort_blocks(n++, k, buf, prefix, header, is_stdout); + sort_blocks(n++, k, buf, prefix, header, 0); fnout = (char*)calloc(strlen(prefix) + 20, 1); if (is_stdout) sprintf(fnout, "-"); else sprintf(fnout, "%s.bam", prefix); -- 2.39.2