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] GenomicAlignments: using asMates=TRUE and yieldSize with paired-end BAM files

2014-03-19 Thread Valerie Obenchain
On 03/19/14 10:24, Michael Love wrote: hi Valerie, If the Bam is not sorted by name, isn't it possible that readGAlignment* will load > yieldSize number of reads in order to find the mate? Sorry, our emails keep criss-crossing. Because the mate-pairing is now done in C yieldSize is no longer

Re: [Bioc-devel] GenomicAlignments: using asMates=TRUE and yieldSize with paired-end BAM files

2014-03-19 Thread Valerie Obenchain
Hi Mike, You no longer need to sort Bam files to use the pairing algo or yieldSize. The readGAlignment* functions now work with both constraints out of the box. Create a BamFile with yieldSize and indicate you want mates. bf <- BamFile(fl, yieldSize=1, asMates=TRUE) Maybe set some specif

Re: [Bioc-devel] GenomicAlignments: using asMates=TRUE and yieldSize with paired-end BAM files

2014-03-19 Thread Valerie Obenchain
On 03/19/14 07:39, Michael Love wrote: hi, From last year, in order to use yieldSize with paired-end BAMs, I should sort the BAMs by qname and then use the following call to BamFile: library(pasillaBamSubset) fl <- sortBam(untreated3_chr4(), tempfile(), byQname=TRUE) bf <- BamFile(fl, index=c

Re: [Bioc-devel] GenomicAlignments: using asMates=TRUE and yieldSize with paired-end BAM files

2014-03-19 Thread Michael Love
hi Valerie, If the Bam is not sorted by name, isn't it possible that readGAlignment* will load > yieldSize number of reads in order to find the mate? Mike On Wed, Mar 19, 2014 at 1:04 PM, Valerie Obenchain wrote: > Hi Mike, > > You no longer need to sort Bam files to use the pairing algo or yi

[Bioc-devel] GenomicAlignments: using asMates=TRUE and yieldSize with paired-end BAM files

2014-03-19 Thread Michael Love
hi, >From last year, in order to use yieldSize with paired-end BAMs, I should sort the BAMs by qname and then use the following call to BamFile: library(pasillaBamSubset) fl <- sortBam(untreated3_chr4(), tempfile(), byQname=TRUE) bf <- BamFile(fl, index=character(0), yieldSize=3, obeyQname=TRUE)