> library(adegenet) > Corbi=read.genepop("Corbi_dapc_noZA.gen") Converting data from a Genepop .gen file to a genind object... File description: Corbicula_microsat ...done. > grp=find.clusters(Corbi) Choose the number PCs to retain (>=1): 200 Choose the number of clusters (>=2: dapc 14 > dapc=dapc(Corbi, n.da=80, n.pca=8) > dapc ################################################# # Discriminant Analysis of Principal Components # ################################################# class: dapc $call: dapc.genind(x = Corbi, n.pca = 8, n.da = 80) $n.pca: 8 first PCs of PCA used $n.da: 8 discriminant functions saved $var (proportion of conserved variance): 0.71 $eig (eigenvalues): 339.9 244.5 179.6 110.5 49.51 ... vector length content 1 $eig 8 eigenvalues 2 $grp 373 prior group assignment 3 $prior 14 prior group probabilities 4 $assign 373 posterior group assignment 5 $pca.cent 84 centring vector of PCA 6 $pca.norm 84 scaling vector of PCA 7 $pca.eig 74 eigenvalues of PCA data.frame nrow ncol content 1 $tab 373 8 retained PCs of PCA 2 $means 14 8 group means 3 $loadings 8 8 loadings of variables 4 $ind.coord 373 8 coordinates of individuals (principal components) 5 $grp.coord 14 8 coordinates of groups 6 $posterior 373 14 posterior membership probabilities 7 $pca.loadings 84 8 PCA loadings of original variables 8 $var.contr 84 8 contribution of original variables > pdf("DAPC.pdf") > par(xpd=TRUE) > > myCol=c("red", "orange", "darkmagenta", "brown", "darkgreen", "grey", "deeppink", "green", "blue", "burlywood", "black", "coral", "antiquewhite3", "darkolivegreen1") > scatter(dapc, scree.da=FALSE, cell=0, cstar=0, col=myCol, pch=c(0,0,20,1,17,17,0,0,0,0,20,15,15,17), clabel=0) > legend("topleft", c("Clone A/R", "Clone B", "C. sp. China", "C. sp. Hawai", "C. japonica (Jp, Ka)", "C. japonica (CJ)", "C. sp. (Oh)", "Clone C/S", "Clone Rlc", "C. sp. I", "C. sp. Vietnam", "C. sp. Japan (KMT, Cl)", "C. sp. Japan (EHM)","C. sandai"), col=c("red","orange","darkmagenta","brown","darkgreen","grey","deeppink","green","blue","burlywood4","black","coral","antiquewhite3","darkolivegreen1"), pch=c(0, 0, 20, 1, 17, 17, 0, 0, 0, 0, 20, 15, 15,17),text.width=.4, bty="n",y.intersp=0.7) > dev.off()