getting unlinked variants and PCA analysis
1
0
Entering edit mode
6.0 years ago
wrab425 ▴ 50

We have a Vcf file containing the variants from a haploid species. We need to carry out PCA analysis on these variants but most are linked. How can we select a set of unlinked variants? PLINK is set up to do on diploid genotypes. How does one work with haploid genotypes if one uses PLINK?

phylogeny PCA plink • 1.8k views
ADD COMMENT
0
Entering edit mode

Added a plink tag so that those watching that tag may pick this up

ADD REPLY
1
Entering edit mode
6.0 years ago

PLINK's --indep-pairwise command for selecting approximately-unlinked variants should have no problem with haploid data. However, you'll want to perform the actual PCA with another script/tool, since the variance-normalized similarity formula used by PLINK --pca only works properly for diploid data.

(Edit: on second thought, dividing the eigenvalues by 2 at the end should be enough to correct for the haploid/diploid variance difference.)

ADD COMMENT
0
Entering edit mode

Thanks a lot, It seems as though it would be better to use another tool for the PCA would you be able to suggest the easiest to use?

ADD REPLY
0
Entering edit mode

Chris; I think one needs to divide through by 4 since the variance-covariance matrix will be inflated by 4 since the individuals with the snps are coded by 2 rather than 1.

ADD REPLY
0
Entering edit mode

No, because --pca uses variance-standardized genotype values.

Meanwhile, plink 2.0 --pca should correct the eigenvalues for you.

ADD REPLY
0
Entering edit mode

I have run all of the commands in the pca pipeline and it all runs beautifully and gives what look like excellent results. I get the same results with or without the --chr-set -3 flag however and I am unsure what is going on. I have looked through all of the output files and am not sure whether it has correctly taken into account ploidy. Is there a way that I could check that my output is not corrupted? Is there a small diploid vcf around that I could use to check what has gone on? Thanks

ADD REPLY

Login before adding your answer.

Traffic: 2652 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6