run.gINLAnd: gINLAnd genotype-environment association (GEA) analysis

Description Usage Arguments References Examples

View source: R/run.gINLAnd.R

Description

A wrapper function to run gINLAnd using SNP data in ADEGENET's genind format

Usage

1
run.gINLAnd(input.file, result.file, cutoff, coord, env.var)

Arguments

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

References

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.

Examples

 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)

pygmyperch/melfuR documentation built on Oct. 10, 2020, 1:23 p.m.