Biostars beta testing.
Question: samtools sort: truncated file. Aborting
0
Entering edit mode

Hi, I got an error by using this the below command:

samtools sort -O SAM -n -@ 2 -o OZBenth2_.fastp.fq.gz.name-sorted.sam OZBenth2_.fastp.fq.gz.sam 
[W::sam_read1] Parse error at line 1
samtools sort: truncated file. Aborting

What did I miss?

Thank you in advance,

0
Entering edit mode

Samtools expect a bam file and you have proivided a sam file (see usage below).

Usage: samtools sort [options...] [in.bam]

So, first try converting sam to bam.

samtools view -bS OZBenth2_.fastp.fq.gz.sam > OZBenth2_.fastp.fq.gz.bam
ADD COMMENTlink 10 months ago Vijay Lakhujani 4.1k
Entering edit mode
0

Thank you, do you think java -jar picard.jar SortSam I=input.sam O=sorted.samSORT_ORDER=coordinat would be slower?

ADD REPLYlink 10 months ago
m.t.lorenc
• 0

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.0