Hi,
I want to convert a vcf to a numeric format. I am using vctools 012 using vcftools/0.1.16.
This is how my vcf looks like:
zcat file.vcf.gz | grep -v "#" | cut -f 1,2,10,11,12 | head -n 4
Chr01 1076 1|1 0|0 0|0
Chr01 1114 0|1 0|0 0|0
Chr01 1128 1|1 0|0 0|0
Chr01 1202 0|0 0|0 0|0
What I would expect about this file in a numeric format is:
2 1 2 0
0 0 0 0
0 0 0 0
With individuals in rows and SNPs in columns
However, using vcftools like this:
vcftools --gzvcf file.vcf.gz --012 --out file_num
I have
cut -f 1,2,3,4 file_num | head -n 3
0 2 1 2
1 0 0 0
2 0 0 0
I am wondering if I am understanding wrong the output from vcftools or if it has a bug. Many thanks-