Learn R Programming

biofiles (version 1.0.0)

write.GenBank: Write GenBank records or features to file in GenBank format

Description

Write GenBank records or features to file in GenBank format

Usage

write.GenBank(x, file, append = FALSE, ...)

# S4 method for gbRecord write.GenBank(x, file, header = TRUE, sequence = TRUE, append = FALSE)

# S4 method for gbFeatureTable write.GenBank(x, file, header = TRUE, sequence = TRUE, append = FALSE)

Arguments

x

A '>gbRecord instance.

file

A connection or a character string naming the file to write to.

append

if TRUE the data is appended to the connection.

...

Additional arguments passed to methods.

header

if FALSE exclude the Genbank header.

sequence

if FALSE exclude the sequence.

Details

For a description of the GenBank format see http://www.ncbi.nlm.nih.gov/collab/FT/

Examples

Run this code
# NOT RUN {
load(system.file("extdata", "marine_metagenome.rda", package = "biofiles"))
write.GenBank(x, file = "data/marine_metagenome.gb")

## write selected features to file.
write.GenBank(x["CDS"], file = "data/marine_metagenome_cds.gb", header = FALSE, sequence = FALSE)
# }

Run the code above in your browser using DataLab