[adegenet-forum] inexperienced user

Pip Griffin pip.griffin at gmail.com
Tue Mar 26 17:13:31 CET 2013


Hi Rita,

as you probably know, sPCA is not designed to look at spatial
structure between genetically-distinct, geographically well-defined
populations, but rather to allow visualisation of (potentially crypic)
geographic patterns in genetic data from multiple individuals across a
geographic range. I found the Scandinavian bear example in Jombart et
al (2008) really helpful in understanding what sPCA can do.

So assuming that you do indeed have that sort of data, just with a few
individuals sampled from each of multiple locations/populations...
>From what I remember, sPCA does not like repeated geographic
coordinates - because they will produce zero pairwise geographic
distances, and/or complicate the calculation of the distance network.
One way to fudge it is to add a very small jitter to your data - you
can do this using the 'jitter' command in R on the X or Y coordinate,
or both. Or, depending on your dataset, it might be appropriate to
include just one representative genotype per population.

hope this helps
Pip

On Mon, Mar 25, 2013 at 5:15 PM, Rita Castilho <rita.castil at gmail.com> wrote:
> Hi!
> I have a simple question. Most of us have our microsatellite data in an
> excel file to start with. The ones how use GenAlex even have the geographic
> coordinates in the last two rows. We can easily convert the data in the
> sheet into several formats. How can I convert an easily obtained csv file
> with headers (1sr row = individual id, 2nd = population id, 3rd row= allele
> 1, locus 1, 4th row= allele 2, locus 1, etc, 17th row = latitude, 18th row =
> longitude) nto a genind object that can be used in sPCA? I get an error that
> coordinates are repeated, but that is normal as there are multiple
> individuals in the same pop.
>
> If this question was answered previously, I will appreciate if you could
> direct me to it.
> Many thanks
> Rita
>
> first 5 rows of test.csv file
> ind,pop,loc1A,loc1B,loc2A,loc2B,loc3A,loc3B,loc4A,loc4B,loc5A,loc5B,loc6A,loc6B,loc7A,loc7B,lat,long
> FD_01,FD,151,163,168,170,189,201,248,248,177,187,166,166,230,246,49.85,-29.62
> FD_02,FD,137,147,146,146,173,181,240,254,177,179,162,166,230,246,49.85,-29.62
> FD_03,FD,137,169,146,168,173,173,222,238,193,203,164,164,230,246,49.85,-29.62
> FD_04,FD,137,147,144,144,189,201,236,242,185,193,166,166,238,240,49.85,-29.62
>
>
> _______________________________________________
> 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