Hello dears all, Actually I have a vcf file including five populations. This vcf file comes from GBS data and the stacks pipeline. I was going to calculate between and within population diversity based on AMOVA in R (https://rdrr.io/cran/poppr/man/poppr.amova.html) but I got an error which I couldn’t how can I solve that. Here is the command and the error which I have on my face. I will be so grateful if anybody can help me, either with command or any other protocols. Regards, Omid
poppr.amova(omid.genlight, hier = NULL, clonecorrect = FALSE, within = TRUE, dist = omid.D.pop.dist, squared = TRUE, freq = TRUE, correction = "quasieuclid", sep = "-", filter = FALSE, threshold = 0, algorithm = "farthest_neighbor", threads = 1L, missing = "loci", cutoff = 0.05, quiet = FALSE, method = c("ade4", "pegas"), nperm = 0)
Error in poppr.amova(omid.genlight, hier = NULL, clonecorrect = FALSE,: A population hierarchy must be specified
I don't know anything about this R package or the specific function, but it looks like you need to supply an R object to
hier
. You would need to read the function's documentation. Perhaps the author(s) have a vignette or example data that you should try to see if it works with the example data.Yes I should define an object but when I read it I couldn't understand what exactly I should to to have this object.
Presumably, you need to specify the hierarchy (structure) of your populations. Granted I haven't read the documentation for the R package or specific function.