How does PLINK2 --pca handle a merged dataset containing both dosage and hard-call genotypes?

14 views
Skip to first unread message

ali a

unread,
Jul 10, 2026, 9:09:19 AM (8 days ago) Jul 10
to plink2-users

Hello,

I am working with a merged dataset that contains two types of genotype data in the same pgen file:

  • 143 low-coverage imputed samples (from GLIMPSE2) with dosage values (DS field, continuous 0–2, e.g. 1.952, 0.776) and high imputation quality (INFO ~0.999)
  • 3,537 high-coverage reference samples with hard genotype calls only (integer 0, 1, 2, no DS field)

The merged BCF was created using bcftools merge and converted to pgen format using:

plink2 --bcf merged_file.bcf dosage=DS --make-pgen --out merged_pgen

We verified using --export A that the imputed samples retain fractional dosage values while the reference samples show only integer values (0, 1, 2) in the output.

My questions are:

  1. When running --pca on this merged pgen file, does PLINK2 use dosage values for samples that have DS and hard calls for samples that do not? Or does it convert everything to hard calls first?

  2. Does PLINK2 construct the GRM differently for samples with dosage vs samples with hard calls, or are both treated identically in the matrix computation?

  3. Is there any documentation or reference describing how PLINK2 handles per-sample mixed dosage/hard-call data in PCA specifically?

Context: We found that running --pca on the merged dataset produces biologically correct results (imputed samples cluster within the correct reference population, 142/143 samples within reference PC1 range). In contrast, projecting the imputed samples onto reference PCs using --score with variance-standardize produces a systematic PC1 offset of ~0.240, placing all projected samples completely outside the reference PC1 range (0/143 within range).

Thank you.


Chris Chang

unread,
Jul 10, 2026, 11:09:05 AM (8 days ago) Jul 10
to ali a, plink2-users
1. plink2 --pca uses dosages when available.
2. The GRM is constructed in the same manner in both cases (matrix operation works with dosages).
3. No additional documentation on this subtopic, but practically all plink2 operations which take dosages into account work in this manner (hardcalls just act like a dosage value of 0, 1, or 2).

As for your projection result, I'm guessing you have some uncertain PC1-relevant variants where the *mean* of your hardcall distribution is significantly different from the mean of the dosages.  As a toy example, imagine a variant where most samples were assigned a dosage of 0.4, and that was always rounded to zero when producing hardcalls.

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/plink2-users/46c41b36-4725-4fe0-b47f-2297be7c2168n%40googlegroups.com.

ali a

unread,
Jul 11, 2026, 2:36:56 PM (7 days ago) Jul 11
to plink2-users
Great! Thank you very much for your time and clear explanation.

It clearly explains our initial attempt when using --score with variance-standardize but observed a systematic PC1 offset, placing all imputed samples completely outside the reference PC1 range. After switching to a joint PCA on the merged dataset, the imputed samples clustered correctly within the expected reference population. However, we were wondering how PLINK2 handles mixed type data and your answer provide us with confirmation. 

Your point about the projection offset makes sense — we verified using --export A that imputed samples retain fractional dosage values while reference samples show integer values (0, 1, 2). This difference likely drove the systematic offset when variance-standardize was applied using hardcall-based reference frequencies.

Again, much appreciated for your insight.
Reply all
Reply to author
Forward
0 new messages