Valerie Obenchain | 6 May 18:06 2013

Re: VariantAnnotation error with readVcf in Windows 7


The error indicates a problem with the arguments supplied to readVcf(). 
You can discover available methods with showMethods(),

 > showMethods("readVcf")
Function: readVcf (package VariantAnnotation)
file="character", genome="character", param="missing"
file="character", genome="character", param="ScanVcfParam"
file="character", genome="missing", param="missing"
file="TabixFile", genome="character", param="GRanges"
file="TabixFile", genome="character", param="GRangesList"
file="TabixFile", genome="character", param="missing"
file="TabixFile", genome="character", param="RangedData"
file="TabixFile", genome="character", param="RangesList"
file="TabixFile", genome="character", param="ScanVcfParam"

What does your 'param' object look like? From above you can see it must 
be a 'GRanges', 'GrangesList', 'missing', etc. ...


On 05/06/2013 07:47 AM, ying chen wrote:
> Hi guys, I tried a sample with Variant Annotation's eadVcf. I ran the code successfully in Linux (OK I had
some warnings regarding " unpackVcf field '..': NAs introduced by coercion"). But when I tried the same
code in R3.0.0 in windows 7, I got the error message: > for(i in 1:length(vcflist1)){
>           indexTabix(vcflist1[i], format="vcf")
>           vcf <- readVcf(TabixFile(vcflist1[i]), "hg19", params)
>           outputfile=paste(sub(".vcf.gz","",vcflist1[i]),"_test.vcf",sep="")
>           writeVcf(vcf,outputfile)
>           bgzip(outputfile, overwrite=TRUE)
>           indexTabix(paste(outputfile,".gz",sep=""), format="vcf")
>           rm(vcf)
>           rm(outputfile)
>     }
> Error in (function (classes, fdef, mtable)  :
>    unable to find an inherited method for function ‘readVcf’ for signature ‘"TabixFile",
"character", "standardGeneric"’ What did I do wrong? Thanks a lot for the help! Ying
>> sessionInfo()
> R version 3.0.0 (2013-04-03)
> Platform: x86_64-w64-mingw32/x64 (64-bit)locale:
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    attached base packages:
> [1] parallel  stats     graphics  grDevices utils     datasets  methods   base     other attached packages:
>   [1] VariantAnnotation_1.6.5 Rsamtools_1.12.2        Biostrings_2.28.0       GenomicRanges_1.12.2
>   [5] IRanges_1.18.0      RSQLite_0.11.3          DBI_0.2-6
>   [9] AnnotationDbi_1.22.5    Biobase_2.20.0          BiocGenerics_0.6.0      BiocInstaller_1.10.1   loaded via a
namespace (and not attached):
>   [1] biomaRt_2.16.0         bitops_1.0-5           BSgenome_1.28.0        GenomicFeatures_1.12.1 RCurl_1.95-4.1
>   [6] rtracklayer_1.20.2     stats4_3.0.0           tools_3.0.0            XML_3.96-1.1           zlibbioc_1.6.0
> 	[[alternative HTML version deleted]]
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@...
> Search the archives:

Bioconductor mailing list
Search the archives: