adegenet icon indicating copy to clipboard operation
adegenet copied to clipboard

PCA result of glPca is quite different from plink

Open cpwater opened this issue 2 years ago • 1 comments

I tried to plot PCA result of glPca in adegenet and found that the result is quite different from that generated from plink. Anybody knows why?

For glPca, I ran this in R pca_gl <- glPca(glFile_rmNA, useC = T, nf = 30) scatter(pca_gl, clabel = 0)

And for plink, I ran this plink --allow-extra-chr --threads 20 -bfile Call.vcf --pca 30 --out pca_plink and the plot used PC1 and PC2 of the result.

Thanks so much and this is important to me!

glPca_raw plink_raw

cpwater avatar Mar 15 '22 14:03 cpwater

I'm not familiar with how plink works. It might have to do with centering, scaling, or whether the genotypes or haplotypes are used as individual units.

zkamvar avatar Apr 20 '22 14:04 zkamvar