Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-30 Thread Julian Gehring
Hi, With the convenience that seqnamesStyles offers now, having to specify the chromosome name notation manually would feel like a step back. In terms of subsetting genomic ranges, I normally think of four major groups of interest: - Toplevel/standard: 1,..22,X,Y,MT - Autosomes: 1,..,22 - A

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-27 Thread Michael Lawrence
The dropSeqlevels approach for the autosomes is acceptable in terms of readability, but it means the code needs to know the seqname style (chrX rather than just X). On Fri, Dec 27, 2013 at 1:49 PM, Valerie Obenchain wrote: > I think the idea was to avoid the proliferation of small, specialized >

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-27 Thread Valerie Obenchain
I think the idea was to avoid the proliferation of small, specialized functions. library(TxDb.Hsapiens.UCSC.hg19.knownGene) gr <- transcripts(TxDb.Hsapiens.UCSC.hg19.knownGene) ## autosomes std <- keepStandardChromosomes(gr, "Homo sapiens", "UCSC") dropSeqlevels(std, c("chrX", "chrY")) ## allo

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-27 Thread Tim Triche, Jr.
Hi Sonali, Thank you for this much requested addition to the GenomicRanges API! I would like to second Michael Lawrence's assertion that keepAutosomes() is more straightforward and harder to misunderstand or misuse than a special case of keep/dropSeqlevels. (If the author of a function has tr

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-27 Thread Arora, Sonali
Michael, Since there is no universal seqnameStyle defined for various objects and they do not internally store the seqnameStyle and species information, we decided to ask the user for all 3 arguments. Marc is aware of these issues and my code. Regarding the dependency of GenomicRanges on Anno

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-27 Thread Michael Lawrence
I guess you mean dropSeqlevels, not keepSeqlevels? That should work. But your function needs some tweaking, I think. The function should just take the seqnameStyle from the object. There's no need to require the user to specify it, and then check for consistency. I would like to be able to just cal

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-27 Thread Arora, Sonali
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("ext

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-25 Thread Michael Lawrence
Awesome -- how about keepAutosomes? On Tue, Dec 24, 2013 at 1:11 PM, Arora, Sonali 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 g

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-24 Thread Arora, Sonali
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. Plea

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-16 Thread Michael Lawrence
Awesome, thanks, Sonali. And welcome to the team. Michael On Mon, Dec 16, 2013 at 10:38 AM, Arora, Sonali 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, > Son

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-16 Thread Arora, Sonali
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 is

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-16 Thread Michael Lawrence
On Mon, Dec 16, 2013 at 5:00 AM, Julian Gehring wrote: > Hi Michael, > > I would second your request. In a package I'll submitting soon, I have a > work-around for this by defining a set of functions like 'hsAutosomes', > 'hsAllosomes' etc. that return the respective set of human chromosome > nam

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-16 Thread Julian Gehring
Hi Michael, I would second your request. In a package I'll submitting soon, I have a work-around for this by defining a set of functions like 'hsAutosomes', 'hsAllosomes' etc. that return the respective set of human chromosome names. Perhaps on could incorporate this in the 'seqinfo' class,

Re: [Bioc-devel] request: high-level seqlevel utilities

2013-12-16 Thread Michael Lawrence
Is this being taken into consideration by anyone? Will it be worked on? Thanks, Michael On Thu, Dec 12, 2013 at 1:36 PM, Michael Lawrence wrote: > We've found that analysts often need to restrict seqlevels to certain > pre-defined sets of chromsomes. Given the variability across organisms, it

[Bioc-devel] request: high-level seqlevel utilities

2013-12-12 Thread Michael Lawrence
We've found that analysts often need to restrict seqlevels to certain pre-defined sets of chromsomes. Given the variability across organisms, it would be nice to have an abstraction. We often see this in code: keepSeqlevels(seqinfo, as.character(1:22) keepSeqlevels(seqinfo, c(1:22, "X", "Y")) Pe