This function generates an Arlequin input file (.arp) from a DNA alignment
and a groups data frame. The alignment should be in the DNAbin format, and
the groups data frame should have two columns: 'group' and 'name'. The function
checks the validity of the inputs and creates an Arlequin file in the specified
directory. If the output file already exists, the user will be prompted to delete it.
This script was adapted from Josh Banta (source)
Usage
create_arlequin(fasta, groups, output.dir = ".")
Source
https://sites.google.com/site/thebantalab/tutorials?authuser=0#h.39zz6drphh3u
Arguments
- fasta
A DNAbin object representing the DNA alignment.
- groups
A data.frame with two columns: 'group' and 'name', representing
the sample groups.
- output.dir
A character string specifying the directory where the
output file will be saved. Default is the current working directory.
Value
This function does not return any value. It creates a file named 'output.arp'
in the specified directory.