Seq Array converting VCF to GDS using seqVCF2GDS, unable to find file problems with vcf.fn
2
0
Entering edit mode
cav3gh • 0
@cav3gh-15680
Last seen 5.7 years ago

So, I can read the vcf file into R using read.vcf, but I cannot seem to get seqVCF2GDS to work.  I have tried the following code:

> vcf_test1 <- read.vcf("/Users/Desktop/batch_1.vcf")
Reading 10000 / 10000 loci.
Done.

> vcf.fn <- "C:/Users/Desktop/batch_1.vcf"
> seqarray_test1 <- seqVCF2GDS(vcf.fn)
Error in stopifnot(is.character(out.fn), length(out.fn) == 1L) : 
  argument "out.fn" is missing, with no default
> vcf.fn = "C:/Users/Desktop/batch_1.vcf"
> seqarray_test1 <- seqVCF2GDS(vcf.fn, "mangrove.gds")
Error in file(vcf.fn[1L], open = "rt") : cannot open the connection
In addition: Warning message:
In file(vcf.fn[1L], open = "rt") :
  cannot open file 'C:/Users/Desktop/batch_1.vcf': No such file or directory
 

I am not sure what I am doing wrong

seqarray • 1.6k views
ADD COMMENT
0
Entering edit mode
zhengx ▴ 30
@zhengx-7950
Last seen 5.3 years ago
United States

Please make sure your file exists.

You might try

file.size(vcf.fn)

to see whether it returns the correct size of that VCF file.

 

ADD COMMENT
0
Entering edit mode
@stephanie-m-gogarten-5121
Last seen 4 months ago
University of Washington

Note that you are using two different paths in the example that worked (with read.vcf) and the example that did not work, so please try using the original file path.

vcf.fn <- "/Users/Desktop/batch_1.vcf"
seqarray_test1 <- seqVCF2GDS(vcf.fn, "mangrove.gds")
ADD COMMENT

Login before adding your answer.

Traffic: 804 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6