<html><body><div style="font-family: trebuchet ms,sans-serif; font-size: 12pt; color: #000000"><div>A-ha, I think I see where you're getting at. Right now I'm not sure it's possible to have DAPC groups with samples colored by some specific variable. Perhaps Thibaut will be able to chime in. If I'm right, this is something we could think about in the upcoming releases.<br></div><div><br data-mce-bogus="1"></div><div>In the mean time, you can construct your own plot, taking bits and pieces from https://github.com/thibautjombart/adegenet/blob/master/R/dapc.R#L539</div><div><br data-mce-bogus="1"></div><div><br></div><div><br data-mce-bogus="1"></div><div>Cheers,</div><div>Roman</div><div><br></div><div data-marker="__SIG_PRE__">----<br>In god we trust, all others bring data.<br>> Zahtevaj IJZ na https://kurc.biolitika.si</div><br><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Lucas Veiga" <lucasfip@yahoo.com.br><br><b>To: </b>"Roman Luštrik" <roman.lustrik@biolitika.si><br><b>Cc: </b>adegenet-forum@lists.r-forge.r-project.org<br><b>Sent: </b>Thursday, October 12, 2017 2:03:35 PM<br><b>Subject: </b>Re: [adegenet-forum] Dots in the DAPC graphic<br></div><br><div data-marker="__QUOTED_TEXT__"><div style="color: #000; background-color: #fff; font-family: times new roman, new york, times, serif; font-size: 13px;" data-mce-style="color: #000; background-color: #fff; font-family: times new roman, new york, times, serif; font-size: 13px;"><div id="yui_3_16_0_ym19_1_1507751279292_42237">Dear Roman,</div><div id="yui_3_16_0_ym19_1_1507751279292_42238">First, thank you for the help. Unfortunaly, apparently your command not worked for me. I will try explain better my situation. I work with phytopathology and the fungus that I work affects different crops (I have put in my input file .csv the crops as my populations, different crops are different populations). Due the migration of genotypes of the fungus between the crops, inside of one group formed by DAPC there are genotypes obtained of different crops (populations) and for better viewing of this migration I want to plot the dots according of the hosts and not according of the groups formed by DAPC analysis. So, inside of one group there will are dots of different colors. </div><div id="yui_3_16_0_ym19_1_1507751279292_42239">I hope have explain better my situation and that you can help me.</div><div id="yui_3_16_0_ym19_1_1507751279292_42240"><br id="yui_3_16_0_ym19_1_1507751279292_42241"></div><div id="yui_3_16_0_ym19_1_1507751279292_42242">Best regards,</div><div id="yui_3_16_0_ym19_1_1507751279292_42214"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1507751279292_42243">Lucas Veiga Ayres pimenta</div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;" data-mce-style="display: block;"> <div style="font-family: times new roman, new york, times, serif; font-size: 13px;" data-mce-style="font-family: times new roman, new york, times, serif; font-size: 13px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" data-mce-style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><span size="2" face="Arial" data-mce-style="font-family: Arial; font-size: small;" style="font-family: Arial; font-size: small;"> Em Quinta-feira, 12 de Outubro de 2017 5:49, Roman Luštrik <roman.lustrik@biolitika.si> escreveu:<br></span></div> <br><br> <div class="y_msg_container"><div id="yiv5767987766"><div><div style="font-family: trebuchet ms, sans-serif; font-size: 12pt; color: #000000;" data-mce-style="font-family: trebuchet ms, sans-serif; font-size: 12pt; color: #000000;"><div>Map `grp` argument to your desired grouping. Make sure that you pass `col` the correct number of colors which should match the number of groups you are specifying.<br clear="none"></div><div>By default, coloring is done on grouping (<a rel="nofollow" shape="rect" target="_blank" href="https://github.com/thibautjombart/adegenet/blob/master/R/dapc.R#L498">see here</a>). See this example:</div><div><br clear="none"></div><div>library(adegenet)<br clear="none"><br clear="none">data(H3N2)<br clear="none">pop(H3N2) <- factor(H3N2$other$epid)<br clear="none">dapc1 <- dapc(H3N2, var.contrib=FALSE, scale=FALSE, n.pca=150, n.da=5)<br clear="none"><br clear="none">data.frame(dapc1$grp, pop(H3N2)) # they are matching<br clear="none"></div><div><br clear="none"></div><div>Cheers,</div><div>Roman</div><div><br clear="none"></div><div><br clear="none"></div><div><br clear="none"></div><div class="yiv5767987766yqt6186981918" id="yiv5767987766yqt03427"><div>----<br clear="none">In god we trust, all others bring data.<br clear="none">> Zahtevaj IJZ na https://kurc.biolitika.si</div><br clear="none"><hr id="yiv5767987766zwchr"><div><b>From: </b>"Lucas Veiga" <lucasfip@yahoo.com.br><br clear="none"><b>To: </b>adegenet-forum@lists.r-forge.r-project.org<br clear="none"><b>Sent: </b>Thursday, October 12, 2017 1:34:19 AM<br clear="none"><b>Subject: </b>[adegenet-forum] Dots in the DAPC graphic<br clear="none"></div><br clear="none"><div><div style="color: #000; background-color: #fff; font-family: times new roman, new york, times, serif; font-size: 13px;" data-mce-style="color: #000; background-color: #fff; font-family: times new roman, new york, times, serif; font-size: 13px;"><div id="yiv5767987766yui_3_16_0_ym19_1_1507751279292_16011">Dear all,</div><div dir="ltr" id="yiv5767987766yui_3_16_0_ym19_1_1507751279292_16011">I would like to know what I can do for the dots in DAPC graph to be colored according to the populations and not according to the DAPC analysis groups?<br clear="none"><br clear="none">Best regards,<br clear="none">Lucas Veiga Ayres Pimenta</div></div><br clear="none">_______________________________________________<br clear="none">adegenet-forum mailing list<br clear="none">adegenet-forum@lists.r-forge.r-project.org<br clear="none">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum<br clear="none"></div></div></div></div></div><br><br></div> </div> </div> </div></div><br></div></div></body></html>