Did not know to interpret the % of reads for geneA from my sample mapping to the genome
• 0 views
•
link
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?
Log in to answer this question.
Could you please show the first several reads of your original bam file and the results of samtools flagstat?