Since you may get mapping artefacts from intron regions, you can use a bed-file of known (chrY / chrX) - genes to limit your look-up:
Code:
samtools view -c -L chrX-genes.bed foo.bam samtools view -c -L chrY-genes.bed foo.bam
BTW.: in your command you use the keyword RNAME; this is not necassary.
Leave a comment: