Once PlantTxDbHub is accepted into Bioconductor, install it with:
PlantTxDbHub provides ready‑to‑use TxDb (transcript
database) annotations for plant genomes. The databases are stored as
SQLite files and can be downloaded on demand using
downloadPlantTxDbs(). The available species and their
download URLs are maintained in a curated CSV file
(inst/extdata/metadata.csv). This design allows the
community to add new species without modifying any R code.
Use listPlantTxDbSpecies() to see the available species
and their associated metadata (species name, genome build, source
version, data provider, filename, and description):
listPlantTxDbSpecies()
#> SpeciesID Species Genome SourceVersion
#> 1 Arabidopsis_TAIR10 Arabidopsis thaliana TAIR10 62
#> 2 Glycine_Gmax_v2.1 Glycine max Gmax_v2.1 62
#> 3 Oryza_IRGSP_1 Oryza sativa IRGSP-1.0 62
#> 4 Glycine_Wm82.a4.v1 Glycine max Wm82.a4.v1 14
#> DataProvider Filename
#> 1 Ensembl Plants TxDb.Athaliana.TAIR10.v62.sqlite
#> 2 Ensembl Plants TxDb.Gmax.Wm82.a2.sqlite
#> 3 Ensembl Plants TxDb.Osativa.IRGSP.v62.sqlite
#> 4 Phytozome TxDb.Gmax.Wm82.a4.sqlite
#> Description
#> 1 Ensembl Plants TAIR10 release 62 GTF-derived TxDb
#> 2 Ensembl Plants Wm82 v2.1 release 62 GTF-derived TxDb
#> 3 Ensembl Plants IRGSP-1.0 release 62 GTF-derived TxDb
#> 4 Phytozome v14 GFF3- derived TxDbdownloadPlantTxDbs() reads the metadata CSV and
downloads each SQLite file from its unique URL, caching it via
BiocFileCache. By default it fetches all
available databases; you can also request a subset by
SpeciesID.
Download all databases:
Download only specific species (as done in the setup chunk above):
# Only Arabidopsis
downloadPlantTxDbs(species = "Arabidopsis_TAIR10")
# Arabidopsis and rice together
downloadPlantTxDbs(species = c("Arabidopsis_TAIR10", "Oryza_IRGSP_1"))Files are cached in a persistent user data directory via
BiocFileCache, so subsequent calls are fast and corrupted
files are re-downloaded automatically.
Once downloaded, obtain the full path to a cached file with
getTxDbPath(), then load it with
GenomicFeatures::loadDb().
The remaining sections of this vignette require a successful download; they are skipped if the network was unavailable during vignette build.
ath_file <- getTxDbPath("Arabidopsis_TAIR10")
txdb_ath <- loadDb(ath_file)
txdb_ath
#> TxDb object:
#> # Db type: TxDb
#> # Supporting package: GenomicFeatures
#> # Data source: Ensembl Plants release 62 GTF
#> # Organism: Arabidopsis thaliana
#> # Taxonomy ID: 3702
#> # Source: Ensembl Plants
#> # Ensembl release: 62
#> # GTF file: Arabidopsis_thaliana.TAIR10.62.gtf.gz
#> # Genome assembly: TAIR10
#> # Creation date: 2026-06-09
#> # Created by:
#> # Contact: Kabilan S <[email protected]>
#> # Genome: NA
#> # Nb of transcripts: 54013
#> # Db created by: txdbmaker package from Bioconductor
#> # Creation time: 2026-06-09 12:36:03 +0500 (Tue, 09 Jun 2026)
#> # txdbmaker version at creation time: 1.6.2
#> # RSQLite version at creation time: 3.52.0
#> # DBSCHEMAVERSION: 1.2TxDb objects support the select() interface.
columns(txdb_ath)
#> [1] "CDSCHROM" "CDSEND" "CDSID" "CDSNAME" "CDSPHASE"
#> [6] "CDSSTART" "CDSSTRAND" "EXONCHROM" "EXONEND" "EXONID"
#> [11] "EXONNAME" "EXONRANK" "EXONSTART" "EXONSTRAND" "GENEID"
#> [16] "TXCHROM" "TXEND" "TXID" "TXNAME" "TXSTART"
#> [21] "TXSTRAND" "TXTYPE"
keytypes(txdb_ath)
#> [1] "CDSID" "CDSNAME" "EXONID" "EXONNAME" "GENEID" "TXID" "TXNAME"The column TXTYPE indicates the
transcript biotype (e.g. protein_coding).
genes() returns a GRanges with gene‑level
information.
gene_gr <- genes(txdb_ath)
head(gene_gr)
#> GRanges object with 6 ranges and 1 metadata column:
#> seqnames ranges strand | gene_id
#> <Rle> <IRanges> <Rle> | <character>
#> AT1G01010 1 3631-5899 + | AT1G01010
#> AT1G01020 1 6788-9130 - | AT1G01020
#> AT1G01030 1 11649-13714 - | AT1G01030
#> AT1G01040 1 23121-31227 + | AT1G01040
#> AT1G01046 1 28500-28706 + | AT1G01046
#> AT1G01050 1 31170-33171 - | AT1G01050
#> -------
#> seqinfo: 7 sequences (2 circular) from an unspecified genometx_gr <- transcripts(txdb_ath)
head(tx_gr)
#> GRanges object with 6 ranges and 2 metadata columns:
#> seqnames ranges strand | tx_id tx_name
#> <Rle> <IRanges> <Rle> | <integer> <character>
#> [1] 1 3631-5899 + | 1 AT1G01010.1
#> [2] 1 11101-11372 + | 2 AT1G03987.1
#> [3] 1 23121-31227 + | 3 AT1G01040.1
#> [4] 1 23416-31120 + | 4 AT1G01040.2
#> [5] 1 28500-28706 + | 5 at1g01046
#> [6] 1 32727-33009 + | 6 AT1G03997.1
#> -------
#> seqinfo: 7 sequences (2 circular) from an unspecified genomeex_gr <- exons(txdb_ath, columns = "exon_id")
head(ex_gr)
#> GRanges object with 6 ranges and 1 metadata column:
#> seqnames ranges strand | exon_id
#> <Rle> <IRanges> <Rle> | <integer>
#> [1] 1 3631-3913 + | 1
#> [2] 1 3996-4276 + | 2
#> [3] 1 4486-4605 + | 3
#> [4] 1 4706-5095 + | 4
#> [5] 1 5174-5326 + | 5
#> [6] 1 5439-5899 + | 6
#> -------
#> seqinfo: 7 sequences (2 circular) from an unspecified genomemy_genes <- c("AT1G01010", "AT1G01020")
genes(txdb_ath, filter = list(gene_id = my_genes))
#> GRanges object with 2 ranges and 1 metadata column:
#> seqnames ranges strand | gene_id
#> <Rle> <IRanges> <Rle> | <character>
#> AT1G01010 1 3631-5899 + | AT1G01010
#> AT1G01020 1 6788-9130 - | AT1G01020
#> -------
#> seqinfo: 7 sequences (2 circular) from an unspecified genomeTwo soybean genome builds are available:
Glycine_Gmax_v2.1 (Ensembl Plants) and
Glycine_Wm82.a4.v1 (Phytozome). This example uses the
Ensembl Plants build.
gmx_file <- getTxDbPath("Glycine_Gmax_v2.1")
txdb_gmx <- loadDb(gmx_file)
head(genes(txdb_gmx))
#> GRanges object with 6 ranges and 1 metadata column:
#> seqnames ranges strand | gene_id
#> <Rle> <IRanges> <Rle> | <character>
#> ENSRNA049760019 11 2675651-2675723 + | ENSRNA049760019
#> ENSRNA049760020 11 2794530-2794602 + | ENSRNA049760020
#> ENSRNA049760021 11 5126230-5126303 + | ENSRNA049760021
#> ENSRNA049760022 11 8090262-8090334 + | ENSRNA049760022
#> ENSRNA049760023 11 8422999-8423082 + | ENSRNA049760023
#> ENSRNA049760024 11 9000534-9000605 + | ENSRNA049760024
#> -------
#> seqinfo: 22 sequences (2 circular) from an unspecified genomeosa_file <- getTxDbPath("Oryza_IRGSP_1")
txdb_osa <- loadDb(osa_file)
head(genes(txdb_osa))
#> GRanges object with 6 ranges and 1 metadata column:
#> seqnames ranges strand | gene_id
#> <Rle> <IRanges> <Rle> | <character>
#> ENSRNA049440515 1 33589412-33589483 - | ENSRNA049440515
#> ENSRNA049440716 1 35264198-35264278 - | ENSRNA049440716
#> ENSRNA049441102 1 37693591-37693662 - | ENSRNA049441102
#> ENSRNA049441259 1 40086054-40086126 - | ENSRNA049441259
#> ENSRNA049441339 1 40793762-40793842 - | ENSRNA049441339
#> ENSRNA049441421 1 42318166-42318238 - | ENSRNA049441421
#> -------
#> seqinfo: 14 sequences (2 circular) from an unspecified genomeWe welcome the addition of TxDb databases for other plant species. To contribute:
inst/extdata/metadata.csv.SpeciesID – a unique identifier
(e.g. Zea_mays_B73).Title – the exact filename of the SQLite file.Location_Prefix and RDataPath – the two
parts of the download URL (they will be concatenated to form the full
link).Description,
Genome, Species, DataProvider,
etc.). Follow the existing rows for guidance.No R code changes are required – the package reads all necessary
information directly from metadata.csv.
TxDb resources in this package are derived from Ensembl Plants and
Phytozome annotation data; see ?PlantTxDbHub for full
licensing details and getTxDbProvenance() to query
provenance per species.
sessionInfo()
#> R version 4.6.1 (2026-06-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 26.04.1 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
#> [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
#>
#> time zone: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats4 stats graphics grDevices utils datasets methods
#> [8] base
#>
#> other attached packages:
#> [1] GenomeInfoDb_1.49.1 GenomicFeatures_1.65.0 AnnotationDbi_1.75.2
#> [4] Biobase_2.73.2 GenomicRanges_1.65.4 Seqinfo_1.3.2
#> [7] IRanges_2.47.5 S4Vectors_0.51.10 BiocGenerics_0.59.12
#> [10] generics_0.1.4 PlantTxDbHub_0.99.6 BiocStyle_2.41.0
#>
#> loaded via a namespace (and not attached):
#> [1] KEGGREST_1.53.6 rjson_0.2.23 xfun_0.61
#> [4] bslib_0.12.0 httr2_1.3.0 lattice_0.23-1
#> [7] vctrs_0.7.3 tools_4.6.1 bitops_1.1-0
#> [10] parallel_4.6.1 curl_8.0.0 tibble_3.3.1
#> [13] RSQLite_3.53.3 blob_1.3.0 pkgconfig_2.0.3
#> [16] BiocBaseUtils_1.15.1 Matrix_1.7-6 dbplyr_2.6.0
#> [19] cigarillo_1.3.1 lifecycle_1.0.5 compiler_4.6.1
#> [22] Rsamtools_2.29.0 Biostrings_2.81.9 codetools_0.2-20
#> [25] htmltools_0.5.9 sys_3.4.3 buildtools_1.0.0
#> [28] sass_0.4.10 RCurl_1.98-1.20 yaml_2.3.12
#> [31] pillar_1.11.1 crayon_1.5.3 jquerylib_0.1.4
#> [34] BiocParallel_1.47.0 cachem_1.1.0 tidyselect_1.2.1
#> [37] digest_0.6.39 purrr_1.2.2 dplyr_1.2.1
#> [40] restfulr_0.0.17 maketools_1.3.2 grid_4.6.1
#> [43] fastmap_1.2.0 cli_3.6.6 magrittr_2.0.5
#> [46] XML_3.99-0.24 withr_3.0.3 UCSC.utils_1.9.0
#> [49] filelock_1.0.3 bit64_4.8.6 rmarkdown_2.32
#> [52] XVector_0.53.0 httr_1.4.9 bit_4.6.0
#> [55] otel_0.2.0 png_0.1-9 memoise_2.0.1
#> [58] evaluate_1.0.5 knitr_1.52 BiocIO_1.23.3
#> [61] BiocFileCache_3.3.0 rtracklayer_1.73.0 rlang_1.3.0
#> [64] glue_1.8.1 DBI_1.3.0 BiocManager_1.30.27
#> [67] jsonlite_2.0.0 R6_2.6.1 GenomicAlignments_1.49.2