[Bioc-devel] VariantAnnotation: Harmonize default readVcf params

Julian Gehring julian.gehring at embl.de
Tue Dec 9 18:56:30 CET 2014

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 

On Mon, Dec 8, 2014 at 9:18 PM, Valerie Obenchain 

(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


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(),


On Mon, Dec 8, 2014 at 10:48 AM, Valerie Obenchain

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.


On 12/04/2014 02:47 AM, Julian Gehring wrote:


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

Currently, the defaults for importing fields from a VCF are:

ScanVcfParam: fixed = character(), info = character(), geno =

VRangesScanVcfParam: fixed = "ALT", info = NA, geno = "AD"

When using

readVcfAsVRanges(vcf_path, genome_name)

with default parameters, that yields a VRanges object only the
metadata column.  If 'AD' is not present in the VCF file (which
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")


z = readVcfAsVRanges(vcf_path, genome_name)

to give an equal object.  I added some code below to make the
case more


vcf_path = system.file("extdata", "ex2.vcf",

## 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))


Bioc-devel at r-project.org (mailto:Bioc-devel at r-project.org) 
mailing list
https://stat.ethz.ch/mailman/__listinfo/bioc-devel (https://stat.ethz.ch/mailman/__listinfo/bioc-devel)

Bioc-devel at r-project.org (mailto:Bioc-devel at 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 at r-project.org (mailto:Bioc-devel at 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]]

More information about the Bioc-devel mailing list