catGenes::writeNexus()writeNexus
Writes a concatenated (non-interleaved) or combined (interleaved) NEXUS-formatted dataset for multigene phylogenetic analysis
Description
Writes a final concatenated (non-interleaved) or combined (interleaved) NEXUS-formatted dataset for multigene phylogenetic analysis, from the resulting list of equally-sized dataframes containing the input individual DNA alignments, as generated by the functions catfullGenes or catmultGenes. Depending on the chosen arguments the final NEXUS-formatted file will or will not include a preliminary command block (including the charset of each partition).
Arguments
| Argument | Description |
|---|---|
| x | The object to be written, a list of equally-sized dataframes containing the input gene datasets, as generated by or catmultGenes. |
| file | Either a character string naming a file or a connection open for writing. |
| genomics | Logical, if TRUE, it will be helpful in phylogenomics where all provided species identifiers (e.g. collector number and GenBank accession numbers) will be kept in the resultant concatenated dataset. This means the concatenated dataset will never be written with species including bracketed comments for identifiers that differ because at least one species is missing data for any gene. |
| interleave | Logical, if FALSE will fully concatenate the DNA alignments without individually distinguishing each gene dataset as separate named partitions within the complete matrix. |
| bayesblock | Logical, if FALSE will not create a preliminary MrBayes command block including the charsets showing the number of characters of each individual gene partition. |
| endgaps.to.miss | Logical, if FALSE the function will not replace terminal GAPs into missing character (?). |
| verbose | Logical, if FALSE, a message showing each step during writing of the NEXUS file will not be printed in the console in full. |
Examples
data(Gaya)
df <- catfullGenes(Gaya,
shortaxlabel = TRUE,
missdata = FALSE,
outgroup = "Abutilon_costicalyx")
writeNexus(df,
file = "filename.nex",
genomics = FALSE,
interleave = TRUE,
bayesblock = TRUE)