Entering edit mode
4.4 years ago
rykerklie7
▴
30
I would like to calculate the percentage of mapping of a particular gene to the genome. Say for eg, am looking at gene A
I extracted the regions of that gene from the genome file and created a bed file
Homo_sapiens.GRCh38_geneA.bed
6 52186375 52190638
Then I tried to get the corresponding regions of geneA from the BAM file
samtools view -h -b -L Homo_sapiens.GRCh38_geneA.bed SampleAligned.sortedByCoord.out.bam >geneA.bam
I tried
samtools flagstat geneA.bam
I do not see much information from the output.
How do I go about getting the percentage of reads from gene A that mapped to the genome? Is this the right way of doing this?