# NOT RUN {
### import from file
gbk_file <- system.file("extdata", "marine_metagenome.gb", package = "biofiles")
x <- gbRecord(gbk_file)
# }
# NOT RUN {
load(system.file("extdata", "marine_metagenome.rda", package = "biofiles"))
getHeader(x)
getFeatures(x)
### quickly extract features as GRanges
ranges(x["CDS"], include = c("product", "note", "protein_id"))
## Directly subset features
x[[1]]
### import directly from NCBI
# }
# NOT RUN {
x <- gbRecord(reutils::efetch("139189709", "protein", rettype = "gp", retmode = "text"))
x
# }
# NOT RUN {
## import a file containing multiple GenBank records as a
## gbRecordList. With many short records it pays of to
## run the parsing in parallel
# }
# NOT RUN {
gss_file <- system.file("extdata", "gss.gb", package = "biofiles")
library(doParallel)
registerDoParallel(cores = 4)
gss <- gbRecord(gss_file)
gss
# }
Run the code above in your browser using DataLab