samtools view sample.bam >sample2.sam : lost the header
2
0
Entering edit mode
5.4 years ago
flystar233 • 0

First ,

samtools view -Sb sample.sam >sample.bam

Second,

samtools view sample.bam >sample2.sam

I used this method: sam2bam2sam found that the head of the original sam file was lost at the end. So was it lost in sam2bam or bam2sam?

ps:sample.sam have header information,sample2.sam don't have header information.

samtools • 2.0k views
ADD COMMENT
3
Entering edit mode
5.4 years ago

samtools view -h sample.bam > sample.sam

ADD COMMENT
3
Entering edit mode
5.4 years ago

You must use the -h parameter when converting from bam to sam.

But why are you doing this?

ADD COMMENT

Login before adding your answer.

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