DAPC Error

Skip to first unread message

Martin Boys

Nov 5, 2022, 7:07:36 AM11/5/22
to po...@googlegroups.com
Dear All

I am in dire need of your assistance with the following error I am encouraging with the DAPC analysis on RStudio. My research is based on 10 SSR loci across 3 populations with a total sample size of 55 individuals and of 1 stratum, pop. 
Kindly see below the scripts I run in bold and the outputs which eventually lead to the error. I followed the example of the primer, "Population genetics and genomics" by Kamvar, Everhart and Grunwald.



This is a genclone object


Genotype information:


    4 original multilocus genotypes

   55 haploid individuals

   10 codominant loci


Population information:


    1 stratum - Pop

    3 populations defined - Hybrid, Heirloom, Grape



Error in dapc.genind(martin22, var.contrib = TRUE, scale = FALSE, n.pca = 10,  :

  x does not include pre-defined populations, and `pop' is not provided



I understand that it has to do with the population which when I run results in the output, "NULL". However, the populations were defined as was seen in the output of the second script above. Any ideas on how I can bypass this error?

I thank you all in advance for your time to look at this email and for your inputs.

Best regards


Zhian Kamvar

Nov 5, 2022, 10:37:53 AM11/5/22
to Martin Boys, po...@googlegroups.com
This line is removing your population. “epid” was a column from the tutorial. It likely does not exist in your data. Remove this line and rerun your analysis from the beginning:


You received this message because you are subscribed to the Google Groups "poppr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to poppr+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/poppr/CAKiZ3%3Ds8E7jskHuRU%3D5q9Lw9fWH1VqkqPRQFMQv72GtL0-V2jg%40mail.gmail.com.

Martin Boys

Nov 6, 2022, 12:34:31 AM11/6/22
to Zhian Kamvar, po...@googlegroups.com
Thanks for the feedback. I only noticed that afterwards. Thank you so much

Reply all
Reply to author
0 new messages