dat2phylip | R Documentation |
Convert and save a data frame to sequential PHYLIP file.
dat2phylip(dat, outfile = "out.phy")
dat |
the data frame returned by |
outfile |
character string represents the phylip file to be generated. |
The output will be in sequential PHYLIP format.
This is a subroutine, there is no return value.
The names of the sequences should not contain white space or Punctuation characters. See regex
for more details.
Jinlong Zhang <jinlongzhang01@gmail.com>
http://www.genomatix.de/online_help/help/sequence_formats.html
dat2fasta
, read.fasta
, read.phylip
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.