Hi,
I want to draw the below graph so I should to get the number of mapped reads for a given exon and junction through TopHat results (accepted_hits.bam).
Please tell me the way for it.
Thanks.
Hi,
I want to draw the below graph so I should to get the number of mapped reads for a given exon and junction through TopHat results (accepted_hits.bam).
Please tell me the way for it.
Thanks.
The solution requires 3steps:
If you are having problems with step one, here is a recipe: How To Extract Reads From Bam That Overlap With Specific Regions? As mentioned before, step 3 should be handled by ggbio just fine. However, a similar lines graph as in your figure can be made using the normal R plot function (even though it looks like, this is an Excel or other spreadsheet graph):
plot(counts7T, type="b", col="red"); lines(counts7N, type="b", col="blue" );
see ?plot
, ?axis
, ?legend
to tune your plot and ?rect
to add the rectangles in the lines graph.
If you are having problems with reproducing the graph, post your code, by editing your question or in a comment.
There are potentially lots of ways to achieve a plot that looks similar. One of them is the R/Bioconductor package GenomeGraphs. Another useful Bioconductor package might be ggbio. Or you may find something more "ready-made" in one of the many visualization packages.
As mentioned earlier, ggbio exactly gives the map you asked for. Here is the link http://blog.ggplot2.org/post/30732477076/ggbio
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.