readSet: Read set of sequences.

Description Usage Arguments Value Examples

Description

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

Usage

1
2
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

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

BioinfoHR/coRdon documentation built on May 6, 2019, 8:35 p.m.