Peak plots using R
Can any one tell me how to generate peak plots using R.
I have the chromosome start and end positions. Based on those peak start and end position. How can i generate a plot. Can anyone advice on it.
Thanks
• 5,886 views
•
link
1 answer
You could pretty easily do this with either Gviz or ggbio (they're bioconductor packages). With ggbio, the general idea is to use the autoplot() function with a BED file of peaks that could just be subset (or split) by chromosome and the coordinate sorted and indexed BAM file with the alignments. See section 2.4 of the ggbio vignette for an example of this.
• 0 views
•
link
Log in to answer this question.
Do you just want to plot the position of the peaks on the genome or their positions relative to some feature (e.g., the transcription start site)?
I want to plot the read counts with respective to the position of the peaks.
Within an individual peak or summed across all peaks? In the latter case, I assume you want the peak width to be normalized (otherwise it'd be difficult to compare things).
It's within an individual peak and plot has to be generated chromosome wise
Yaa I saw the manual. there are lot of information. Thanks.
But I would like to know how to go about with bed file.
What information should I have in bed file.
The bed file should just have the locations of the peaks.
I think I am doing something wrong.Can you please correct me.
f1.bamis just a character vector, trying to autoplot it like that won't make much sense. A better example would be something like:No, this isn't using a BED file to get the regions, but this should be a short enough example to get you started.