dat2phylip: Conver the data frame to sequential PHYLIP format file

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Convert and save a data frame to sequential PHYLIP file.

Usage

1
dat2phylip(dat, outfile = "out.phy")

Arguments

dat

the data frame returned by read.phylip, read.fasta.

outfile

character string represents the phylip file to be generated.

Details

The output will be in sequential PHYLIP format.

Value

This is a subroutine, there is no return value.

Note

The names of the sequences should not contain white space or Punctuation characters. See regex for more details.

Author(s)

Jinlong Zhang <jinlongzhang01@gmail.com>

References

http://www.genomatix.de/online_help/help/sequence_formats.html

See Also

dat2fasta, read.fasta, read.phylip

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  cat(
  ">seq_2", "GTCTTATAAGAAAGAATAAGAAAG--AAATACAAA-------AAAAAAGA",
  ">seq_3", "GTCTTATAAGAAAGAAATAGAAAAGTAAAAAAAAA-------AAAAAAAG",
  ">seq_5", "GACATAAGACATAAAATAGAATACTCAATCAGAAACCAACCCATAAAAAC",
  ">seq_8", "ATTCCAAAATAAAATACAAAAAGAAAAAACTAGAAAGTTTTTTTTCTTTG",
  ">seq_9", "ATTCTTTGTTCTTTTTTTTCTTTAATCTTTAAATAAACCTTTTTTTTTTA",
  file = "trn1.fasta", sep = "\n")

res <- read.fasta("trn1.fasta")
dat2phylip(res)
unlink("trn1.fasta")
unlink("out.phy")

phylotools documentation built on May 2, 2019, 3:25 a.m.