[adegenet-forum] Do you need to replace missing data before performing a glPca?

Mike Donaldson michaeldonaldson at trentu.ca
Fri Jan 19 16:46:52 CET 2018


Hello,

I imported a vcf file and converted it to a genlight object using vcfR as
follows:

gl.x <- vcfR2genlight(file.vcf)
ploidy(gl.x) <- 2
pop <- read.csv("popfile.csv", sep=",", header=TRUE)
pop(gl.x) <- pop$Pop

The dataset has ~10% missing data. When using the glPca function, do you
need to first convert the missing data to the mean and transform it based
on frequency using the tab function (tab(gl.x, NA.method="mean", freq=TRUE)),
or does that happen "behind the scenes"?

I ask because the glPca will proceed without that conversion, while a
dudi.pca will not.

Thank you for your time,
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20180119/075c43c3/attachment.html>


More information about the adegenet-forum mailing list