Learn R Programming

rphast (version 1.6.9)

guess.format.msa: MSA Guess Format

Description

Guess the format of an MSA file by looking at the file contents.

Usage

guess.format.msa(filename, method = "content")

Arguments

filename

A vector of file names

method

Either "content" or "extension". "content" implies to open the file and guess the format based on content; "extension" simply guesses based on the extension on the file name (it does not open the file). This argument will be recycled to the length of filename.

Value

A character vector giving the format of each file (one of "MAF", "FASTA", "LAV", "SS", "PHYLIP", "MPM", or "UNKNOWN").

See Also

is.format.msa

Examples

Run this code
# NOT RUN {
exampleArchive <- system.file("extdata", "examples.zip", package="rphast")
files <- c("ENr334-100k.maf", "ENr334-100k.fa", "ENr334-100k.ss", "sol1.maf", "sol1.gp")
unzip(exampleArchive, files=files)
guess.format.msa(files)
# the last file is not an alignment, which is why it returns UNKNOWN
unlink(files)
# }

Run the code above in your browser using DataLab