Learn R Programming

seqRFLP (version 1.0.1)

ConvFas: Convert files to fasta format

Description

This function could be used to convert raw phy,nex, fas files to fasta format. It is also a internal function called by as.fasta() which is more friendly to use.

Usage

ConvFas(fil = NULL, type = c("fas", "nxs", "phy"))

Arguments

fil
file that to be converted.
type
File types that will be converted.

Value

The "fasta" format data.

Details

Users may have to use readLines() to import the content when dealing with external datasets. Currently, this function could handling the standard phy, nex, fas files, lines between "[]" must be deleted in nex files.

References

None.

See Also

See Also as.fasta for converting data types.

Examples

Run this code

data(fil.phy)
ConvFas(fil = fil.phy, type = "phy")
data(fil.nxs)
ConvFas(fil = fil.nxs, type = "nxs")

Run the code above in your browser using DataLab