Entering edit mode
10.5 years ago
Alex Reynolds
35k
Given an indexed BAM file, is the following command guaranteed to give the full and correct listing of (UCSC) chromosome names for reads in the BAM file?
$ samtools view -H foo.bam | cut -f2 | grep '^SN:chr' | sed s'/SN://'
I'm trying to think of any gotchas or custom implementations. Are there other tags that could be used for chromosome names in BAM file headers, or other issues I'm not thinking of?