parseGenBank: Parse raw genbank file content

Description Usage Arguments Value Note Examples

View source: R/genbankReader.R

Description

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

Usage

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

Note

This is a low level function not intended for common end-user use. In nearly all cases, end-users (and most developers) should call readGenBank or create a GenBankFile object and call import instead.

Examples

1
prsd = parseGenBank(system.file("sample.gbk", package="genbankr"))

genbankr documentation built on Nov. 8, 2020, 7:44 p.m.