alg2nex: Converts from PHYLIP or FASTA format to NEXUS format.

Description Usage Arguments Details Value Author(s) See Also

Description

Converts an alignment from the PHYLIP or FASTA format to the NEXUS format.

Usage

1
2
alg2nex(file, format = "sequential", interleaved = FALSE, gap = "-",
  missing = "?", partition.file = NULL)

Arguments

file

file in phylip format (format="sequential") or in fasta format (format="fasta")

format

format argument to be passed to ape::read.dna

interleaved

interleaved argument to be passed to ape::read.dna

gap

character for gaps (to be passed to write.nexus.data)

missing

character for msising data (to be passed to write.nexus.data)

partition.file

if NULL nothing happens, if it's the path to a valid file is given this file is appended to the alignement. Particularly useful to include partition information in the NEXUS file.

Details

This function only takes alignments (all sequences must be the same length). It uses a slightly modified version of ape's write.nexus.data. With this function it is also possible to append partition information at the end of the alignment. The partition information has to be written in the NEXUS format and be provided in a separate file.

Value

nothing, used for its side of generating a NEXUS file

Author(s)

Francois Michonneau

See Also

ape::write.nexus.data


fmichonneau/chopper documentation built on May 16, 2019, 1:43 p.m.