Skip to first unread message

Mattia Schmid

Nov 9, 2022, 6:04:57 AM11/9/22
to poppr
Hello everyone,

I am currently using the poppr package to do population genetic analysis and would like to also use polysat. I saw that the poppr package has the as.genambig() function, but when I try using it, I get the following error message:


Error in `[<-`(`*tmp*`, samples, loci, value = value) :

  subscript out of bounds


As I am working with tetraploid data I was wondering if this function can even handle such data. And if it can, would you have an idea what could be the problem? The genind I am currently using is attached as an RDS file.


Thank you very much for any help or advice and best wishes,



Zhian Kamvar

Nov 9, 2022, 8:02:48 PM11/9/22
to Mattia Schmid, poppr

Thank you for providing the data. I think I understand what's happening here. `as.genambig()` expects microsatellite data in the form of numbers (e.g. number of repeats or fragment lengths). The function can handle tetraploid microsatellite data, but the data you have provided here are the actual DNA sequences whose alleles do not appear to differ by fragment or repeat length. 


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
To view this discussion on the web visit
Reply all
Reply to author
0 new messages