Converting Chimeric.out.sam to Bam

19 views
Skip to first unread message

Ron

unread,
Jun 19, 2017, 12:05:57 PM6/19/17
to rna-star
Hi Alex,

I want to convert the Chimeric.out.sam file to bam file to view the fusion evidence.
here is my code:

samtools view -bS {1} | \
samtools sort - -@ 4 {1/.}.sorted ; \
samtools-0.1.19/samtools index {1/.}.sorted.bam

I am getting the following error:

[bam_header_read] EOF marker is absent. The input is probably truncated.
[samopen] SAM header is present: 25 sequences.

Any suggestions ?

Thanks,

Ron

Alexander Dobin

unread,
Jun 20, 2017, 3:39:12 PM6/20/17
to rna-star
Hi Ron,

I think the warning message is because of the piping of the "view" commands into the "sort" command, since the BAM file from "view" is not fully written when "sort" accesses it. I think the command may work fine despite the message, however, I think it's safer to run without piping.

Cheers
Alex

Dario Strbenac

unread,
Jun 20, 2017, 10:00:12 PM6/20/17
to rna-star
You should upgrade to samtools version 1.4. The version you're using, 0.1, is very out of date.
Reply all
Reply to author
Forward
0 new messages