[adegenet-forum] DAPC scatter plot and individual colour by population
thibautjombart at gmail.com
Thu Apr 27 11:26:06 CEST 2017
I might have missed something, but I think what you get is what one
would expect. I have run through a similar example with a genlight
just to make sure there was nothing fishy.
# case1: You made a DAPC with 3 clusters; when plotting it you get
# case2: If you provide grp = pop(CR_84), which has 6 clusters, then
you get a plot with 6 groups (i.e. colored inertia ellipses, by
Why would you expect 3 groups in the second case?
Dr Thibaut Jombart
Lecturer, Department of Infectious Disease Epidemiology, Imperial College London
Head of RECON: repidemicsconsortium.org
+44(0)20 7594 3658
On 26 April 2017 at 15:05, Crawford, Douglas L
<dcrawford at rsmas.miami.edu> wrote:
> Good Morning,
> I must be missing something about an old thread (Fri Aug 8 11:54:08
> CEST 2014) that appears to have a solution, but does not work for me.
> To restate the problem: I want to color individuals by population, but keep
> the optimal DAPC clusters.
> My data (CR_84) has 84 individuals from 6 “populations" with 3,243 SNPs, BIC
> suggest 3 clusters.
> CR_84 is a GENLIGHT OBJECT
> // 84 genotypes, 3,243 binary SNPs, size: 504.5 Kb
> 28119 (0.1 %) missing data
> // Basic content
> @gen: list of 84 SNPbin
> @ploidy: ploidy of each individual (range: 2-2)
> // Optional content
> @ind.names: 84 individual labels
> @loc.names: 3243 locus labels
> @pop: population of each individual (group size range: 4-22)
> If I follow the previous advice (Fri Aug 8 11:54:08 CEST 2014) I get two
> different plots one that has the 3 groups colored by group and the 2nd is 6
> groups colored by pop.
> #make a DAPC - this uses by optimum DAPC
> dapc1 <- dapc(CR_84, n.pca=7, n.da=5, grp$grp)
> # plot with groups used in DAPC
> ## I get a scatter plot with 3 groups where 2 of the groups have individuals
> from 5 “populations” that has 3 colors (by group)
> # plot with another group - the species — “species" was from the toy data
> set: microbov$other$spe
> # I used "grp=CR_84$pop"
> scatter(dapc1, grp=CR_84$pop)
> ## I get a scatter plot with 6 groups where 5 of the groups are scatter
> ##That is, I do not get the three groups with individuals colored by
> What am I missing here?
> Any clarification would be great.
> Douglas L. Crawford
> Professor, Marine Biology & Ecology
> Rosenstiel School of Marine & Atmospheric Science
> University of Miami
> 4600 Rickenbacker Causeway
> Mami, FL 33149
> dcrawford at miami.edu
> adegenet-forum mailing list
> adegenet-forum at lists.r-forge.r-project.org
More information about the adegenet-forum