[BioC] Converting single GRanges object as per chromosome GRangeList
lianoglou.steve at gene.com
Tue Dec 3 15:47:11 CET 2013
On Tue, Dec 3, 2013 at 6:35 AM, Prashantha Hebbar
<prashantha.hebbar at yahoo.com> wrote:
> If I have my geneRange information as per chromosome in GRangeList form, my script becomes more efficient. because, I can retrive genotypes from each chromosomes in one go.
> So, May I know a way to convert geneRange GRange object to GRangeList Object as per chromosome number?
To answer your direct question: you can split a GRanges object into a
GRangesList by its chromosome name like so (assume that your GRanges
object is named `gr`):
R> grl <- split(gr, seqnames(gr))
More information about the Bioconductor