This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Counting Mapped Read Of An Exon In Rna-Seq Analysis

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.

rna-seq

3 answers

The solution requires 3steps:

  1. Counting overlaps with exons
  2. Plotting a lines graph
  3. plotting genemodels.

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

Log in to answer this question.