genepop: Run GENEPOP

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/genepop.R

Description

Format output files and run GENEPOP. Filenames used are returned so that output files can be viewed or read and parsed into R.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
genepop(
  g,
  output.ext = "",
  show.output = F,
  label = "genepop.run",
  dem = 10000,
  batches = 100,
  iter = 5000,
  other.settings = "",
  input.fname = "loc_data.txt",
  exec = "Genepop"
)

genepopWrite(g, label = NULL)

Arguments

g

a gtypes object.

output.ext

character string to use as extension for output files.

show.output

logical. Show GENEPOP output on console?

label

character string to use to label GENEPOP input and output files.

dem

integer giving the number of MCMC dememorisation or burnin steps.

batches

integer giving number of MCMC batches.

iter

integer giving number of MCMC iterations.

other.settings

character string of optional GENEPOP command line arguments.

input.fname

character string to use for input file name.

exec

name of Genepop executable

Value

genepop

a list with a vector of the locus names and a vector of the input and output filenames.

genepopWrite

a list with the filename written and a vector mapping locus names in the file to the original locus names.

Note

GENEPOP is not included with strataG and must be downloaded separately. Additionally, it must be installed such that it can be run from the command line in the current working directory. See the vignette for external.programs for installation instructions.

Author(s)

Eric Archer eric.archer@noaa.gov

References

GENEPOP 4.3 (08 July 2014; Rousset, 2008)
http://kimura.univ-montp2.fr/~rousset/Genepop.htm

See Also

hweTest, LDgenepop

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# Estimate Nm for the microsatellite data
data(msats.g)
# Run Genepop for Option 4
results <- genepop(msats.g, output.ext = ".PRI", other.settings = "MenuOptions=4")
# Locus name mapping and files
results
# Show contents of output file
file.show(results$files["output.fname"])

## End(Not run)

strataG documentation built on Feb. 28, 2020, 9:07 a.m.