tRNAdbImport 1.4.0
The tRNAdb and mttRNAdb (Jühling et al. 2009) is a compilation of tRNA sequences and tRNA genes. It is a follow up version of the database of Sprinzl et al. (Sprinzl and Vassilenko 2005).
Using tRNAdbImport the tRNAdb can be accessed as outlined on the website
http://trna.bioinf.uni-leipzig.de/ and the results
are returned as a GRanges object.
library(tRNAdbImport)
# accessing tRNAdb
# tRNA from yeast for Alanine and Phenylalanine
gr <- import.tRNAdb(organism = "Saccharomyces cerevisiae",
aminoacids = c("Phe","Ala"))
# get a Phenylalanine tRNA from yeast
gr <- import.tRNAdb.id(tdbID = gr[gr$tRNA_type == "Phe",][1]$tRNAdb_ID)
# find the same tRNA via blast
gr <- import.tRNAdb.blast(blastSeq = gr$tRNA_seq)
# accessing mtRNAdb
# get the mitochrondrial tRNA for Alanine in Bos taurus
gr <- import.mttRNAdb(organism = "Bos taurus",
aminoacids = "Ala")
# get one mitochrondrial tRNA in Bos taurus.
gr <- import.mttRNAdb.id(mtdbID = gr[1]$tRNAdb_ID)
# check that the result has the appropriate columns
istRNAdbGRanges(gr)
## [1] TRUE
The tRNAdb offers two different sets of data, one containing DNA sequences and
one containing RNA sequences. Depending on the database selected, DNA as
default, the GRanges will contain a DNAStringSet or a ModRNAStringSet as
the tRNA_seq column. Because the RNA sequences can contain modified
nucleotides, the ModRNAStringSet class is used instead of the RNAStringSet
class to store the sequences correctly with all information intact.
gr <- import.tRNAdb(organism = "Saccharomyces cerevisiae",
aminoacids = c("Phe","Ala"),
database = "RNA")
gr$tRNA_seq
## A ModRNAStringSet instance of length 3
## width seq
## [1] 76 GGGCGUGUKGCGUAGDCGGDAGCGCRCUCCCU...GGDCUCCGGTPCGAUUCCGGACUCGUCCACCA
## [2] 76 GCGGAUUUALCUCAGDDGGGAGAGCRCCAGAB...G7UC°UGUGTPCG"UCCACAGAAUUCGCACCA
## [3] 76 GCGGACUUALCUCAGDDGGGAGAGCRCCAGAB...G7UC°UGUGTPCG"UCCACAGAGUUCGCACCA
The special characters in the sequence might no exactly match the ones shown on
the website, since they are sanitized internally to a unified dictionary defined
in the Modstrings package. However, the type of modification encoded will
remain the same (See the Modstrings package for more details).
The information on the position and type of the modifications can also be
converted into a tabular format using the separate function from the
Modstrings package.
separate(gr$tRNA_seq)
## GRanges object with 38 ranges and 1 metadata column:
## seqnames ranges strand | mod
## <Rle> <IRanges> <Rle> | <character>
## [1] 2 10 + | m2G
## [2] 2 16 + | D
## [3] 2 17 + | D
## [4] 2 26 + | m2,2G
## [5] 2 32 + | Cm
## ... ... ... ... . ...
## [34] 1 37 + | m1I
## [35] 1 38 + | Y
## [36] 1 47 + | D
## [37] 1 54 + | m5U
## [38] 1 55 + | Y
## -------
## seqinfo: 3 sequences from an unspecified genome; no seqlengths
The output can be saved or directly used for further analysis.
library(Biostrings)
library(rtracklayer)
writeXStringSet(gr$tRNA_seq, filepath = tempfile())
gff <- tRNAdb2GFF(gr)
export.gff3(gff, con = tempfile())
Please have a look at the tRNA package for further analysis of the tRNA
sequences.
sessionInfo()
## R version 3.6.1 (2019-07-05)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.3 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.10-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.10-bioc/R/lib/libRlapack.so
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=C
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] parallel stats4 stats graphics grDevices utils datasets
## [8] methods base
##
## other attached packages:
## [1] rtracklayer_1.46.0 tRNAdbImport_1.4.0 tRNA_1.4.0
## [4] Structstrings_1.2.0 Modstrings_1.2.0 Biostrings_2.54.0
## [7] XVector_0.26.0 GenomicRanges_1.38.0 GenomeInfoDb_1.22.0
## [10] IRanges_2.20.0 S4Vectors_0.24.0 BiocGenerics_0.32.0
## [13] BiocStyle_2.14.0
##
## loaded via a namespace (and not attached):
## [1] Rcpp_1.0.2 lattice_0.20-38
## [3] Rsamtools_2.2.0 assertive.properties_0.0-4
## [5] assertive.types_0.0-3 assertive.data.us_0.0-2
## [7] assertthat_0.2.1 digest_0.6.22
## [9] R6_2.4.0 evaluate_0.14
## [11] assertive.code_0.0-3 httr_1.4.1
## [13] ggplot2_3.2.1 pillar_1.4.2
## [15] assertive.strings_0.0-3 zlibbioc_1.32.0
## [17] rlang_0.4.1 lazyeval_0.2.2
## [19] curl_4.2 Matrix_1.2-17
## [21] assertive_0.3-5 assertive.data_0.0-3
## [23] rmarkdown_1.16 BiocParallel_1.20.0
## [25] stringr_1.4.0 RCurl_1.95-4.12
## [27] munsell_0.5.0 DelayedArray_0.12.0
## [29] compiler_3.6.1 xfun_0.10
## [31] pkgconfig_2.0.3 htmltools_0.4.0
## [33] SummarizedExperiment_1.16.0 tidyselect_0.2.5
## [35] tibble_2.1.3 GenomeInfoDbData_1.2.2
## [37] bookdown_0.14 matrixStats_0.55.0
## [39] assertive.sets_0.0-3 codetools_0.2-16
## [41] XML_3.98-1.20 crayon_1.3.4
## [43] dplyr_0.8.3 GenomicAlignments_1.22.0
## [45] bitops_1.0-6 grid_3.6.1
## [47] assertive.base_0.0-7 gtable_0.3.0
## [49] magrittr_1.5 assertive.models_0.0-2
## [51] scales_1.0.0 stringi_1.4.3
## [53] assertive.matrices_0.0-2 xml2_1.2.2
## [55] assertive.reflection_0.0-4 assertive.datetimes_0.0-2
## [57] tools_3.6.1 Biobase_2.46.0
## [59] glue_1.3.1 purrr_0.3.3
## [61] assertive.numbers_0.0-2 yaml_2.2.0
## [63] colorspace_1.4-1 BiocManager_1.30.9
## [65] assertive.files_0.0-2 assertive.data.uk_0.0-2
## [67] knitr_1.25
Jühling, Frank, Mario Mörl, Roland K. Hartmann, Mathias Sprinzl, Peter F. Stadler, and Joern Pütz. 2009. “TRNAdb 2009: Compilation of tRNA Sequences and tRNA Genes.” Nucleic Acids Research 37:D159–D162. https://doi.org/10.1093/nar/gkn772.
Sprinzl, Mathias, and Konstantin S. Vassilenko. 2005. “Compilation of tRNA Sequences and Sequences of tRNA Genes.” Nucleic Acids Research 33:D139–D140. https://doi.org/10.1093/nar/gki012.