samtools view sample.bam >sample2.sam : lost the header
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.
• 2,496 views
•
link
2 answers
samtools view -h sample.bam > sample.sam
• 0 views
•
link
You must use the -h parameter when converting from bam to sam.
But why are you doing this?
• 0 views
•
link
Log in to answer this question.