[adegenet-forum] UTMs vs lat/lon, and inverse distance network confusion

katherine.miller katherine.miller at students.tamuk.edu
Sun Nov 24 19:35:31 CET 2013


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


More information about the adegenet-forum mailing list