[adegenet-forum] Problem DAPC scatterplot supplementary individuals
Thibaut Jombart
thibautjombart at gmail.com
Mon Sep 26 18:04:49 CEST 2016
Hello,
this has been fixed in the devel version at revision a3498410e0097392fb86b44
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 18 August 2016 at 12:27, vlabeyrie <vanesse.labeyrie at cirad.fr> wrote:
> Dear adegenet users,
>
> I have a problem when plotting supplementary individuals on DAPC
> scatterplot.
>
> I defined two datasets: 1 to perform DAPC and another of supplementary
> individuals
>
> x.sup_80<-Ge_atp_gcp_80[c(1:nrow(Ge_atp at tab)),] # supplementary
> individuals
>
> x_80<-Ge_atp_gcp_80[-c(1:nrow(Ge_atp at tab)),] # Individuals on which
> performing DAPC
>
> Then I performed DAPC on X_80, specifying a-priori groups
>
> dapc_GCP_14ssr_STRk5_b<- dapc(x_80, pop(x_80), n.pca=30,n.da=4) #perform
> DAPC
>
> I assigned supplementary individuals to DAPC groups
>
> predict_atp_strk5<-predict.dapc(dapc_GCP_14ssr_STRk5_b,newdata=x.sup_80
>
> The predicted group memberships of supplementary individuals based on DAPC
> results is high, so I expect that supplementary individuals would be
> located in the DAPC groups ...
>
> But it is not the case, as on the scatterplot, supplementary individuals
> mostly appear outside from the groups to which they are assigned !!
>
> col<-c("#F8766D", "#A3A500", "#00BF7D", "#00B0F6", "#E76BF3") # colors for African collection individualscolb<-c("darkblue","dodgerblue","darkorange2","red","gold","grey") # colors for supplementary Mount Kenya individuals (according to their STRUCTURE group)
> #axes 1 and 2col.points_80<-transp(col[as.integer(pop(x_80))],.2) # define the color of African individuals as transparentscatter(dapc_GCP_14ssr_STRk5_b,col=col,bg="white",scree.da=0,pch="",cstar=0,clab=0,xlim=c(-10,10),legend=F)# par(xpd=TRUE)points(dapc_GCP_14ssr_STRk5_b$ind.coord[,1], dapc_GCP_14ssr_STRk5_b$ind.coord[,2],pch=20,col=col.points_80,cex=1) ## scatter DAPC groups / African GCP dataset
> col.sup_80<-colb[as.integer(pop(x.sup_80))<
> span cl
> ass="paren" style="box-sizing: border-box; color: rgb(104, 118, 135);">] ## Define supplementary individuals colorpoints(predict_atp_strk5$ind.scores[,1], predict_atp_strk5$ind.scores[,2],pch=8,col=transp(col.sup_80<
> /span>,<
> span class="number" style="box-sizing: border-box; color: rgb(0, 153, 153);">.7),cex=1) # plot supplementary individuals
>
>
> With a previous version of adegenet, this problem did not appear as
> supplementary individuals were located within the DAPC groups, and this
> problem appeared while running my script with the new adegenet version ...
>
> Does someone have an idea of what the problem is ? I can provide the full
> script and data if needed
>
>
>
>
>
> Thank you for your help !
>
> --
> Vanesse Labeyrie
>
>
>
> _______________________________________________
> 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/119a074d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfhijbbh.png
Type: image/png
Size: 69217 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160926/119a074d/attachment-0001.png>
More information about the adegenet-forum
mailing list