[adegenet-forum] question regarding error for mantel.randtest
Yadav-Pauletti, Sunita (yadavps)
yadavps at mail.uc.edu
Fri Dec 12 16:18:49 CET 2014
Hello Thibaut,
Thank you for your suggestion. The code I used was looking at overall object sizes and not matrices so I could see that Dgen and Dgeo were different sizes but not why.
The issue seems to be that Dgen (genetic) matrix is a 7x7 matrix - populations, and Dgeo (geographic) is a 241x241 - individuals. I would like to test IBD both at the population level and individual level (within populations). For populations, can I get geographic distances in adegenet or should I calculate it in my GIS software and read the distances? Secondly, can the following code be used for individual genetic distances in adegenet? It seems to work and I could run the mantel test.
Dgen <- dist(genfile, method="euclidean")
Dgeo <- dist(genfile$other$xy, method="euclidean")
The genAlEx file format is the following, data starts at row 4:
Individual_ID Pop_ID Alelle_1 Allele_1b ...... Blank Column X Y
951_gps22 951 187 187 ...... 748600 2326728
The next question I have is how I can incorporate distances from a friction surface (cost surface) for a mantel test. Is there a way to read those distances in adegenet?
Thanks,
Sunita
More information about the adegenet-forum
mailing list