Open cpwater opened 2 years ago
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)
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.
plink --allow-extra-chr --threads 20 -bfile Call.vcf --pca 30 --out pca_plink
Thanks so much and this is important to me!
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.
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!