runeems_snps_setup: runeems_snps_setup function Wrapper function for preparing to...

View source: R/runeems_snps_setup.R

runeems_snps_setupR Documentation

runeems_snps_setup function Wrapper function for preparing to run EEMS. A bash script is produced that will run EEMS. Optionally generates a '.outer' file from the '.coords' file.

Description

runeems_snps_setup function

Wrapper function for preparing to run EEMS. A bash script is produced that will run EEMS. Optionally generates a '.outer' file from the '.coords' file.

Usage

runeems_snps_setup(
  x,
  coords,
  save.in,
  outer = NULL,
  exe.path = NULL,
  n.sites = NULL,
  pl = 2,
  nDemes = 300,
  numMCMCIter = 1e+07,
  numBurnIter = 1e+06,
  numThinIter = 9999,
  nchains = 3,
  ...
)

Arguments

x

An object of class genind or vcfR, or a character string with path to a diffs or VCF file.

coords

Character string with path to coordinates file, which has two columns with longitude and latitude coordinates (decimal degree format) of individuals in the genind object. Columns should be space or tab separated.

save.in

Character string with path to directory where EEMS input and output files should be saved. This directory must not exist prior to running this function, but its parent directory must exist. Files and directories generated by this function: /save.in/ /save.in/data /save.in/data/data.coord /save.in/data/data.diffs /save.in/data/data.outer /save.in/mcmc ### This will contain as many mcmc subdirectories as the value of nchains. /save.in/params ### This will contain as many parameter files as the value of nchains.

outer

Either NULL (the default) or a character string with path to the '.outer' file, which has two columns with longitude and latitude coordinates (decimal degree format) defining the perimeter of a polygon covering the region to model with EEMS. See EEMS documentation. If NULL, this function will generate a ".outer" file automatically; the user will be prompted to accept the auto-generated *.outer file prior to running eems. If you don't want to use the automatically generated *.outer file, you can create a custom one here: https://www.keene.edu/campus/maps/tool/

exe.path

Character string with path to runeems_snps executable, or NULL (the default) if you've defined the EEMS path with the function config_miscwrappers. Use paths_misc.wrappers() to check if this path has been set.

n.sites

The number of sites. Determined automatically if 'x' is a VCF file or vcfR or genind object, but must be supplied if 'x' is a path to a diffs matrix.

pl

Ploidy. Default is 2.

nDemes

Number of demes. Default is 300. This can be a single number or a numeric vector of length nchains with value to use for each chain.

numMCMCIter

Number of MCMC iterations (i.e., chain length). Default is 10000000. This can be a single number or a numeric vector of length nchains.

numBurnIter

Number of Burnin iterations (i.e., chain length). Default is 1000000. This can be a single number or a numeric vector of length nchains.

numThinIter

Number of iterations to ignore before sampling the next MCMC iteration. Default is 9999. This can be a single number or a numeric vector of length nchains.

nchains

Number of chains to run. Default is 3.

...

Arguments to pass to create.outer. See ?create.outer() for possible arguments.

Value

Nothing is returned.


JeffWeinell/misc.wrappers documentation built on Sept. 20, 2023, 12:42 p.m.