vobencha at fhcrc.org
Wed Nov 20 18:59:36 CET 2013
I've cc'd your message to the Bioconductor mailing list. We have two
lists, one for general questions and the other for bug reports/feature
requests. Please post future questions to one of these lists instead of
sending them to a single person. The lists reach a wider audience and
others can chime in with their responses/experience. You can find info
about the mailing lists here,
If you would like to submit a patch for 'fixed<-' on a VCFHeader I'd be
happy to take a look at it. This replacement method was not added along
with the others because changes made to 'fixed' must be compatible with
writeVcf() and expand(). The most important components of this are
appropriate elementLengths of REF and ALT. The replacement method should
have validity checks for VCFHeader and confirmation that writeVcf()
outputs a valid vcf and expand() can unlist the data.
On 11/15/2013 05:39 AM, delphine charif wrote:
> Hi Valerie,
> Thank you very much. I installed the devel branch of VariantAnnotation
> and used the 'geno<-' replacement method
> for VCFHeader and everything goes well.
> But ... :-) ... now, tried to use 'fixed<-' as a replacement method
> (Would like to added filters to the original VCF) for
> VCFHeader and got this message:
> Erreur dans (function (classes, fdef, mtable) :
> unable to find an inherited method for function ‘fixed<-’ for signature
> ‘"VCFHeader", "SimpleDataFrameList"’
> Do you think that you will also implement this replacement method ?
> Thank you very much for your reactivity.
> Best regards.
> Le 05/11/13 01:44, Valerie Obenchain a écrit :
>> Hi Delphine,
>> In 1.9.5 (devel branch) I've added 'meta<-', 'info<-' and 'geno<-'
>> replacement methods for VCFHeader.
>> fl <- system.file("extdata", "ex2.vcf", package="VariantAnnotation")
>> vcf <- readVcf(fl, "hg19")
>> newInfo <- DataFrame(Number=1, Type="Integer",
>> Description="Number of Samples With Data",
>> info(header(vcf)) <- rbind(info(hdr), newInfo)
>> There is also a 'header<-' method that replaces the entire VCFHeader
>> in a VCF object.
>> hdr <- header(vcf)
>> meta(hdr)[3,1] <- "myNewSource"
>> header(vcf) <- hdr
>> Let me know if you run into problems.
>> On 10/15/2013 07:48 AM, delphine charif wrote:
>>> Dear Valerie,
>>> Thank you very much for your work on the package VariantAnnotation.
>>> We are using this package
>>> and we would like to know if there is a way to update the VCFheader of
>>> an existing VCF object.
>>> By example:
>>> genodf <- DataFrame(
>>> Description=c("Genotype", "Genotype Likelihoods")
>>> We would like to do something like:
>>> geno(header(VCFobject)) <- genodf
>>> Thank you very much in advance.
>>> Best regards.
More information about the Bioc-devel