clinesXenvironment: Function to correlate INTROGRESS genomic clines with raster...

View source: R/genomicClinesXenvironment.R

clinesXenvironmentR Documentation

Function to correlate INTROGRESS genomic clines with raster data

Description

Function to correlate INTROGRESS genomic clines with raster data

Usage

clinesXenvironment(
  clineList,
  rasterPointValues,
  rastersToUse = NULL,
  clineLabels = c("P1, Het", "P2"),
  outputDIR = "./plots",
  showPLOTS = FALSE,
  clineMethod = "permutation",
  prefix = "population1",
  cor.method = "auto"
)

Arguments

clineList

List object returned from runIntrogress

rasterPointValues

List of data.frames with raster values at each sample locality. See ?extractPointValues

rastersToUse

Integer vector indicating which raster layers to use for genomic cline X environment plots. If NULL, uses all rasters

clineLabels

Character vector of length == 3 designating population names for c(P1, Het, P2)

outputDIR

File path to directory for outputting plots

showPLOTS

Boolean; Whether to print the plots to the screen

clineMethod

Character string indicating desired method for generating genomic clines. Must be either "permutation" or "parametric". See ?introgress

prefix

Character prefix for output files

cor.method

Method for correlations c("pearson", "kendall", "spearman)

sample.info

File path to sample info file with 4 columns: indID,popID,latitude,longitude

header

Boolean specifying if sample.info has a header line

coords

data.frame with coordinates. Can be taken from env.list, an object returned from the prepare_rasters() function. See ?prepare_rasters(). If used, value is env.list[3]

Examples

clinesXenvironment(clineList = eatt,
                   rasterPointValues = rasterPoints,
                   rasterToUse = NULL,
                   clineLabels = c("EA", "Het", "TT"),
                   outputDIR = "./cline_plots",
                   clineMethod = "permutation",
                   prefix = "eatt",
                   cor.method = "auto")

btmartin721/ClineHelpR documentation built on Oct. 15, 2024, 5:05 a.m.