Genome Information From Bam
1 answer
get the dictionary in the sam header and test one chromosome
$ samtools view -H file.bam |\
grep -E 'SN\:(chr)?22' |\
awk '{if(index($0,"LN:51304566")!=0) printf("hg19\n"); else if(index($0,"LN:49691432")!=0) printf("hg18\n"); else printf("??\n");}'
hg19
• 0 views
•
link
Log in to answer this question.