Question: vcftools Error: Require Genotypes in VCF file in order to output as 0/1/2 matrix.
0
gravatar for mayara.salvian
9 weeks ago by
mayara.salvian10 wrote:

Hi everyone,

I have a vcf-file and I'm trying to convert my vcf file into 012 genotype matrix using the following code:

vcftools --vcf myfile.vcf --012 --out out_file

I didn't have problems when I run this code before, however now the following error message appears:

Error: Require Genotypes in VCF file in order to output as 0/1/2 matrix.

I've tried increasing the number of temporary files allowed by the operating system used (e.g. ulimit -n 1000), but still didn't work.

Could someone help me? Thanks.

vcftools vcf • 310 views
ADD COMMENTlink modified 9 weeks ago by Pierre Lindenbaum115k • written 9 weeks ago by mayara.salvian10
0
gravatar for Pierre Lindenbaum
9 weeks ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum115k wrote:

there is no genotype in your vcf.

check with

grep CHROM -m1 input.vcf
ADD COMMENTlink modified 9 weeks ago • written 9 weeks ago by Pierre Lindenbaum115k

Yes, according with the error message there is no genotype in my vcf. However I checked my file using your suggestion and there is genotype on it.

ADD REPLYlink written 9 weeks ago by mayara.salvian10

what was the output of the command please.

ADD REPLYlink written 9 weeks ago by Pierre Lindenbaum115k
1

The output of the command showed me only the following columns: #CHROM POS ID REF ALT QUAL FILTER INFO FORMAT ID1 ID2 ID3 ... IDn Where: ID1, ID2, ID3 until IDn are the samples' ID.

ADD REPLYlink written 9 weeks ago by mayara.salvian10

Hello mayara.salvian ,

please show us the first lines of the variants.

fin swimmer

ADD REPLYlink written 9 weeks ago by finswimmer8.2k

Hello finswimmer,

These are the first seven lines of my file:

#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT ID1* ID2* ID3* ID4* ID5*
chr1 POS1 ID1 A G . . . GT 0/0 0/1 0/0 0/0 0/1     
chr1 POS2 ID2 T C . . . GT 0/1 0/1 0/0 0/0 0/0     
chr1 POS3 ID3 G A . . . GT 0/0 0/1 0/1 0/0 0/1     
chr1 POS4 ID4 G C . . . GT 0/1 0/0 0/1 0/0 0/1     
chr1 POS5 ID5 A G . . . GT 0/1 0/0 0/0 1/1 1/1     
chr1 POS6 ID6 A G . . . GT 0/0 0/1 0/1 0/0 0/1

Where: ID (1..6) are the SNPs' ID and ID*(1..5) are the Samples' ID.

ADD REPLYlink modified 9 weeks ago • written 9 weeks ago by mayara.salvian10

Hello again,

just a guess: Maybe the * in the sample names makes some problems here. Remove them from the names and try again.

fin swimmer

ADD REPLYlink written 9 weeks ago by finswimmer8.2k
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: 1525 users visited in the last hour