Write a genepop file from a tidy data frame or GDS file/object. Used internally in radiator and assigner and might be of interest for users.
write_genepop(
data,
pop.levels = NULL,
genepop.header = NULL,
markers.line = TRUE,
filename = NULL,
...
)
(4 options) A file or object generated by radiator:
tidy data
Genomic Data Structure (GDS)
How to get GDS and tidy data ?
Look into tidy_genomic_data
,
read_vcf
or
tidy_vcf
.
(optional, string) A character string with your populations ordered.
Default: pop.levels = NULL
. Described in read_strata
.
The first line of the Genepop file.
Default: genepop.header = NULL
will use "radiator genepop with date".
(optional, logical) In the genepop and structure
file, you can write the markers on a single line separated by
commas markers.line = TRUE
,
or have markers on a separate line, i.e. in one column, for the genepop file
(not very useful with thousands of markers) and not printed at all for the
structure file.
Default: markers.line = TRUE
.
(optional) The file name prefix for the genepop file
written to the working directory. With default: filename = NULL
,
the date and time is appended to radiator_genepop_
.
other parameters passed to the function.
A genepop file is saved to the working directory.
Raymond M. & Rousset F, (1995). GENEPOP (version 1.2): population genetics software for exact tests and ecumenicism. J. Heredity, 86:248-249
Rousset F. genepop'007: a complete re-implementation of the genepop software for Windows and Linux. Molecular Ecology Resources. 2008, 8: 103-106. doi:10.1111/j.1471-8286.2007.01931.x