I guess Vince was more thinking of a GUI for constructing the ScanVcfParam object itself, given a VCF file. Have a look at https://gist.github.com/julian-gehring/978ff86691bd87e95daf (https://gist.github.com/julian-gehring/978ff86691bd87e95daf) Quick and dirty prototype, a shiny app to interactively create the ScanVcfParam: - takes a VCF file as input - displays the available fields and samples of the VCF file - returns a ScanVcfParam object based on the selection On Tue, Dec 9, 2014 at 16:20, Michael Lawrence wrote: It would be nice to have a high-level GUI that allowed the user to specify a query and then showed a sample of the query result, perhaps along with some plotting capabilities. Julian is somewhat close to something like that, I think.
On Tue, Dec 9, 2014 at 2:50 AM, Vincent Carey wrote: On Mon, Dec 8, 2014 at 9:18 PM, Valerie Obenchain wrote: (Resend - last message didn't post to the list.) OK, sounds good. In 1.13.18 I've deprecated VRangesScanVcfParam() and changed the signature of readVcfAsVRanges() to use ScanVcfParam(). If at some point we want to revise the defaults for ScanVcfParam() to a minimal subset I'm fine with that. It might be time to have a GUI widget that helps people construct a ScanVcfParam. Valerie On 12/08/14 13:32, Michael Lawrence wrote: The reason why 'y' and 'z' are different is the same reason why readVcfAsVRanges exists. It was meant to be a convenience so that users could get the minimal information needed into the VCF. But maybe that was just being too helpful, and the user ends up confused. So I agree with Julian that we should just drop VRangesScanVcfParam and have readVcfAsVRanges just be an alternative syntax to as(readVcf(), "VRanges"). Michael On Mon, Dec 8, 2014 at 10:48 AM, Valerie Obenchain wrote: Michael, how would you feel about dropping VRangesScanVcfParam? I'm open to changing the defaults in ScanVcfParam; the current 'read all fields' default is probably not the best approach. Valerie On 12/04/2014 02:47 AM, Julian Gehring wrote: Hi, Can we harmonize the default parameters for =ScanVcfParam= and =VRangesScanVcfParam=? It even seems that we could drop =VRangesScanVcfParam= since it is mainly a wrapper for =ScanVcfParam=. Currently, the defaults for importing fields from a VCF are: ScanVcfParam: fixed = character(), info = character(), geno = character() VRangesScanVcfParam: fixed = "ALT", info = NA, geno = "AD" When using readVcfAsVRanges(vcf_path, genome_name) with default parameters, that yields a VRanges object only the 'AD' metadata column. If 'AD' is not present in the VCF file (which is perfectly fine because it is not essential), it throws a warning. My main motivation behind all of this is that I would expect x = readVcf(vcf_path, genome_name) y = as(x, "VRanges") and z = readVcfAsVRanges(vcf_path, genome_name) to give an equal object. I added some code below to make the case more concrete: library(VariantAnnotation) vcf_path = system.file("extdata", "ex2.vcf", package="VariantAnnotation") ## read VRanges (implicit conversion) z = readVcfAsVRanges(vcf_path, "ncbi37") ## read VCF, convert to VRanges (explicitly) x = readVcf(vcf_path, "ncbi37") y = as(x, "VRanges") ## harmonize it vr_param = VRangesScanVcfParam(fixed = character(), info = character(), geno = character()) z2 = readVcfAsVRanges(vcf_path, "ncbi37", param = vr_param) all.equal(unname(y), unname(z2)) Best Julian _________________________________________________ Bioc-devel@r-project.org (mailto:Bioc-devel@r-project.org) mailing list https://stat.ethz.ch/mailman/__listinfo/bioc-devel (https://stat.ethz.ch/mailman/__listinfo/bioc-devel) _______________________________________________ Bioc-devel@r-project.org (mailto:Bioc-devel@r-project.org) mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel (https://stat.ethz.ch/mailman/listinfo/bioc-devel) [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org (mailto:Bioc-devel@r-project.org) mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel (https://stat.ethz.ch/mailman/listinfo/bioc-devel) [[alternative HTML version deleted]] _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel