This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Parse error at line.....

Hi I am trying to convert sam file to bam file and encountered this problem . Not sure how to troubleshoot, Can someone help please as I am very new to bioinformatics

samtools view -S -b aln2.sam > aln2.bam
[W::sam_read1] Parse error at line 753646
[main_samview] truncated file.
alignment

1 answer

The file is corrupted, repeat alignment. That is the most robust option. When you do pipe directly into samtools.

alignment_code (...) | samtools view -o aln2.bam

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one if they work.
Upvote|Bookmark|Accept

Hey thanks genomax . I am still new so this small information is also useful for me :D

Log in to answer this question.