[adegenet-forum] UTMs vs lat/lon, and inverse distance network confusion
Roy Mathew Francis
RoyFrancis.Mathew at agrsci.dk
Mon Nov 25 12:32:05 CET 2013
Hi,
I am not an expert on this, but I have done some sPCA using large areas. If your area spans more than one UTM zone, just use any one zone that fits best. You will still get coordinates for points outside the UTM zone since it's based on one transverse meridian. When you plot it later on a background map, make sure the background map is plotted using the same UTM coordinates. When using points outside the UTM zone, distances might be fine but the projection would be distorted.
Regarding the minimum distance, I always thought that was the distances your individuals could migrate (maybe avg dis or max dist). But, maybe that is neighbourhood by distance type 5.
Roy
-----Original Message-----
From: adegenet-forum-bounces at lists.r-forge.r-project.org [mailto:adegenet-forum-bounces at lists.r-forge.r-project.org] On Behalf Of katherine.miller
Sent: 24 November 2013 19:36
To: Jombart, Thibaut; adegenet-forum at lists.r-forge.r-project.org
Subject: Re: [adegenet-forum] UTMs vs lat/lon, and inverse distance network confusion
Thank you so much for your input.
When I try to do the Delaunay triangulation it tells me:
"Error in tri2nb(xy) : too few coordinates"
I'm wondering if the problem is the XY data. I followed the format from Robinson et al. 2012: The walk is never random: subtle landscape effects shape gene flow in a continuous white-tailed deer population in the Midwestern United States. http://datadryad.org/resource/doi:10.5061/dryad.p7639
I'm trying to duplicate Robinson et al.'s R script, uploaded with my data here:
https://www.dropbox.com/sh/8bckmlf2nbx5hdh/75HaBklOlG
This includes my genetic data, the .gen file, and the locations. The genetic data represents northern bobwhite genetic samples, each line a new sample, and alleles at 13 loci.
In response to the finer scale approach, I've been setting up my data for a spatial regression in spdep, but I would like to get the spatial pca to run first.
Comments and suggestions are definitely appreciated! Thank you in advance!
Katherine S. Miller
Ph.D. candidate
Caesar Kleberg Wildlife Research Institute
Texas A&M University-Kingsville
MSC 218, 700 University Blvd
Kingsville, TX 78363
(361) 593-4486, office
________________________________________
From: Jombart, Thibaut [t.jombart at imperial.ac.uk]
Sent: Sunday, November 24, 2013 8:45 AM
To: katherine.miller; adegenet-forum at lists.r-forge.r-project.org
Subject: RE: [adegenet-forum] UTMs vs lat/lon, and inverse distance network confusion
Dear Katherine,
sPCA uses a rather crude model of spatial proximities (most commonly a binary connection network), so that conversion from latitudes/longitudes, even at that regional scale, should not be much of an issue.
As for the choice of network or the error you report, it is difficult to provide advice / guess the origin of the error without a spatial distribution of your locations, or a sample of data and code reproducing the error. In general, I would advocated using a binary connection network (e.g. Delaunay's triangulation, Gabriel's graph) where possible. If the sampling design is very uneven, treating clusters as populations (possibly with finer scale, within-population geographic analyses) might be an option.
Cheers
Thibaut
--
######################################
Dr Thibaut JOMBART
MRC Centre for Outbreak Analysis and Modelling Department of Infectious Disease Epidemiology Imperial College - School of Public Health St Mary's Campus Norfolk Place London W2 1PG United Kingdom Tel. : 0044 (0)20 7594 3658 t.jombart at imperial.ac.uk http://sites.google.com/site/thibautjombart/
http://adegenet.r-forge.r-project.org/
________________________________________
From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of katherine.miller [katherine.miller at students.tamuk.edu]
Sent: 23 November 2013 21:36
To: adegenet-forum at lists.r-forge.r-project.org
Subject: Re: [adegenet-forum] UTMs vs lat/lon, and inverse distance network confusion
Greetings,
I am new to SPCA analysis, and haven't used R that much either. I have 2 somewhat related questions:
1) I read somewhere that lat and lon have to be converted to UTMs prior to analysis. I have a rather large spatial area (Iowa to Texas), so it spans 14R to 15T regions. I've looked at this page, http://www.inside-r.org/packages/cran/PBSmapping/docs/convUL , and I'm wondering about the erroneous results and how this will work. Has anyone out there done SPCA with a large area?
2) Additionally, I've tried to duplicate a set of data on a smaller scale (XY data is already in UTMs, alleles from 14 loci are in a .gen file), and when I am prompted to choose a network, I choose 7 (inverse distance, the locations are not evenly distributed). I am prompted to choose an exponent and a minimum distance. I understand the exponent of 1, I think, but either my understanding of the min distance is wrong, or something else is producing this error:
error in if (any(x < 0)) stop("values in x cannot be negative") : missing value where TRUE/FALSE needed
I have read through the tutorials for spca and adegenet, but clearly I'm still confused. Any help would appreciated!
Katherine S. Miller
Ph.D. candidate
Caesar Kleberg Wildlife Research Institute
Texas A&M University-Kingsville
MSC 218, 700 University Blvd
Kingsville, TX 78363
(361) 593-4486, office
_______________________________________________
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