R/dat2fasta.R

Defines functions dat2fasta

Documented in dat2fasta

#### author: Jinlong Zhang <jinlongzhang01@gmail.com>
#### institution: Kadoorie Farm and Botanic Garden, Hong Kong
#### package: phylotools
#### URL: http://github.com/helixcn/phylotools
#### date: 26 MAY 2015


dat2fasta <- function(dat, outfile = "out.fasta") {
  writeLines(paste(">", as.character(dat$seq.name), "\n", as.character(dat$seq.text), sep = ""), outfile)
  cat(paste(outfile, "has been saved to ", getwd(), "\n"))
}
helixcn/phylotools documentation built on Oct. 11, 2024, 4:11 a.m.