[BioC] subset GRanges

Steve Lianoglou mailinglist.honeypot at gmail.com
Thu Jan 10 17:48:44 CET 2013


Hi,

On Wed, Jan 9, 2013 at 3:23 PM, Wim Kreinen <wkreinen at gmail.com> wrote:
> Hello,
>
> I have a GRanges object gr comprising all (human) chromosomes. And now I
> would like to retrieve all ranges of one special chromosome (e.g.
> Chromosome 11). I dont find a way neither with window, subset or seqselect.
> How does it work?

Assuming your 11th chromosome is named "chr11":

R> stuff <- gr[seqnames(gr) == 'chr11']

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list