This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Genotype PCA from genotype matrix

If I have a individual x locus genotype matrix, what is the easiest way to calculate genotype principal components? Can I just use prcomp in R?

This lovely post Produce PCA bi-plot for 1000 Genomes Phase III - Version 2 goes through the process of generating a PCA from VCF files, but I wondered if I needed to use PLINK if I already had the matrix?

pca snp genotype

1 answer

I don't know if this is absolutely the most optimal way to do it, but we did straightforward prcomp on the genotype matrix and the first 2 PCs more or less recapitulated what we know about the population structure of the samples.

Log in to answer this question.