Back to [Archive] Other discussions

1
R: PopGenome. Help?
I have installed the package called "PopGenome" to carry out analysis on 1000 Genomes data. I downloaded the files for Chromosome 21, in VCF format and followed all the instruction from the manual. I saved the two files into the same folder, unblocked them and then ran the following commands:
library(PopGenome)
readVCF("C:/Users/Davide/Documents/chr21/chr21.vcf.gz", 1000,"21",1,100000)
But I get the following error:
open: No such file or directory
Caught exception inside whop_tabix::open('C:/Users/Davide/Documents/chr21/chr21.vcf.gz'):
'whop_tabix::open : Failed to open tabix index file'
return FALSE from whoptabix_open
vcff::open : could not open tabix-index!
VCF_open : Could not open file 'C:/Users/Davide/Documents/chr21/chr21.vcf.gz' as tabix-indexed!
[1] FALSE

I posted this issue on forums but nobody could spot what the issue is. The only way to solve this problem is if SOMEONE RUNS THE SAME COMMANDS ON THEIR COMPUTER. You will have to download the aferomentioned files from the following links and put them into the same folder:

ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr21.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz

ftp://ftp.1000genomes.ebi.ac.uk/vol1/ftp/release/20130502/ALL.chr21.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz.tbi

Remember to unlock the files by right clicking on them, then proprieties,and unblock.
Can you please run it and tell me if you get the same error message?
The guide is here but I think I have followed all the directions correctly so I do not know what I am missing. http://www.inside-r.org/packages/cran/PopGenome/docs/readVCF
Admin
Well it says it cant find your file. In any case, you want to do something like

object = readVCF("C:/Users/Davide/Documents/chr21/chr21.vcf.gz", 1000,"21",1,100000)

So you have misspecified the filepath.

I get another error though:

> piffer.file = readVCF("Y:/Download/ALL.chr21.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz", 1000,"21",1,100000)
vcff::open : file opened, contains 2504 samples
[1] "Available ContigIdentifiers (parameter tid):"
[1] "21"
| : | : | 100 %
|
Error in CCC$matrix : $ operator is invalid for atomic vectors


Google gives 0 results for "Error in CCC$matrix", so it must be a special error.
Well it says it cant find your file. In any case, you want to do something like

object = readVCF("C:/Users/Davide/Documents/chr21/chr21.vcf.gz", 1000,"21",1,100000)

So you have misspecified the filepath.

I get another error though:

> piffer.file = readVCF("Y:/Download/ALL.chr21.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz", 1000,"21",1,100000)
vcff::open : file opened, contains 2504 samples
[1] "Available ContigIdentifiers (parameter tid):"
[1] "21"
| : | : | 100 %
|
Error in CCC$matrix : $ operator is invalid for atomic vectors


Google gives 0 results for "Error in CCC$matrix", so it must be a special error.

Still getting same error:
piffer.file=readVCF("C:/Users/Davide/Download/ALL.chr21.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz", 1000,"21",1,100000)
openCaught exception inside whop_tabix::open('C:/Users/Davide/Download/ALL.chr21.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz'):
'whop_tabix::open : Failed to open tabix index file'
: No such file or directory
return FALSE from whoptabix_open
vcff::open : could not open tabix-index!
VCF_open : Could not open file 'C:/Users/Davide/Download/ALL.chr21.phase3_shapeit2_mvncall_integrated_v5.20130502.genotypes.vcf.gz' as tabix-indexed

Apparently the tabix file cannot be opened.
Admin
You get that error when you don't have the TBI file in the same directory with the almost same name. Make sure you place them correctly and give them the correct names.
You get that error when you don't have the TBI file in the same directory with the almost same name. Make sure you place them correctly and give them the correct names.


That's not the issue here. I've done that but it doesn't affect the outcome. Same error message.
Admin
You have unpacked the file. That's the problem.
Admin
Your picture misled me because you have not made Windows show full filenames. :p
Your picture misled me because you have not made Windows show full filenames. :p


It's clear from the file icon that the file is not unpacked. There is a zipped icon!
Yes yes, I dun goofed.


Alright. Then earn back your lost kudos by getting this to run.
1