case 'n': is_by_qname = 1; break;
}
}
- if (optind + 3 >= argc) {
+ if (optind + 2 >= argc) {
fprintf(stderr, "Usage: samtools merge [-n] <out.bam> <in1.bam> <in2.bam> [...]\n");
return 1;
}
fns[i] = (char*)calloc(strlen(prefix) + 20, 1);
sprintf(fns[i], "%s.%.4d.bam", prefix, i);
}
- bam_merge_core(0, fnout, n, fns);
+ bam_merge_core(is_by_qname, fnout, n, fns);
free(fnout);
for (i = 0; i < n; ++i) {
unlink(fns[i]);