Question: How To Use R To Segment Genome And Count Reads From Sequencing Data?
gravatar for C Shao
7.5 years ago by
C Shao130
C Shao130 wrote:

Hi everyone:

I have some whole-genome sequencing data, now I would like to segment human genome (1:22, X,Y) to nonoverlap equal size bins and count reads within it, defining by the location of fire base of one read.

What to do this only through R?

I am trying Rsamtools but didn't get any solution. Could some help me on this?


ADD COMMENTlink written 7.5 years ago by C Shao130
gravatar for Michael Dondrup
7.5 years ago by
Bergen, Norway
Michael Dondrup47k wrote:

In addition to Rsamtools to read your bam file you will need the IRanges package, have a look at the countOverlaps function, and the function successiveIRanges to generate interval bins. If you are experiencing problems, please post a code example to improve.

ADD COMMENTlink written 7.5 years ago by Michael Dondrup47k
Please log in to add an answer.


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