[adegenet-forum] xy coordinate data

Jombart, Thibaut t.jombart at imperial.ac.uk
Mon Feb 10 17:08:46 CET 2014


Hi Lisa, 

yes, it is fine. For a genind object, your xy matrix should have one row per individual, and match the order of the individuals. To check the ordering of individuals in the genind, use the function 'indNames'.

For a genpop object, xy must have one row per population. To check the populations, assuming 'x' is your genpop, use 'x at pop.names'.

Best
Thibaut


________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Lumley, Lisa [Lisa.Lumley at RNCan-NRCan.gc.ca]
Sent: 08 February 2014 07:20
To: adegenet-forum at lists.r-forge.r-project.org
Subject: [adegenet-forum] xy coordinate data

Hi there,

I've searched the adegenet forum and web, but have not been able to find anything, so hopefully these questions aren't redundant. I just want to confirm the way I am inputting the xy coordinate data.

1. I am importing Structure files, where the data is on two lines for each individual. However, I am importing an xy coordinate file corresponding to the data that gives the coordinates only on one line per individual (i.e. a file for 100 individuals will have 200 rows of data in Structure, corresponding to 100 rows of data in the xy coordinate file).

2. After converting a genind file to a genpop file (e.g. for IBD), I am importing an xy coordinate file with only one line of coordinate data per population (i.e. 15 populations = 15 rows of coordinate data).

Are these the correct way of doing this? Just want to make sure, as matching these two matrices will be crucial to any spatial analyses...

Thanks for your help!
Lisa
_______________________________________________
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


More information about the adegenet-forum mailing list