I am trying to run the R command readVcf in R, it shows function not found. I have already downloaded the package "VariantAnnotation". I don't know if it helps. Does anyone have any idea?
I am trying to run the R command readVcf in R, it shows function not found. I have already downloaded the package "VariantAnnotation". I don't know if it helps. Does anyone have any idea?
Have you loaded it, library('VariantAnnotation')
!!
Just run these 3 command lines in R:
source("http://bioconductor.org/biocLite.R")
biocLite("VariantAnnotation") #install the package
library("VariantAnnotation") #load the package
example("readVcf") #optional, test the function by running example codes
Hi,
I am trying to use VariantAnnotation and this is the error I am getting
library("VariantAnnotation")
f1 <-system.file("extdata","chr22.vcf.gz", package="VatiantAnnotation")
vcf<-readVcf(f1,"hg19")
Error in .io_check_exists(path(con)) : file(s) do not exist:
''
list.files(system.file("extdata", package="VariantAnnotation"))
[1] "chr22.vcf.gz" "chr22.vcf.gz.tbi" "chr7-sub.vcf.gz"
[4] "chr7-sub.vcf.gz.tbi" "ex2.vcf" "gl_chr1.vcf"
[7] "h1187-10k.vcf.gz" "h1187-10k.vcf.gz.tbi" "structural.vcf"
Much appreciate help,
Thanks,
Tinu
True but if I read my own data using readVcf:
file <- readVcf("file.vcf","hg19")
the commands
hdr <- scanVcfHeader(file)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘scanVcfHeader’ for signature ‘"CollapsedVCF"’**
and cannot follow the pipeline:
rm(hdr)
info(hdr)
geno(hdr)
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
you write you have downloaded it, but have you installed the package and Bioconductor? rt(fine)m: http://bioconductor.org/install/
I found this tutorial very useful especially for reading data into R