This is a test version of Biostars. For the public version, visit https://www.biostars.org.
R Package PopGenome Will Not Read in Tab indexed VCF file using ReadVCF

PopGenome refuses to read in my Tab Indexed VCF file. Here is the code and Error:

genome <- readVCF(
+   "C:/Users/owjep/Documents/Thesis Materials/test run/Downsampled vcf/S.font_sex.pruned_O.vcf.gz.tbi",
+   tid = "NC_074665.1",
+   frompos = 1,
+   topos = 101315507,
+   numcols = 1e7,
+   include.unknown = TRUE
+ )
Caught exception inside whop_tabix::open('C:/Users/owjep/Documents/Thesis Materials/test run/Downsampled vcf/S.font_sex.pruned_O.vcf.gz.tbi'):
    'whop_tabix::open : index load failed!'
return FALSE from whoptabix_open
vcff::open : could not open tabix-index!
VCF_open : Could not open file 'C:/Users/owjep/Documents/Thesis Materials/test run/Downsampled vcf/S.font_sex.pruned_O.vcf.gz.tbi' as tabix-indexed!

Granted I am new to this Package but seems to be a problem that has apeared for other users but cannot find a solution.

r vcf popgenome

C:/Users/owjep/Documents/Thesis Materials/test run/Downsampled vcf/S.font_sex.pruned_O.vcf.gz.tbi

Looks like you are trying to open the tabix index file (.tbi) instead of the VCF (.vcf.gz) file. You should use C:/Users/owjep/Documents/Thesis Materials/test run/Downsampled vcf/S.font_sex.pruned_O.vcf.gz in your command line. Index file generally needs to be present in the same directory as the VCF file.

As an aside, please stop using spaces in folder/file names. They create additional trouble/issues. Replace the space with an _ if you must use multiple words, to keep the name as a single entity.

0 answers

No answers yet.

Log in to answer this question.