<div dir="ltr">Hi Adam,<div><br></div><div>to predict group memberships probabilities for a pre-defined group without optimization, you need to:</div><div>- set the prior to the group you're interested in</div><div>- run snapclust with zero iterations: max.iter = 0</div><div><br></div><div>For instance:</div><div><br></div><div>library(adegenet)</div><div>data(sim2pop)</div><div>snapclust(sim2pop, k = 2, pop.ini = pop(sim2pop), max.iter = 0)<br></div><div><br></div><div>If that is not a satisfying workaround, then it is best to post this as an issue on github; I can't guarantee I'll have time for this in the near future, but it isn't very difficult to implement and someone else might give it a shot.</div><div><br></div><div>Best<br>Thibaut</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br>--<br>Dr Thibaut Jombart<br>Lecturer, Department of Infectious Disease Epidemiology, Imperial College London<br>Head of RECON: <a href="http://repidemicsconsortium.org" target="_blank">repidemicsconsortium.org</a><br>WHO Consultant - outbreak analysis</div><div><a href="https://thibautjombart.netlify.com" target="_blank">https://thibautjombart.netlify.com</a><br>Twitter: @TeebzR<br>+44(0)20 7594 3658</div></div></div></div>
<br><div class="gmail_quote">On 5 March 2018 at 14:51, Adam Andrews <span dir="ltr"><<a href="mailto:adam.andrews@uit.no" target="_blank">adam.andrews@uit.no</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi, <br>
</p>
<p><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">I would like to use Snapclust to obtain group membership probabilities for unknown individuals in respect to pre-defined reference populations. <br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">As the reference populations are already established, I would like to define the reference clusters <em style="background-color:rgb(255,255,255)">a priori</em><span style="background-color:rgb(255,255,255)">,</span> then
define k = the number of reference clusters, and the individuals to assign as an open group so to speak. However, k must match the number of priors and I can see no way to provide priors for the reference samples and not the individuals to assign. Is there
a way around this? <br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">This seems a slightly different approach to what you have documented - using find.clusters and so I just wanted to check if this is a possibility. <br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px"><br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Best,<br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Adam Andrews<br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">Researcher<br>
</p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px">UiT The Arctic University of Norway<br>
</p>
<p><br>
</p>
</div>
<br>______________________________<wbr>_________________<br>
adegenet-forum mailing list<br>
<a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.<wbr>r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" rel="noreferrer" target="_blank">https://lists.r-forge.r-<wbr>project.org/cgi-bin/mailman/<wbr>listinfo/adegenet-forum</a><br></blockquote></div><br></div>