As title I hope to calculate mapping density for chromosome 2,(doubt there's some hotspot for mapping). And eventually plot the histogram for visualization.
How can I do this? Use python or R? thx
As title I hope to calculate mapping density for chromosome 2,(doubt there's some hotspot for mapping). And eventually plot the histogram for visualization.
How can I do this? Use python or R? thx
You give very little information, so I can only give you a general answer and assume you have a mapping in SAM or BAM format for which you want to know the vertical coverage.
There are many possibilities, depending on what you want exactly and size of your data among others. One of them is using genomeCoverageBed from BEDtools:
genomeCoverageBed -ibam sample.bam -d -g genome.bed
Another is looking at the fourth or so column of samtools mpileup results.
Have you looked at:
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Just one note - if you are using BAM, the -g option is no longer needed (as of v2.13.1), as the chrom sizes are identified in the BAM header