[Bioc-devel] [VariantAnnotation]
Valerie Obenchain
vobencha at fhcrc.org
Mon Dec 2 22:20:10 CET 2013
The replacement method for fixed<- on a VCFHeader has been added to the
devel version 1.19.17.
Valerie
On 11/20/2013 10:08 AM, Valerie Obenchain wrote:
> Correction below.
>
>
> On 11/20/2013 09:59 AM, Valerie Obenchain wrote:
>> Hi Delphine,
>>
>> 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,
>>
>> http://www.bioconductor.org/help/mailing-list/
>>
>> 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.
>
> Sorry, expand() is not relevant here - I was thinking of data
> replacement not header. The header is a much simpler case. This
> shouldn't be to bad. I'll put it on the TODO.
>
> Valerie
>
>
>>
>> Thanks.
>> Valerie
>>
>>
>> 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.
>>>
>>> Delphine.
>>>
>>> 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",
>>>> row.names="NS")
>>>> 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.
>>>>
>>>> Valerie
>>>>
>>>>
>>>> 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(
>>>>> Number=rep("1",2),
>>>>> Type=c("String","String"),
>>>>> Description=c("Genotype", "Genotype Likelihoods")
>>>>> )
>>>>> row.names(genodf)=c("GT","GL")
>>>>>
>>>>> We would like to do something like:
>>>>>
>>>>> geno(header(VCFobject)) <- genodf
>>>>>
>>>>>
>>>>> Thank you very much in advance.
>>>>>
>>>>> Best regards.
>>>>>
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
More information about the Bioc-devel
mailing list