[Bioc-devel] VariantAnnotation: Harmonize default readVcf params
Vincent Carey
stvjc at channing.harvard.edu
Tue Dec 9 11:50:04 CET 2014
On Mon, Dec 8, 2014 at 9:18 PM, Valerie Obenchain <vobencha at fredhutch.org>
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
>> <vobencha at fredhutch.org <mailto:vobencha at fredhutch.org>> 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 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 mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
[[alternative HTML version deleted]]
More information about the Bioc-devel
mailing list