[bam_sort_core] merging from 32 files and 16 in-memory blocks... samtools sort: failed to write header to "-"
1
0
Entering edit mode
5 weeks ago
eli_bayat ▴ 50

Hi,

When I run script samtools sort -@ 16 -T "path/to/temp" "$bamfile" > "$_sorted.bam, I get this error message:

[bam_sort_core] merging from 112 files and 16 in-memory blocks... samtools sort: failed to write header to "-"

and the output file is empty. I believe have sufficient memory (249G memory and my files are big around 70G pacbio reads)

Any help is appreciated.

samtools sort pacbio error • 440 views
ADD COMMENT
1
Entering edit mode
5 weeks ago
GenoMax 110k

Please use -o sorted.bam to save the sorted BAM in your command line. This is standard option with all recent versions of samtools.

samtools sort -@ 16 -T "path/to/temp" -o sorted.bam "$bamfile"
ADD COMMENT
0
Entering edit mode

Thanks, I used the commands you suggested and it did sorting without an issue, I also resized my drive, so probably a bit of both helped? :). Thanks for your help

ADD REPLY

Login before adding your answer.

Traffic: 1887 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6