<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Times;
        panose-1:2 2 6 3 5 4 5 2 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.tlid-translation
        {mso-style-name:tlid-translation;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi Helena,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US">This is due to the k-means algorithm used in the find.cluster function which use a different seed for its initialization
 each time you’re running your code. You have to set the seed before running your find.cluster function to ensure the reproducibility of your results.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">set.seeds(24012019)<o:p></o:p></span></p>
<p class="MsoNormal"><strong><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif">perca_grp6 <-find.clusters(perca, max.n.clust = 10)<o:p></o:p></span></strong></p>
<p class="MsoNormal"><strong><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></strong></p>
<p class="MsoNormal"><strong><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></strong></p>
<p class="MsoNormal"><strong><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#44546A;font-weight:normal">Good luck with your analyses!<o:p></o:p></span></strong></p>
<p class="MsoNormal"><strong><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></strong></p>
<p class="MsoNormal"><strong><span lang="EN-US" style="font-size:10.5pt;font-family:"Calibri",sans-serif">Cathy<o:p></o:p></span></strong></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Times",serif;color:black"><img width="107" height="44" style="width:1.1145in;height:.4583in" id="Image_x0020_2" src="cid:image001.jpg@01D4B3EA.D91E5570" alt="Description : cid:43BA2359-25C8-49EA-9D28-BCFD56FD115B@toulouse.inra.fr"></span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><br>
</span><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#8BAC21">_____________________________<br>
<br>
</span></b><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#A6CD39">Cathy Bouffartigue</span></b><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#8BAC21"><br>
</span></b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:black">Doctorante/ PhD student<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="mailto:cathy.bouffartigue@inra.fr"><span style="font-family:"Arial",sans-serif">cathy.bouffartigue@inra.fr</span></a></span><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#A6CD39"><o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#A6CD39"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#A6CD39">Centre Inra Occitanie-Toulouse<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:black">Fixe : +33 (0)5 61 28 57 74</span><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#A6CD39">
<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:black">Mobile : +33 (0)6 14 57 34 55<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#8BAC21">_____________________________<br>
</span></b><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#A6CD39"><br>
</span></b><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:black">Chemin de Borde Rouge CS 52627<br>
31326 Castanet Tolosan cedex<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:7.5pt;font-family:"Arial",sans-serif;color:black"><br>
</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><a href="http://www.toulouse.inra.fr/"><b><span style="font-size:10.0pt;color:#A6CD39">www.toulouse.inra.fr</span></b></a></span><b><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#A6CD39"><o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">De :</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> adegenet-forum <adegenet-forum-bounces@lists.r-forge.r-project.org>
<b>De la part de</b> HELENA IBANEZ MARTINEZ<br>
<b>Envoyé :</b> jeudi 24 janvier 2019 12:58<br>
<b>À :</b> adegenet-forum@lists.r-forge.r-project.org<br>
<b>Objet :</b> Re: [adegenet-forum] Doubt with DAPC without prior K (find.clusters)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif">HELENA IBANEZ MARTINEZ <<a href="mailto:him21024@um.es">him21024@um.es</a>> escribió:<o:p></o:p></span></p>
<blockquote style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 9.0pt;margin-left:1.5pt;margin-top:5.0pt;margin-bottom:5.0pt">
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif">HELENA IBANEZ MARTINEZ <<a href="mailto:him21024@um.es">him21024@um.es</a>> escribió:<o:p></o:p></span></p>
<blockquote style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 9.0pt;margin-left:1.5pt;margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span class="tlid-translation"><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif">Hello, my name is Helena,</span></b></span><b><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br>
<br>
<span class="tlid-translation">I have a question about my DAPC analayses.</span><br>
<br>
<span class="tlid-translation">I'm following the tutorial step by step and I get the DAPC graph of my data very well, but my problem is when I repeat the process my graphic results come out completely different every time...</span><br>
<br>
<span class="tlid-translation">My question is, why do such different results come out if I'm repeating exactly the same (same data and same parameters)? It happens to me every time I do it. What can I be doing wrong?</span><br>
<br>
<span class="tlid-translation">Here I leave the example of my code: 135 individuals with 8 loci sampled in 6 different locations</span></span></b><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">perca <-read.structure("PercaPopName.str",</span></strong><b><br>
<strong><span style="font-family:"Arial",sans-serif">                                     onerowperind=TRUE,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     n.ind=135,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     n.loc=8,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     col.lab=1,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     col.pop=2,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     row.marknames=1,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     ask=FALSE)</span></strong><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">perca_grp6 <-find.clusters(perca, max.n.clust = 10)</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">200</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">6</span></strong><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">dapc6 <-dapc(perca, perca_grp6$grp)</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">200</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">5</span></strong><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">scatter(dapc6)</span></strong></b><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">Thank you.</span></strong><br>
<br>
<br>
<br>
<br>
<br>
<span class="tlid-translation">Hi, my name is Helena,</span><br>
<br>
<span class="tlid-translation">I have a question about my DAPC analayses.</span><br>
<br>
<span class="tlid-translation">I'm following the tutorial step by step and well, I get the DAPC graph of my data, but the problem is that when I repeat this my graphic results come out completely different, therefore they are not reliable...</span><br>
<span class="tlid-translation">My question is, why do such different results come out if I'm repeating exactly the same? It happens to me every time I do it. What can I be doing wrong?</span><br>
<br>
<span class="tlid-translation">Here my code:</span><br>
<br>
<span class="tlid-translation">perca <-read.structure("PercaPopName.str",</span><br>
<span class="tlid-translation">                                      onerowperind=TRUE,</span><br>
<span class="tlid-translation">                                      n.ind=135,</span><br>
<span class="tlid-translation">                                      n.loc=8,</span><br>
<span class="tlid-translation">                                      col.lab=1,</span><br>
<span class="tlid-translation">                                      col.pop=2,</span><br>
<span class="tlid-translation">                                      row.marknames=1,</span><br>
<span class="tlid-translation">                                      ask=FALSE)</span><br>
<br>
<span class="tlid-translation">dapc1 <-dapc(perca, perca_grp$grp)</span><br>
<br>
<span class="tlid-translation">200</span><br>
<span class="tlid-translation">6</span><br>
<br>
<span class="tlid-translation">scatter(dapc1)</span><br>
<br>
<br>
<strong><span style="font-family:"Arial",sans-serif">Hello again, I`m Helena, sorry but I introduced my code wrong yesterday:</span></strong><b><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">This is my code: </span></strong></b><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">perca <-read.structure("PercaPopName.str",</span></strong><b><br>
<strong><span style="font-family:"Arial",sans-serif">                                     onerowperind=TRUE,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     n.ind=135,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     n.loc=8,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     col.lab=1,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     col.pop=2,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     row.marknames=1,</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">                                     ask=FALSE)</span></strong><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">perca_grp6 <-find.clusters(perca, max.n.clust = 10)</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">200</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">6</span></strong><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">dapc6 <-dapc(perca, perca_grp6$grp)</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">200</span></strong><br>
<strong><span style="font-family:"Arial",sans-serif">5</span></strong><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">scatter(dapc6)</span></strong><br>
<br>
<strong><span style="font-family:"Arial",sans-serif">Thank you </span></strong></b><br>
 <o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><br>
<br>
 <o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
</body>
</html>