Hi Michael,

We decided to come up with one function called keepStandardChromosomes() 
which
is a wrapper for both the functions suggested by you (i.e.,
keepPrimaryChromosomes() and keepAutosomes() )

Here is an example:

library(AnnotationDbi)
library(GenomicRanges)
txdb <- loadDb(system.file("extdata", "UCSC_knownGene_sample.sqlite",
                            package="GenomicFeatures"))

trans <- transcripts(txdb)
seqlevels(trans)

#gets all GRanges for Human chromosomes : 1-22,X,Y,M
got <- keepStandardChromosomes(trans,style="UCSC", species="Homo sapiens")
seqlevels(got)

#for getting only autosomes, one could then extract using keepSeqlevels()
#as shown earlier:
keepSeqlevels(got,c("chrX","chrY"))
keepSeqlevels(got,c("chrX","chrY", "chrM"))

Thanks and Regards
Sonali.
On 12/25/2013 4:15 AM, Michael Lawrence wrote:
> Awesome -- how about keepAutosomes?
>
>
> On Tue, Dec 24, 2013 at 1:11 PM, Arora, Sonali <sarora@fhcrc.org 
> <mailto:sarora@fhcrc.org>> wrote:
>
>     Hi everyone,
>
>     We are pleased to announce that we have added a new function called
>     keepStandardChromosomes() to  GenomicRanges(1.15.18)  - devel branch.
>
>     This function allows a user to subset a given object (containing a
>     seqinfo class) to
>     retain only the primary chromosomes and the autosomes.
>
>     Please feel free to get back if you face any issues.
>
>     Thanks,
>     Sonali Arora.
>
>     On 12/16/2013 11:01 AM, Michael Lawrence wrote:
>>     Awesome, thanks, Sonali. And welcome to the team.
>>
>>     Michael
>>
>>
>>     On Mon, Dec 16, 2013 at 10:38 AM, Arora, Sonali <sarora@fhcrc.org
>>     <mailto:sarora@fhcrc.org>> wrote:
>>
>>         Hi Michael,
>>
>>         That is an extremely interesting question. We have a couple
>>         of ideas and are beginning to work on it.
>>         We hope to come up with something soon.
>>
>>         Thanks,
>>         Sonali.
>>
>>
>>         On 12/16/2013 6:14 AM, Michael Lawrence wrote:
>>
>>               should be stored with the Seqinfo. It could be imputed
>>             (along with the isCircular I think) via th
>>
>>
>>         _______________________________________________
>>         Bioc-devel@r-project.org <mailto:Bioc-devel@r-project.org>
>>         mailing list
>>         https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>>
>
>


	[[alternative HTML version deleted]]

