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

Roman Luštrik roman.lustrik at biolitika.si
Fri Jan 19 17:55:51 CET 2018


Could it be that it goes through because NAs are replaced by 0 ? 

---- 
In god we trust, all others bring data. 


From: "Mike Donaldson" <michaeldonaldson at trentu.ca> 
To: adegenet-forum at lists.r-forge.r-project.org 
Sent: Friday, January 19, 2018 4:46:52 PM 
Subject: [adegenet-forum] Do you need to replace missing data before performing a glPca? 

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 

_______________________________________________ 
adegenet-forum mailing list 
adegenet-forum at lists.r-forge.r-project.org 
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20180119/42f5536e/attachment.html>


More information about the adegenet-forum mailing list