Convert vcf dosage file to plink format

1,309 views
Skip to first unread message

Gladi

unread,
Feb 4, 2021, 11:18:16 AM2/4/21
to plink2-users
Hello Christopher, 

I am trying to convert the imputed dose.vcf.gz files for each chromosome to plink format using plink2. 

1. Imputation was performed using Minimac4-1.0.2 and Eagle v2.4 phasing. Would like to double check that it is correct to use 'dosage=HDS' for the conversion? 

2. The conversion seemed to work fine for all chromosome files except one. The log file is shown below. How should I go about resolving this error? 

PLINK v2.00a2LM 64-bit Intel (21 May 2018)
Options in effect:
  --exclude-if-info R2<0.8
  --make-bed
  --out chr17_chr17_imputed_plink_INFO0.8
  --vcf chr17.dose.vcf.gz dosage=HDS

Random number seed: 1612445544
385217 MiB RAM detected; reserving 192608 MiB for main workspace.
Allocated 14460 MiB successfully, after larger attempt(s) failed.
Using up to 32 threads (change this with --threads).
--vcf: 8494641 variants scanned.
--vcf: chr17_imputed_plink_INFO0.8-temporary.pgen +
chr17_imputed_plink_INFO0.8-temporary.pvar +
chr17_imputed_plink_INFO0.8-temporary.psam written.
11101 samples (0 females, 0 males, 11101 ambiguous; 11101 founders) loaded from
chr17_imputed_plink_INFO0.8-temporary.psam.
1876775 out of 8443816 variants loaded from
chr17_imputed_plink_INFO0.8-temporary.pvar.
Error: PgfiInitPhase1() was called with raw_variant_ct == 8443816, but
chr17_imputed_plink_INFO0.8-temporary.pgen contains 8494641 variants.

Thank you very much! 

Christopher Chang

unread,
Feb 4, 2021, 12:27:11 PM2/4/21
to plink2-users
Retry this with a newer plink2 build; there has been at least one VCF-import bugfix since May 2018.

Christopher Chang

unread,
Feb 4, 2021, 12:29:44 PM2/4/21
to plink2-users
As for dosage=DS vs. HDS, this depends on the Minimac4 parameters you used.  If you included HDS in your Minimac4 --format argument, dosage=HDS is correct.

Gladi

unread,
Feb 11, 2021, 7:42:36 AM2/11/21
to plink2-users
noted with thanks! may i also ask if there is any equivalent of --minimac3-r2-filter for minimac4? does --extract-if-info R2>0.8 work if i require phased dosages?

Christopher Chang

unread,
Feb 11, 2021, 11:16:38 AM2/11/21
to plink2-users
--minimac3-r2-filter should compute the same phased-dosage-based R2 as minimac4.

--extract-if-info works as long as the INFO entry is there, you technically don't need to import phased dosages for that to work.
Reply all
Reply to author
Forward
0 new messages