[adegenet-forum] NAs detected in the vector of means using dapc ona genlight object

Jombart, Thibaut t.jombart at imperial.ac.uk
Thu Mar 22 11:38:19 CET 2012


Hello, 

this is probably due to entirely untyped loci - probably gaps columns. How did you import the data? 

To find the culplrits:
toRemove <- is.na(glMean(a, alleleAsUnit = FALSE)) # TRUE where NA
which(toRemove) # position of entirely non-typed loci
b <- a[, !toRemove]
glPca(b) # this should work


Cheers

Thibaut

________________________________________
From: adegenet-forum-bounces at r-forge.wu-wien.ac.at [adegenet-forum-bounces at r-forge.wu-wien.ac.at] on behalf of Massimo Mezzavilla [mzzvilla at gmail.com]
Sent: 21 March 2012 14:50
To: adegenet-forum at r-forge.wu-wien.ac.at
Subject: [adegenet-forum] NAs detected in the vector of means using dapc ona    genlight object

Dear,

I am working with adegenet to make some anlaysis at population level, I correctly imported a file with a large number of SNPs
but when I tried to make pca or dapc using the command glPca or dapc the results are respectively:
"Error in glPca(a) : NAs detected in the vector of means" for the glPca
 "Error in glPca(x, center = TRUE, scale = scale, nf = maxRank, loadings = FALSE,  :
  NAs detected in the vector of means" for the dapc.
How can I fix this problem?

Thank you very much for your attention

Best regards

Massimo Mezzavilla




More information about the adegenet-forum mailing list