Hi,
I have imputed genotype using IMPUTE2 (version 2.3.2). The output files look like this:
file
file_allele_probs
file_haps
file_info
file_info_by_sample
file_summary
file_warnings
Now I want to convert these files into VCF format. How can I do this?
Feeling pretty peeved about this.
bcftools expects there to be a sample file with extension
.samples
, not.sample
, which is what plink producesIt doesn't check if the file exists, doesn't produce an error message. Just crashes with a segmentation fault if the file is not there with that name. I had to run the program in gdb to find this out.
So the command is this:
And the files needed are these:
Thanks - the samples got me as well. But now I have
Could not parse REF in "CHROM:POS_REF_ALT id: rs7899632:100000625:A:G"
grrYou can fix the identifier using awk:
Looks like BCFtools has an option for exactly that. Check out the
bcftools convert --gensample2vcf ...
command here.Seems like this command wants 2 files (gen-file & sample-file). However, my IMPUTE2 output (using default options) does not contain a sample-file. This has been the issue with using other conversion tools such as gtool, plink.
IMPUTE2 is written to be sample agnostic by default. IMPUTE2 documentation states: "Currently, the only reason to provide a sample file is if you want to exclude some individuals". You should get the samples from the input dataset you give to IMPUTE2.