Learn R Programming

genbankr (version 1.0.3)

parseGenBank: Parse raw genbank file content

Description

Parse genbank content and return a low-level list object containing each component of the file.

Usage

parseGenBank(file, text = readLines(file), partial = NA, verbose = FALSE,
  ret.anno = TRUE, ret.seq = TRUE)

Arguments

file
character. The file to be parsed. Ignored if text is specified
text
character. The text to be parsed.
partial
logical. If TRUE, features with non-exact boundaries will be included. Otherwise, non-exact features are excluded, with a warning if partial is NA (the default).
verbose
logical. Should informative messages be printed to the console as the file is being processed.
ret.anno
logical. Should the annotations in the GenBank file be parsed and included in the returned object. (Defaults to TRUE)
ret.seq
logical. Should the origin sequence (if present) in the GenBank file be included in the returned object. (Defaults to TRUE)

Value

  • if ret.anno is TRUE, a list containing the parsed contents of the file, suitable for passing to make_gbrecord. If ret.anno is FALSE, a DNAStringSet object containing the origin sequence.

Examples

Run this code
prsd = parseGenBank(system.file("sample.gbk", package="genbankr"))

Run the code above in your browser using DataLab