[adegenet-forum] Help to get membership probabilities from DAPC analyses

Thibaut Jombart thibautjombart at gmail.com
Mon Sep 26 18:11:58 CEST 2016


Hi Catalina,

I'm sorry for the long delay in the reply, your post was held amongst
hundreds of moderated messages. In case it would still be relevant, you
want to use 'predict' and get the $posterior from the output. For instance:

> data(H3N2)
> pop(H3N2) <- factor(H3N2$other$epid)
> dapc1 <- dapc(H3N2, var.contrib=FALSE, scale=FALSE, n.pca=150, n.da=5)

> pred <- predict(dapc1)
> names(pred)
[1] "assign"     "posterior"  "ind.scores"
> head(pred$posterior)
              2001         2002         2003         2004         2005
AB434107 0.9977417 2.258268e-03 1.616863e-18 8.134542e-31 6.793613e-41
AB434108 0.9977417 2.258268e-03 1.616863e-18 8.134542e-31 6.793613e-41
AB438242 1.0000000 4.059732e-20 2.300095e-35 5.708029e-47 1.457122e-55
AB438243 1.0000000 3.139077e-22 1.704267e-39 1.603998e-50 1.840345e-58
AB438244 1.0000000 8.422137e-22 1.018917e-39 1.747282e-50 2.828567e-58
AB438245 1.0000000 2.302028e-22 6.767904e-40 4.474589e-49 2.362144e-55
                 2006
AB434107 5.738948e-77
AB434108 5.738948e-77
AB438242 6.191441e-88
AB438243 2.226799e-91
AB438244 4.335585e-91
AB438245 4.015468e-88
>

*Important disclaimer*: these values are group assignment probabilities
defined based on a geometric criteria. They are not probabilities that
genotypes come from each group as in STRUCTURE, so they cannot be directly
compared. We are currently developing a STRUCTURE equivalent approach for
this (though much faster), which will be an actual likelihood. Depending on
how time-sensitive your work is, you may want to look into this new
approach. If so, be in touch via email.

All the best
Thibaut


--
Dr Thibaut Jombart
Lecturer, Department of Infectious Disease Epidemiology, Imperial College
London
Head of RECON: https://reconhub.github.io/
https://sites.google.com/site/thibautjombart/
https://github.com/thibautjombart
Twitter: @TeebzR <https://twitter.com/TeebzR>

On 12 August 2016 at 22:08, Catalina Salgado <csalgados at gmail.com> wrote:

> Hello all!
>
> First apologize in advance if this question seems pretty basic.
> I have been using adegenet lately and I understand mostly everything. But
> I could not find the way to get the membership probabilities (the actual
> values) that where calculated when a DAPC analysis was done.
> I would like to have this file or information so I can compare it with
> STRUCTURE membership probabilities.
>
> Thank you very much in advance!
>
> Best,
>
> --
> Catalina Salgado
> USDA-ARS
> Beltsville, MD
> USA
>
> _______________________________________________
> 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: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160926/07b88ccf/attachment.html>


More information about the adegenet-forum mailing list