runIntrogress: Functions to run INTROGRESS and correlate genomic clines X...

View source: R/genomicClinesXenvironment.R

runIntrogressR Documentation

Functions to run INTROGRESS and correlate genomic clines X environment

Description

These functions run INTROGRESS and generate genomic clines. The genomic clines are then correlated with the raster values at each sampling locality for the raster layers determined to be the best predictors for species distributions in MAXENT. See ?prepare_rasters, ?partition_raster_bg, ?runENMeval, ?summarize_ENMeval, and ?extractPointValues.

Usage

runIntrogress(
  p1.file,
  p2.file,
  admix.file,
  loci.file,
  clineLabels = c("P1", "Het", "P2"),
  minDelt = 0.8,
  prefix = "population1",
  outputDIR = "./plots",
  showPLOTS = FALSE,
  sep = "\t",
  pop.id = FALSE,
  ind.id = FALSE,
  fixed = FALSE
)

Arguments

p1.file

Character string; File path for INTROGRESS p1 input file

p2.file

Character string; File path for INTROGRESS p2 input file

admix.file

Character string; File path for INTROGRESS admixed file

loci.file

Character string; File path for INTROGRESS loci file

clineLabels

Character vector of length == 3 for c(P1, Het, P2) populations

minDelt

Numeric; Minimum allele frequency delta to retain loci for INTROGRESS

prefix

Character string; Population prefix for input and output files

outputDIR

Character string; File path for INTROGRESS output

showPLOTS

Boolean; Whether to print the plots to the screen

sep

Character string; Column delimiter for INTROGRESS input files

pop.id

Boolean; Value for INTROGRESS parameter pop.id. See ?prepare.data in introgress R pacakge

ind.id

Boolean; Value for INTROGRESS parameter ind.id See ?prepare.data in introgress R package

fixed

Boolean; TRUE if input data are fixed SNPs

Details

Function to run INTROGRESS

Value

List object containing genomic cline output

Examples

eatt <- runIntrogress(p1.file = "EATT_p1data.txt",
                      p2.file = "EATT_p2data.txt",
                      admix.file = "EATT_admix.txt",
                      loci.file = "EATT_loci.txt",
                      clineLabels = c("EA", "Het", "TT")
                      minDelt = 0.8,
                      prefix = "eatt",
                      outputDIR = "./introgress_plots",
                      sep = "\t",
                      pop.id = FALSE,
                      ind.id = FALSE,
                      fixed = FALSE)

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