readSet {coRdon}R Documentation

Read set of sequences.

Description

Reads a set of fasta files stored in folder, or a single fasta file.

Usage

readSet(folder = character(), file = character(), KOs = c(),
  zipped = FALSE, prepend.filenames = FALSE)

Arguments

folder

Path to directory containing .fasta files.

file

Path to a single .fasta file, or zipped file (if latter, specify ZIPPED = TRUE).

KOs

An optional character vector of sequence annotations (e.g. KO) contained in the names of fasta files to be selectively read.

zipped

Logical, whether folder or file is zipped. Default is FALSE.

prepend.filenames

Logical, whether to prepend filename(s) to names in DNAStringSet object. Default is FALSE.

Value

Returns a DNAStringSet object.

Examples

exampledir <- system.file("extdata", package = "coRdon")
files <- list.files(exampledir)
readSet(folder = exampledir)
readSet(folder = exampledir, KOs = "K02931")
pathtofile <- paste(exampledir, files[1], sep = "/")
readSet(file = pathtofile)


[Package coRdon version 1.12.0 Index]