[adegenet-forum] DAPC scatter plot and individual colour by population
Crawford, Douglas L
dcrawford at rsmas.miami.edu
Wed Apr 26 16:05:50 CEST 2017
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
scatter(dapc1)
## 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 together.
##That is, I do not get the three groups with individuals colored by populations.
What am I missing here?
Any clarification would be great.
Cheers
Douglas
——************________*********————
Douglas L. Crawford
Professor, Marine Biology & Ecology
Rosenstiel School of Marine & Atmospheric Science
University of Miami
4600 Rickenbacker Causeway
Mami, FL 33149
305-421-4121
dcrawford at miami.edu<mailto:dcrawford at miami.edu>
http://www.funhe-evol.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20170426/46c81fa6/attachment.html>
More information about the adegenet-forum
mailing list