Re: [Bioc-devel] restrictToSNV for VCF

2014-04-09 Thread Valerie Obenchain
Update on these tasks. 1) XStringSetList now has an nchar() method (as of Biostrings 2.31.17) 2) restrictToSNV() was removed from VariantAnnotation 3) The following generics and methods for VCF and VRanges have been added to VariantAnnotation 1.9.50: isSNV() isInsertion() isDeletion() isInde

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-21 Thread Michael Lawrence
Some of the inconsistency emerges from wrappers that correspond to operations on the rowData. I think that's fine as long as it's obvious (as in the case of findOverlaps and isSNV). The head and tail functions are by convention row-based for rectangular objects. I agree though that if we keep 1D e

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-21 Thread Hervé Pagès
Hi Martin, On 03/21/2014 01:45 PM, Martin Morgan wrote: On 03/20/2014 05:20 PM, Hervé Pagès wrote: Hi, On 03/19/2014 01:10 PM, Michael Lawrence wrote: You can apparently use 1D extraction for VCF, which is a little surprising; I learned it from restrictToSNV. This is inherited from Summariz

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-21 Thread Michael Lawrence
1D extraction on matrices (treating them as a 1D vector) is actually useful, but I don't see how that would really make sense here. This is an inconsistency, and inconsistencies are often OK when there is a benefit (like gr$foo), but unless I'm missing something the benefit here seems to be x[i] vs

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-21 Thread Martin Morgan
On 03/20/2014 05:20 PM, Hervé Pagès wrote: Hi, On 03/19/2014 01:10 PM, Michael Lawrence wrote: You can apparently use 1D extraction for VCF, which is a little surprising; I learned it from restrictToSNV. This is inherited from SummarizedExperiment: > example(SummarizedExperiment) > se

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-20 Thread Hervé Pagès
On 03/20/2014 05:20 PM, Hervé Pagès wrote: [...] Following that logic names(se1) also probably return colnames(se1). /\ should H. H. On Wed, Mar 19, 2014 at 1:07 PM, Vincent Carey wrote: On Wed, Mar 19, 2014 at 4:00

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-20 Thread Hervé Pagès
Hi, On 03/19/2014 01:10 PM, Michael Lawrence wrote: You can apparently use 1D extraction for VCF, which is a little surprising; I learned it from restrictToSNV. This is inherited from SummarizedExperiment: > example(SummarizedExperiment) > se1 class: SummarizedExperiment dim: 200 6

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-19 Thread Michael Lawrence
Thanks Sean. Probably also need an "isSubstitution" for any substitution, either SNV or complex. On Wed, Mar 19, 2014 at 3:20 PM, Sean Davis wrote: > > > On Wed, Mar 19, 2014 at 4:26 PM, Valerie Obenchain wrote: > >> Thanks for the feedback. >> >> I'll look into nchar for XStringSetList. >> >>

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-19 Thread Sean Davis
On Wed, Mar 19, 2014 at 4:26 PM, Valerie Obenchain wrote: > Thanks for the feedback. > > I'll look into nchar for XStringSetList. > > I'm in favor of supporting isDeletion(), isInsertion(), isIndel() and > isSNV() for the VCF classes and removing restrictToSNV(). I could add an > argument 'all_alt

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-19 Thread Valerie Obenchain
Thanks for the feedback. I'll look into nchar for XStringSetList. I'm in favor of supporting isDeletion(), isInsertion(), isIndel() and isSNV() for the VCF classes and removing restrictToSNV(). I could add an argument 'all_alt' or 'all_alt_agreement' to be used with CollapsedVCF in the case w

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-19 Thread Michael Lawrence
You can apparently use 1D extraction for VCF, which is a little surprising; I learned it from restrictToSNV. On Wed, Mar 19, 2014 at 1:07 PM, Vincent Carey wrote: > > > > On Wed, Mar 19, 2014 at 4:00 PM, Michael Lawrence < > lawrence.mich...@gene.com> wrote: > >> It would be nice to have funct

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-19 Thread Vincent Carey
On Wed, Mar 19, 2014 at 4:00 PM, Michael Lawrence wrote: > It would be nice to have functions like isSNV, isIndel, isDeletion, etc > that at least provide precise definitions of the terminology. I've added > these, but they're designed only for VRanges. Should work for ExpandedVCF. > > Also, it w

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-19 Thread Michael Lawrence
Also, the code for DNAStringSetList is too low-level. There should just be an nchar,XStringSetList that does the same thing as nchar,CompressedCharacterList. Then restrictToSNV or whatever just does any(nchar(x) == 1L) for any List. Michael On Wed, Mar 19, 2014 at 1:00 PM, Michael Lawrence wrot

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-19 Thread Michael Lawrence
It would be nice to have functions like isSNV, isIndel, isDeletion, etc that at least provide precise definitions of the terminology. I've added these, but they're designed only for VRanges. Should work for ExpandedVCF. Also, it would be nice if restrictToSNV just assumed that alt(x) must be somet

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-19 Thread Stephanie M. Gogarten
I would say rows 1 and 3 are SNVs, but not row 4. For this application I think a variant has to be an SNV or not, as you can't pass half a variant. (I suppose you could remove the ALT values with length > 1 and set those genotypes to missing, but that is both complicated and unexpected behavi

Re: [Bioc-devel] restrictToSNV for VCF

2014-03-18 Thread Julian Gehring
Hi Valerie, I would consider G>C an SNV, G>TT not. But I assume that there exists no clear consensus on this. How about a flag that let's the second pass as SNV optionally, so everybody can get what one needs? Best wishes Julian On 18/03/14 18:36, Valerie Obenchain wrote: > Hi, > > I've adde