Question: samtools sort: truncated file. Aborting
0
gravatar for m.t.lorenc
19 months ago by
m.t.lorenc0
m.t.lorenc0 wrote:

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 picard alignment • 1.1k views
ADD COMMENTlink modified 19 months ago • written 19 months ago by m.t.lorenc0
0
gravatar for lakhujanivijay
19 months ago by
lakhujanivijay5.3k
India/Ahmedabad
lakhujanivijay5.3k wrote:

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 written 19 months ago by lakhujanivijay5.3k

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

ADD REPLYlink written 19 months ago by m.t.lorenc0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1740 users visited in the last hour