R/fas2phy.R

Defines functions fas2phy

Documented in fas2phy

##' convert fasta (aligned sequences) to phylip format
##'
##' 
##' @title fas2phy 
##' @param fasfile aligned sequences in fasta format
##' @param outfile output file
##' @param type one of interleaved and sequential
##' @return None
##' @export
##' @author Guangchuang Yu
##' fa_file <- system.file("extdata/HA.fas", package="seqmagick")
##' phy_file <- tempfile(fileext = ".phy")
##' fas2phy(fa_file, phy_file)
fas2phy <- function(fasfile, outfile="out.phy", type="sequential") {
    x <- fa_read(fasfile)
    phy_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.