[adegenet-forum] Global.rtest on data with missing allele values

Jombart, Thibaut t.jombart at imperial.ac.uk
Fri Aug 20 13:17:05 CEST 2010


Hello, 

you should replace the missing data before attempting to run the global.rtest procedure. This can be done using na.replace (see ?na.replace) or directly when computing allele frequencies (?makefreq).

Best regards

Thibaut.
________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] On Behalf Of Nevil Amos [nevil.amos at gmail.com]
Sent: 17 August 2010 02:24
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] Global.rtest on data with missing allele values

I attach a copy of my workspace containing an genind object and spca.

I am trying to carry out the global .rtest, however there are missing
allele values.  Is it possible to perform the test on this dataset?

from the scree plot it seems likely that the first global score would be
significant

messages in R: below and NA_data.RData attached.

many thanks

Nevil Amos


 > myspca<-spca(EYRM.genind)

Choose a connection network:
         Delaunay triangulation (type 1)
         Gabriel graph (type 2)
         Relative neighbours (type 3)
         Minimum spanning tree (type 4)
         Neighbourhood by distance (type 5)
         K nearest neighbours (type 6)
         Inverse distances (type 7)
Answer: 1

Keep this graph (y/n)? y
Select the first number of axes (>=1): 1
Select the second number of axes (>=0): 0
Warning message:
In spca(EYRM.genind) :
  NAs in data are automatically replaced (to mean allele frequency)
 > plot(myspca)
 > myGtest <- global.rtest(EYRM.genind$tab, myspca$lw, nperm = 999)
Error in global.rtest(EYRM.genind$tab, myspca$lw, nperm = 999) :
  NA entries in X
 > save.image("d:\\nevs_docs\\Rwork\\spca\\NA_data.RData")


More information about the adegenet-forum mailing list