mitoGbk2DT | R Documentation |
This function reads in a GENBANK file and outputs an R data.table object. It has been written for the import of mitogenome data into R, but could be used for importing other GENBANK files but is not rigorously tested.
mitoGbk2DT(
genbankFile,
type_vec = c("gene", "CDS", "tRNA", "rRNA", "D-loop", "misc_feature")
)
genbankFile |
Character: the path to the GENBANK file. |
type_vec |
Character: a vector of features to extract. The default value
has been set to extract the major elements of mitochondrial genomes, but
it could be edited to extract other features. Default is
|
Returns a data.table with the following columns:
$NAME
= The name of the genetic feature.
$TYPE
= The type of genetic feature.
$STRAND
= Is given a 1 for the reported strand, and a -1
if it is on the complementary strand.
$START
= The starting base position.
$END
= The end base position.
library(genomalicious)
# Create a link to raw external datasets in genomalicious
genomaliciousExtData <- paste0(find.package('genomalicious'), '/extdata')
# Read in a GENBANK file
gbk.read <- mitoGbk2DT(paste(genomaliciousExtData, 'data_Bcocosensis_mitogenome.gbk', sep='/'))
gbk.read
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.