How to extract and save the header of .bam,vcf and idat files in a text file
Can someone help with how to extract the header data (metainfo) from these three files: .bam, vcf and idat files.
I want to be able to extract these medatadata info and save each in a text file. I hope someone can help me with the how to.
Thanks!
• 5,950 views
•
link
2 answers
## BAM:
samtools view -H file.bam > header_BAM.txt
## VCF:
awk '{if(/^#/)print;else exit}' file.vcf > header_VCF.txt
For idat I don't know.
• 0 views
•
link
Log in to answer this question.