This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Using Rsamtools to see genome coverage of a BAM file

Hey guys,

I have an aligned bam file (although I have also the bed file), now I am going to see genome coverage. I downloaded the Rsamtools_1.0.8.zip and Rsamtools_1.0.8.tar.gz (Windows 7). please someone tell me how I can get genome coverage? I know just downloading in R not more but I have to present genome coverage of my file to my supervisor. May you please help me step by step?

For example I opened the R and I placed the Rsamtools_1.0.8.zip in C:\Users\yang\Downloads\Compressed, what should I type in R hereafter?

Thank you in advance

r

1 answer

1. Download RStudio: http://www.rstudio.com/ It is user interface for R and works great on windows. It is easier to start learning R using RStudio since you can see what its going on on each step, you can visualize the plots at the moment, well, in my opinion is good for beginners.

2. Download Rsamtools. Open Rstudio and:

source("http://bioconductor.org/biocLite.R")
biocLite("Rsamtools")

3. Read Rsamtools documentation: http://www.bioconductor.org/packages/release/bioc/vignettes/Rsamtools/inst/doc/Rsamtools-Overview.pdf

4. Try to do it yourself.

5. Come back here if you have problems or specific questions.

I don't want to be rude, but you should try to get the solution yourself. It's the only way to learn.

For other hand, if you are not familiar with R, you can get the genome coverage using another tools like samtools, bedtools... etc.

You are right Airan,

Believe me I'm trying more than 16 hours daily, I tried bedtools but not running on windows, also I installed RStudio already, but I think RStudio isn't free because demands some password. Anyway thank you

Well, don't panic. You can not learn all at once. I believe that you are trying hard but bioinformatics needs a lot of time, maybe your supervisor doesn't realize about that.

RStudio is free: http://www.rstudio.com/products/rstudio/download/

Thanks a lot for your attention and kindness.

No problem, I'm glad to help. Come back if you get in troubles with R :)

Of course, thank you

Log in to answer this question.