samtools sort: truncated file. Aborting
1
0
Entering edit mode
5.7 years ago
m.t.lorenc • 0

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,

samtools alignment picard • 5.8k views
ADD COMMENT
0
Entering edit mode
5.7 years ago

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 COMMENT
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2049 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