<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div apple-content-edited="true"><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><span style="color: rgb(0, 0, 0); font-family: 'American Typewriter'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">Hi,</span></div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><span style="color: rgb(0, 0, 0); font-family: 'American Typewriter'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">In cases where the clusters are not so clear cut, it may be much more difficult, and anyway, the original quest was slightly different, I guess. Here is another example:</span></div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><span style="color: rgb(0, 0, 0); font-family: 'American Typewriter'; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">DAPC performed on pops (first figure) or </span>DAPC without pop info (find.clusters) (second figure). As each dot on the second figure belongs to a sampled pop, can we get them coloured (without changing the plot) with colour codes as in the first figure? Apparently not… But was not that the original question?</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br></div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Cheers</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Rita</div>
</div>
<div><br></div><div><img apple-inline="yes" id="7E7B14CB-3965-4E28-AC99-C14BCFC72047" height="240" width="304" apple-width="yes" apple-height="yes" src="cid:8C0ED3E4-9958-43E4-AF12-634199EEC788"><img apple-inline="yes" id="598C5CAC-7B82-4703-9C26-FB9FE7D87529" height="240" width="304" apple-width="yes" apple-height="yes" src="cid:74E45819-E900-4BD7-8007-575EBB2B87BD"></div><div><br></div><br><div><div>On 8 Aug, 2014, at 02:05, Nicolas Dussex <<a href="mailto:nicolas.dussex@gmail.com">nicolas.dussex@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-family: AmericanTypewriter; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr"><div><div>I think I understand now. So I guess that in the following figure (<a href="http://figshare.com/articles/_Genetic_structure_of_the_PWN_field_samples_from_the_USA_/653650" target="_blank">http://figshare.com/articles/_Genetic_structure_of_the_PWN_field_samples_from_the_USA_/653650</a>), they ran the analysis using<span class="Apple-converted-space"> </span><span lang="EN-NZ" style="font-size: 11pt; line-height: 17px; font-family: Calibri;"><b>grp$pop<span class="Apple-converted-space"> </span></b>without the  population ellipses and simply draw the clusters manually. At least that is how I understand it.<br><br></span></div><span lang="EN-NZ" style="font-size: 11pt; line-height: 17px; font-family: Calibri;">Thanks for your help!<br></span></div><span lang="EN-NZ" style="font-size: 11pt; line-height: 17px; font-family: Calibri;">Nic<br></span></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 August 2014 09:38, Emrah Coraman<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:coramane@gmail.com" target="_blank">coramane@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr"><div><div><div>Hi Nic,<br><br></div>That's what I thought as well.<span class="Apple-converted-space"> </span><br>But indeed you have to change the argument when using the scatter.dapc argument as Thimbaut pointed.<br><br></div>Best wishes,<br></div>Emrah<br><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 August 2014 00:27, Nicolas Dussex<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:nicolas.dussex@gmail.com" target="_blank">nicolas.dussex@gmail.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div dir="ltr"><div><div><div><div><div>Hi everyone,<br><br></div>Thanks for your help. Emrah is sort of right. I also  tried this command:<span class="Apple-converted-space"> </span><br><br><span lang="EN-NZ" style="font-size: 11pt; line-height: 17px; font-family: Calibri;">dapc1 <- dapc(data,<span class="Apple-converted-space"> </span><b>grp$pop</b>)</span><span class="Apple-converted-space"> </span><br><br></div>but the clustering seems a bit different from the grp$grp option. So I would like to keep the clusters identified with the group discrimination method but color my points according to their population of origin as in this example:<span class="Apple-converted-space"> </span><br><br><a href="http://figshare.com/articles/_Genetic_structure_of_the_PWN_field_samples_from_the_USA_/653650" target="_blank">http://figshare.com/articles/_Genetic_structure_of_the_PWN_field_samples_from_the_USA_/653650</a><br><br></div>but didn't find the information to do that sort of scatter plot in the manual.<br><br></div><div>Hope it makes sense.<br></div><div><br></div>Cheers<br></div>Nic<br></div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 August 2014 04:10, Jombart, Thibaut<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><br>You run an analysis using group 'yyy'. The analysis provides an optimum discrimination for group 'yyy'.<br><br>Then if you plot the results using group 'zzz', the analysis is no longer optimum for this group. The analysis hasn't changed, and is still only optimal for 'yyy'.<br><br>Cheers<br>Thibaut<br><br>________________________________________<br>From:<span class="Apple-converted-space"> </span><a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a><span class="Apple-converted-space"> </span>[<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a>] on behalf of Rita Castilho [<a href="mailto:rita.castil@gmail.com" target="_blank">rita.castil@gmail.com</a>]<br>Sent: 07 August 2014 16:27<br>To:<span class="Apple-converted-space"> </span><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br><div>Subject: Re: [adegenet-forum] DAPC scatter plot and individual colour by        population<br><br></div><div>So, why the warning: "the analysis is no longer optimal in terms of group discrimination”, if it is the same analysis...<br><br>Cheers<br>Rita<br><br></div><div>On 7 Aug, 2014, at 12:08, Jombart, Thibaut <<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a><mailto:<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>>> wrote:<br><br><br>Hi<br><br>this is what I understood too. And my answer does exactly that - see the grp argument in ?scatter.dapc.<br><br>Cheers<br>Thibaut<br>________________________________________<br></div>From: Emrah Coraman [<a href="mailto:coramane@gmail.com" target="_blank">coramane@gmail.com</a><mailto:<a href="mailto:coramane@gmail.com" target="_blank">coramane@gmail.com</a>>]<br><div>Sent: 07 August 2014 12:01<br>To: Jombart, Thibaut<br></div>Cc: Nicolas Dussex;<span class="Apple-converted-space"> </span><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><mailto:<a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a>><br><div>Subject: Re: [adegenet-forum] DAPC scatter plot and individual colour by population<br><br>Hi,<br><br>I think Nic just wants to color the DAPC scatter plot  not with the identified DAPC groups but with their respective population information.<br>So I guess he doesn't want to change the group discrimination method.<br><br>Did I get it right?<br><br>Best wishes,<br>Emrah<br><br><br></div><div>On 7 August 2014 13:53, Jombart, Thibaut <<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a><mailto:<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>><mailto:<a href="mailto:t.jombart@imperial.ac.uk" target="_blank">t.jombart@imperial.ac.uk</a>>> wrote:<br>Hi there,<br><br>simple, just replace grp$grp with the grouping of individuals you want to use for the plot.<br><br>This said, be aware that the analysis is no longer optimal in terms of group discrimination.<br><br>Best<br>Thibaut<br><br><br>==============================<br>Dr Thibaut Jombart<br>MRC Centre for Outbreak Analysis and Modelling<br>Department of Infectious Disease Epidemiology<br>Imperial College - School of Public Health<br>Norfolk Place, London W2 1PG, UK<br>Tel. : 0044 (0)20 7594 3658<br><a href="http://sites.google.com/site/thibautjombart/" target="_blank">http://sites.google.com/site/thibautjombart/</a><br><a href="http://sites.google.com/site/therepiproject/" target="_blank">http://sites.google.com/site/therepiproject/</a><br><a href="http://adegenet.r-forge.r-project.org/" target="_blank">http://adegenet.r-forge.r-project.org/</a><br>Twitter: @thibautjombart<br>________________________________________<br>From:<span class="Apple-converted-space"> </span><a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a><mailto:<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a>> [<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a><mailto:<a href="mailto:adegenet-forum-bounces@lists.r-forge.r-project.org" target="_blank">adegenet-forum-bounces@lists.r-forge.r-project.org</a>>] on behalf of Nicolas Dussex [<a href="mailto:nicolas.dussex@gmail.com" target="_blank">nicolas.dussex@gmail.com</a><mailto:<a href="mailto:nicolas.dussex@gmail.com" target="_blank">nicolas.dussex@gmail.com</a>>]<br>Sent: 07 August 2014 02:15<br>To:<span class="Apple-converted-space"> </span><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><mailto:<a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a>><br>Subject: [adegenet-forum] DAPC scatter plot and individual colour by    population<br><br>Hi,<br><br>I built a DAPC scatter plot without using a priori grouping information (i.e. geographically distinct populations) using this simple command line: dapc1 <- dapc(data, grp$grp).<br><br>I obtained three distinct cluster but now I was wondering how I could  represent each individual with a colour corresponding to their sampling origin rather than to their inferred cluster.<br><br>I couldn't find this information on the manual and was hoping I could get some advice on that.<br><br>Thanks for your help!<br>Nic<br>--<br>Nic Dussex PhD<br>Department of Zoology<br>University of Otago<br>340 Great King Street<br>P.O.Box 56<br>Dunedin 9054<br>New Zealand<br><br>Mobile: 021 02790938<br>_______________________________________________<br>adegenet-forum mailing list<br><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><mailto:<a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a>><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a><br><br>_______________________________________________<br>adegenet-forum mailing list<br><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a><br><br>_______________________________________________<br>adegenet-forum mailing list<br><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a><br></div></blockquote></div><br><br clear="all"><br>--<span class="Apple-converted-space"> </span><br><div dir="ltr">Nic Dussex PhD<br>Department of Zoology<br>University of Otago<br>340 Great King Street<br>P.O.Box 56<br>Dunedin 9054<br>New Zealand<br><br>Mobile: 021 02790938<br></div></div></div><br>_______________________________________________<br>adegenet-forum mailing list<br><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a><br></blockquote></div><br></div></div></div></blockquote></div><br><br clear="all"><br>--<span class="Apple-converted-space"> </span><br><div dir="ltr">Nic Dussex PhD<br>Department of Zoology<br>University of Otago<br>340 Great King Street<br>P.O.Box 56<br>Dunedin 9054<br>New Zealand<br><br>Mobile: 021 02790938<br></div></div>_______________________________________________<br>adegenet-forum mailing list<br><a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a></div></blockquote></div><br></body></html>