Description Usage Arguments References Examples
A wrapper function to run gINLAnd using SNP data in ADEGENET's genind format
1 | run.gINLAnd(input.file, result.file, cutoff, coord, env.var)
|
input.file |
A genind object |
result.file |
name of your result file |
cutoff |
logBF threshold for candidate loci (i.e. loci with logBF>cutoff will be considered candidates) |
coord |
dataframe with x and y spatial coordinates for each population |
env.var |
value of some environmental variable for each population |
Guillot G, Vitalis R, le Rouzic A, Gautier M (2014) Detecting correlation between allele frequencies and environmental variables as a signature of selection. A fast computational approach for genome-wide studies. Spatial Statistics 8, 145–155.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## set directory for results to be written
setwd("path/to/working/directory")
## load the example data
data(rainbow.genind)
data(rainbow.env)
# subset rainbow.genind to 200 loci
gen100 <- rainbow.genind[,1:200]
# get xy coordinates
coords <- rainbow.env[,2:3]
# get environmental variable
tempPC1 <- as.data.frame(rainbow.env[,4])
## run gINLAnd
run.gINLAnd(gen100, "res.tempPC1", 10, coords, tempPC1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.