thibautjombart / adegenet

adegenet: a R package for the multivariate analysis of genetic markers
168 stars 64 forks source link

PCoA plot problems #324

Closed laiajulianamu closed 2 years ago

laiajulianamu commented 2 years ago

Hi I am having the next issue when I run the pcoa plot, could you help me please.

gl.pcoa.plot(gl)

Starting gl.pcoa.plot Processing genlight object with SNP data Error in utils.check.datatype(glPca, accept = "glPca", verbose = verbose) : Fatal Error: inappropriate object passed to function, found SNP expecting glPca

zkamvar commented 2 years ago

the gl.pcoa.plot() function takes a glPca object, which contains PC Analysis of a genlight object. You submitted a genlight object. You can create the PC analysis by using gl_pca <- glPca(gl) and then passing gl_pca to the gl.pcoa.plot() function