| gl2phylip | R Documentation |
This function calculates and returns a matrix of Euclidean distances between populations and produces an input file for the phylogenetic program Phylip (Joe Felsenstein).
gl2phylip(
x,
outfile = "phyinput.txt",
outpath = NULL,
bstrap = 1,
verbose = NULL
)
x |
Name of the genlight object containing the SNP data [required]. |
outfile |
Name of the file to become the input file for phylip [default "phyinput.txt"]. |
outpath |
Path where to save the output file [default global working directory or if not specified, tempdir()]. |
bstrap |
Number of bootstrap replicates [default 1]. |
verbose |
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default NULL, adopting the global verbosity set by gl.set.verbosity(), or 2 if no global is set]. |
Distances are computed from allele frequencies, locus by population: the mean allele dosage of the scored individuals divided by 2. Missing genotypes are excluded from each frequency; if a population has no scored individuals at a locus, the cell is left NA and the affected distances rest on the remaining loci (a warning is given).
Population names are truncated to the 10-character phylip name field; a warning is given when truncation renders two populations identical.
If bstrap > 1, the loci are resampled with replacement for each bootstrap replicate and the replicate distance matrices are appended to the output file. The returned matrix is always the distance matrix computed from the observed data.
Matrix of Euclidean distances between populations, computed from the observed data.
Author(s): Arthur Georges. Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr
Other linkers:
gl2paup.parsimony(),
gl2paup.svdquartets(),
gl2plink()
if (isTRUE(getOption("dartR_fbm"))) testset.gl <- gl.gen2fbm(testset.gl)
result <- gl2phylip(testset.gl, outfile='test.txt', outpath=tempdir(), bstrap=10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.