[adegenet-forum] DAPC and coordinates

Bernhard Stoeckle (Wildbiologie) stoeckle at wzw.tum.de
Thu Dec 2 09:49:09 CET 2010


Dear Thibaut,


thank you very much for your last answer. It worked perfect! I am really sorry 
but I have one last question and I would be glad if you can help me again.
I have a microsatellite data set (8 populations and 12 loci) with geographical coordinates and I made a 
dapc and it worked well. Then I tried to visualize the dapc in combination with the 
geographical coordinates and it failed. I did the following:

I loaded also the package "maps" and I created a textfile named popInfo and it 
looked like this:

Population,Longitude,Latitude
1,48.150341,11.881521
2,48.149266,11.887157
3,48.147861,11.874697
4,48.143326,11.973001
5,48.147606,11.899779
6,48.101255,11.870512
7,48.162266,11.970248
8,48.127254,11.915180


Then I tried to visualize the dapc results according 
to the example eHDGP in the manual with the following commands:


> xy <- cbind(grp$other$popInfo$Longitude, grp$other$popInfo$Latitude)
> par(mar=rep(.1,4))
> map(fill=TRUE, col="lightgrey")
> colorplot(xy, -dapc1$grp.coord, cex=3, add=TRUE, trans=FALSE)



But it did not work. R showed a couple of error messages.
I would be glad if you can help me again. 


Bernhard 


Technische Universitaet Muenchen TUM
Lehrstuhl für Zoologie
AG Molekulare Zoologie
Hans-Carl-von-Carlowitz-Platz 2
85354 Freising 


More information about the adegenet-forum mailing list