Question: Plot Reads Against Coordinates
0
gravatar for Vikas Bansal
8.5 years ago by
Vikas Bansal2.4k
Berlin, Germany
Vikas Bansal2.4k wrote:

Hi,

I have 2 files - bed file (chromosome, start and end) and second file is mapped reads which are in sam file. I want to plot reads against coordinates from my bed file. Example my bed file contains-

chr4   50    100
chr4   100   150
chr4   150   200
chr4   200   250

With this bed file, I can extract reads from sam file which are mapped between chr4: 50 and 250 positions. In the end, I want a plot like this (image taken from internet but I modified it little bit). Each read is shown according to its start position and length of the bar represents read length. I found this image and about python and matlab here. But I want to do this in R. The thing is, I have about 40 bed files and with the help of par(mfrow) in R, I will make 40 plots on same sheet. Any suggestions how would you do it or any R package will be great. I would really appreciate your help.

Thanks and Best regards,

Vikas

read plot coordinates R • 3.0k views
ADD COMMENTlink modified 8.4 years ago by Sean Davis26k • written 8.5 years ago by Vikas Bansal2.4k
1
gravatar for Neilfws
8.5 years ago by
Neilfws48k
Sydney, Australia
Neilfws48k wrote:

(1) There are very similar plots in the documentation (PDF) for the R/Bioconductor package ggbio. I've linked to v2.9 since documentation for the newer 2.10 is not yet written in full.

(2) I would not put 40 plots on the same "sheet".

ADD COMMENTlink written 8.5 years ago by Neilfws48k

Thanks. You are right, it is not a good idea to put 40 plots on same sheet.

ADD REPLYlink written 8.5 years ago by Vikas Bansal2.4k
0
gravatar for Sean Davis
8.5 years ago by
Sean Davis26k
National Institutes of Health, Bethesda, MD
Sean Davis26k wrote:

This does not produce a "publication quality" set of figures, but you could use the SRAdb bioconductor package to control the IGV browser to automatically make snapshots of any regions of interest. There is an example in the SRAdb vignette or in the "Accomplishing Exome Sequencing Data Tasks with Bioconductor" tutorial on this page.

ADD COMMENTlink written 8.5 years ago by Sean Davis26k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2099 users visited in the last hour