From adam.andrews at uit.no Mon Mar 5 15:51:08 2018 From: adam.andrews at uit.no (Adam Andrews) Date: Mon, 5 Mar 2018 14:51:08 +0000 Subject: [adegenet-forum] Snapclust for individual assignment Message-ID: <1520261468247.2481@uit.no> Hi, I would like to use Snapclust to obtain group membership probabilities for unknown individuals in respect to pre-defined reference populations. As the reference populations are already established, I would like to define the reference clusters a priori?, 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? 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. Best, Adam Andrews Researcher UiT The Arctic University of Norway -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibautjombart at gmail.com Mon Mar 5 17:37:39 2018 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 5 Mar 2018 16:37:39 +0000 Subject: [adegenet-forum] Snapclust for individual assignment In-Reply-To: <1520261468247.2481@uit.no> References: <1520261468247.2481@uit.no> Message-ID: Hi Adam, to predict group memberships probabilities for a pre-defined group without optimization, you need to: - set the prior to the group you're interested in - run snapclust with zero iterations: max.iter = 0 For instance: library(adegenet) data(sim2pop) snapclust(sim2pop, k = 2, pop.ini = pop(sim2pop), max.iter = 0) 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. Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org WHO Consultant - outbreak analysis https://thibautjombart.netlify.com Twitter: @TeebzR +44(0)20 7594 3658 On 5 March 2018 at 14:51, Adam Andrews wrote: > Hi, > > > I would like to use Snapclust to obtain group membership probabilities for > unknown individuals in respect to pre-defined reference populations. > > > As the reference populations are already established, I would > like to define the reference clusters *a priori*?, 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? > > > 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. > > > Best, > > Adam Andrews > > Researcher > > UiT The Arctic University of Norway > > > > _______________________________________________ > adegenet-forum mailing list > adegenet-forum at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/ > listinfo/adegenet-forum > -------------- next part -------------- An HTML attachment was scrubbed... URL: From danieltb at princeton.edu Thu Mar 29 18:27:20 2018 From: danieltb at princeton.edu (Daniel T. Baldassarre) Date: Thu, 29 Mar 2018 16:27:20 +0000 Subject: [adegenet-forum] Add XY axes and labels to s.class or scatter.dapc PCA plot Message-ID: <7963D83B-1C94-4940-8C54-D4A5DD13673C@princeton.edu> Hello, I have a ?genind' object with genotyped individuals assigned to known populations. I?m using ?s.class' and ?scatter.dapc' to produce PCA plots where the individuals are colored by population. This works without any issue and produces beautiful plots, but I?m wondering if there is a way to add values and labels to the XY axes as is done in, for example, ?colorplot?. Thanks! --- Daniel T. Baldassarre Postdoctoral Research Associate Riehl Lab, Dept of Eco and Evo Bio Princeton University 106A Guyot Hall Princeton, NJ 08544 609-258-4919 danbaldassarre.weebly.com -------------- next part -------------- An HTML attachment was scrubbed... URL: