This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plot Read Count Over Exons For A Gene

HI all,

I have generated the read count data for my genomic locations using bedtools. I need to plot the read count with all exons belonging to the particular gene in one graph (this way for the the genes with their exons on X axis and read count on Y axis. Does anyone know of any R package /tool to do this. Thanks in advance!

coverage plot

If you give a more detailed description on the data table you have (e.g. give the output of head -n 5 yourFile.txt) I can help you better.

HI Irsan, Thanks for your post in a similar thread. I used that and the graph looks good. But I would like to have it say gene A segmented into its eons on X axis and the counts on Y axis. The header same as the previous Q. Gene Exon Sample1 Sample 2 Sample 3

Also its whole exon, so its a huge file, can I plot for each gene separately but put them in the same pdf???

Loop over your data frame (probably this can be done efficiently with one of the apply functions) and subset the data frame by gene ID, then make the plot for that gene ID.

1 answer

I did the following: load my data in to R --> split up the data based on gene name --> use barplot() function in a for loop to create the plots & save them as .bmp So I didn't use a particular R package, just the standard barplot() function

Thanks! I will try using this.

Hi Were you able to draw the plot. Cn you share the code?

Hi varun,

Iam sorry I didnt see this earlier. Do you still need any help??

Hi Mamta Can you still share the code

Thanks Varun

Sure Varun. I will email it to you. Can you provide your email ID?

Hi. Can you share your code?

I very appreciate it if you do so :)

Log in to answer this question.