R/phy2fas.R

Defines functions phy2fas

Documented in phy2fas

##' convert phylip file to fasta file
##'
##' 
##' @title phy2fas
##' @param phyfile phylip file 
##' @param outfile output file
##' @param type one of interleaved and sequential
##' @return None
##' @export
##' @author Guangchuang Yu
##' @examples
##' phy_file <- system.file("extdata/HA.phy", package="seqmagick")
##' fa_file <- tempfile(fileext = '.fas')
##' phy2fas(phy_file, fa_file)
phy2fas <- function(phyfile, outfile="out.fas", type="interleaved") {
    x <- phy_read(phyfile)
    fa_write(x, outfile, type)
}

Try the seqmagick package in your browser

Any scripts or data that you put into this service are public.

seqmagick documentation built on July 9, 2023, 7:36 p.m.