mega: Read and Write MEGA

Description Usage Arguments Value Author(s) References

Description

Read and write MEGA formatted files.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
read.mega(file)

write.mega(
  g,
  file = NULL,
  label = NULL,
  line.width = 60,
  locus = 1,
  as.haplotypes = TRUE
)

Arguments

file

a MEGA-formatted file of sequences.

g

a gtypes object.

label

label for MEGA filename (.meg). If NULL, the gtypes description is used if present.

line.width

width of sequence lines.

locus

number or name of locus to write.

as.haplotypes

output sequences as haplotypes? If TRUE, contents of @sequences slot are returned - treated as if they were haplotypes. If FALSE, one sequence per individual is returned.

Value

for read.mega, a list of:

title

title of MEGA file

dna.seq

DNA sequences in DNAbin format

Author(s)

Eric Archer eric.archer@noaa.gov

References

Sudhir Kumar, Glen Stecher, and Koichiro Tamura (2015) MEGA7: Molecular Evolutionary Genetics Analysis version 7.0. Molecular Biology and Evolution (submitted). Available at: http://www.megasoftware.net


strataG documentation built on Feb. 28, 2020, 9:07 a.m.