Learn R Programming

PopGenKit (version 1.0)

convert: Convert a Genepop file to Arlequin format

Description

This function converts a datafile from Genepop format (extension .gen) to Arlequin project file format (extension .arp).

Usage

convert(datafile, ndigit = 3)

Arguments

datafile
Name of the file to convert, with the extension (e.g. 'glyptemys3.gen').
ndigit
The number of digits per allele in the input file. Can be 2 or 3 (default is 3).

Value

  • A file with the same file name as the input file, but with the .arp extension (Arlequin), will be saved in the working directory.

Details

Input file must end with the extension '.gen'. Make sure to follow standard Genepop format for input file. The IDs of all individuals should be immediately followed by a comma. Population labels should be Pop, POP, or pop. There should not be invisible characters (tabs or spaces) at the end of lines, especially lines on which population labels are found. These lines should have only three characters (Pop). See example file 'glyptemys3.gen' if needed. For converting multiple files, use the function batchconvert instead.

References

Excoffier, L. and H.E.L. Lischer (2010). Arlequin suite ver 3.5: A new series of programs to perform population genetics analyses under Linux and Windows. Mol. Ecol. Res. 10: 564-567. Rousset, F. (2008). Genepop'007: a complete reimplementation of the Genepop software for Windows and Linux. Mol. Ecol. Res. 8: 103-106.

See Also

batchconvert