Population assignment transfer from R (genlight) to Structure?

118 views
Skip to first unread message

Andrzej Noyszewski

unread,
May 21, 2019, 10:27:39 AM5/21/19
to dartR
Hi. Is there some way to transfer genlight object population assignment to structure file format? Is "addcolums" used for this? If yes, how can I use it? 

Also, when I try to indNames = TRUE I'm getting error: "Error in gl2structure(gl, indNames = TRUE,  : 
  Number of individuals does not match between indNames and genmat." I'm not sure what is genmat... 

Thank you for help!

Diana Prada

unread,
Feb 4, 2020, 11:45:10 PM2/4/20
to dartR
Hey Andrzej,

Did you find a way around this? I also want to add the population assignment to the structure file format but i can't see a straight way of doing it.

Cheers,

Dp

Deane Smith

unread,
Feb 5, 2020, 4:03:47 AM2/5/20
to dartR

This code works for me.
Hope it helps.

Deane.

gl2structure_HelpCodeR.R

Diana Prada

unread,
Feb 5, 2020, 10:34:36 PM2/5/20
to dartR
Thanks heaps, Deane. Your script worked great :-) 

Deane Smith

unread,
Feb 6, 2020, 12:07:24 AM2/6/20
to dartR
Glad I can help. 
Reply all
Reply to author
Forward
0 new messages