Learn R Programming

strataG (version 2.0.2)

genepop: Run GENEPOP

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

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 = "genepop.write", input.fname = "loc_data.txt")

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 vector of the locus names used in the input file

References

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

See Also

hweTest, LDgenepop

Examples

Run this code
# 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"])
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab