Question: ReadVCF not reading samples
0
gravatar for Alexander Skates
3.9 years ago by
United Kingdom
Alexander Skates340 wrote:

Hi, I'm trying to read a VCF file I have using readVcf, however the following occurs:

> fl <- file.path('tmp', 'vcf', 'rs11780156.genotypes.vcf.gz')
> vcf <- readVcf(fl, 'hg19')
> scanVcfHeader(fl)
class: VCFHeader
samples(190): HG00096 HG00097 ... NA12889 NA12890
meta(2): META contig
fixed(2): FILTER ALT
info(27): CIEND CIPOS ... EX_TARGET MULTI_ALLELIC
geno(0):
> dim(vcf)
[1] 13161     0
> geno(vcf)
List of length 0
names(0): 

I've looked at the file itself, and it definitely has the sample genotypes in it, so I'm not sure why geno(vcf) is empty.

The file in question is at https://www.dropbox.com/s/qwa0xoaksnnyev4s/rs11780156.genotypes.vcf.gz?dl=0 however it seems to apply to any that I try and load via readVcf. These are just VCF I files I downloaded from 1000 Genomes using tabix.

variantannotation readvcf R • 1.3k views
ADD COMMENTlink modified 15 months ago by Biostar ♦♦ 20 • written 3.9 years ago by Alexander Skates340

Sorry, broken link: https://www.dropbox.com/s/qwa0xoaksnnye4s/rs11780156.genotypes.vcf.gz?dl=0

ADD REPLYlink written 3.9 years ago by Alexander Skates340

Please paste output of sessionInfo(), gonna guess that you are missing a parameter in the read

ADD REPLYlink modified 3.9 years ago • written 3.9 years ago by Ying W3.9k

Hi Ying, it turned out that the issue was 1000 Genomes (the original source for the data) were missing the FORMAT lines in the header. I got in touch with them and they fixed it, so this is no longer an issue.

ADD REPLYlink written 3.9 years ago by Alexander Skates340
Please log in to add an answer.

Help
Access

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