guess.format.msa: MSA Guess Format

Description Usage Arguments Value Author(s) See Also Examples

View source: R/msa.R

Description

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

Usage

1
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").

Author(s)

Melissa J. Hubisz

See Also

is.format.msa

Examples

1
2
3
4
5
6
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)

rphast documentation built on May 1, 2019, 9:26 p.m.