Question: Vranges (somatic signature) VariantAnnotation
gravatar for humaasif79
3.4 years ago by
humaasif790 wrote:

Hi all,
I tried to make VRanges and am getting this error

> library(VariantAnnotation)
> setwd("/home/asif/Downloads/Somatic_signature_testfiles")
> fl <- system.file('UVAcl1_haplotype_snps_only.vcf', package="VariantAnnotation")
vcf <- readVcf(fl, "human_hg19.fa")
Error in .io_check_exists(path(con)) : file(s) do not exist:

Can any body help me with this error.
i am using this manual Introduction to VariantAnnotation ,Valerie Obenchain, March 18, 2014
is there any you tube video, any workshop video or tutorial how to construct VRanges



ADD COMMENTlink modified 3.4 years ago by Steve Lianoglou12k • written 3.4 years ago by humaasif790
gravatar for federico.comoglio
3.4 years ago by
federico.comoglio100 wrote:

Hi humaasif79,

your problem is that the fl variable you defined is an empty string.

if your goal is simply to build a VCF file, I found a different vcf file in the extdata directory of the package that you could read in using readVcf.


fl <- system.file('extdata', 'gl_chr1.vcf', package="VariantAnnotation")
vcf <- readVcf(fl, "human_hg19.fa")

Kind Regards,




ADD COMMENTlink modified 3.4 years ago • written 3.4 years ago by federico.comoglio100
gravatar for James W. MacDonald
3.4 years ago by
United States
James W. MacDonald45k wrote:

The call to

fl <- system.file('UVAcl1_haplotype_snps_only.vcf', package="VariantAnnotation")

assumes that there is a file called UVAcl1_haplotype_snps_only.vcf in the package directory of VariantAnnotation, which I seriously doubt is true. Perhaps the file is in your working directory? In which case you just want to do

vcf <- readVcf("UVAcl1_haplotype_snps_only.vcf", "hg19")

Note that you cannot follow the vignettes verbatim, as they often rely on data that are supplied with the package to give examples. You must also consult the help pages for the function you are using to see what the expected inputs should be.

ADD COMMENTlink written 3.4 years ago by James W. MacDonald45k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 202 users visited in the last hour