View source: R/bed2featuretab.R
bed2featuretab | R Documentation |
The GenBank feature table is a 5 column table that is used to submit annotations to GenBank (www.ncbi.nlm.nih.gov/WebSub/html/help/feature-table.html). This function takes a BED file of annotations and converts it into the feature table format for GenBank submission.
bed2featuretab(bedFiles, featureRef, outFile)
bedFiles |
Character: A vector of BED file names to process. |
featureRef |
Data.table: This contains the list of features that are to be mapped against the annotations in BED format. Requires 3 columns:
|
outFile |
Character: The output file name for the feature table. |
At this stage, the function's use is largely limited to simple annotations of complete seqeunces and is restricted to genes, mRNA, tRNA, rRNA, and misc_features. Coding of partial sequences and more complex annotations may be added in the future.
Writes the feature table to file.
library(genomalicious)
# Create a link to raw external datasets in genomalicious
genomaliciousExtData <- paste0(find.package('genomalicious'), '/extdata')
# We will create a feature table of gene and coding sequences for the protein-coding
# genes from the Bathygobius cocosensis mitogenome.
bcocoFtRefs <- fread(paste0(genomaliciousExtData, '/data_Bcocosensis_mito_features.csv'))
bcocoBedPath <- paste0(genomaliciousExtData, '/data_Bcocosensis_mito_annots.bed')
# Take a look
bcocoFtRefs
bcocoBedPath
readLines(bcocoBedPath)
# Run
bed2featuretab(bcocoBedPath, bcocoFtRefs, 'Bcoco_feature_table.txt')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.