Package 'PlantTxDbHub'

Title: Transcript Database Hub for Plant Genomes
Description: Provides TxDb (transcript database) annotations for plant species. The SQLite files are hosted on Zenodo (or other permanent URLs) and are downloaded on demand via the `downloadPlantTxDbs()` function. The list of available species and their download URLs is maintained in a curated CSV file (inst/extdata/metadata.csv), allowing users and contributors to easily add new databases without modifying R code.
Authors: Dwijesh Chandra Mishra [aut] (ORCID: <https://orcid.org/0000-0002-3327-6156>), Kabilan S [aut, cre] (ORCID: <https://orcid.org/0009-0002-9422-0938>), ICAR-IARI [fnd]
Maintainer: Kabilan S <[email protected]>
License: Artistic-2.0
Version: 0.99.6
Built: 2026-09-27 10:58:09 UTC
Source: https://github.com/BiocStaging/PlantTxDbHub

Help Index


PlantTxDbHub: TxDb databases for plants

Description

Provides TxDb (transcript database) annotations for plant species. The SQLite files are hosted on Zenodo (or other permanent URLs) and are downloaded on demand via the 'downloadPlantTxDbs()' function. The list of available species and their download URLs is maintained in a curated CSV file (inst/extdata/metadata.csv), allowing users and contributors to easily add new databases without modifying R code.

Data sources and licensing

The TxDb SQLite files distributed by this package are built from publicly available genome annotation files, as recorded in inst/extdata/metadata.csv (see the DataProvider and SourceUrl columns):

The underlying SQLite files are re-hosted on Zenodo for stable download (see Location_Prefix/RDataPath in inst/extdata/metadata.csv). Users should consult and comply with the original data providers' license terms before redistributing derived data. The R package code itself is released under the Artistic-2.0 license.

Author(s)

Kabilan S

See Also

Useful links:


Download plant TxDb SQLite files from Zenodo (or other sources)

Description

Downloads plant transcript annotation databases based on the internal metadata file 'inst/extdata/metadata.csv'. Each file can reside on a different server; the download URL is constructed from the 'Location_Prefix' and 'RDataPath' columns.

Usage

downloadPlantTxDbs(
  dest_dir = tools::R_user_dir("PlantTxDbHub", "data"),
  timeout = 1800,
  download = TRUE,
  species = NULL
)

Arguments

dest_dir

A character string specifying the BiocFileCache directory. Defaults to a package-specific user data directory (see [tools::R_user_dir()]).

timeout

Numeric. Maximum download time in seconds per file. Default 1800 (30 minutes).

download

Logical. If 'TRUE' (default), files are actually downloaded. If 'FALSE', the function only prepares the cache directory and returns its path without attempting any download.

species

Character vector. Which species to download. Choose from the 'SpeciesID' values returned by [listPlantTxDbSpecies()], e.g. '"Arabidopsis_TAIR10"'. Default is 'NULL', downloading all available databases.

Details

The downloaded SQLite files are derived from publicly available genome annotations. See PlantTxDbHub-package for data-provider licensing and provenance details, and getTxDbProvenance to query provenance per species.

Value

Invisibly returns the BiocFileCache directory path.

Examples

# Show the cache path without downloading
downloadPlantTxDbs(download = FALSE)


# Download only the Arabidopsis database
downloadPlantTxDbs(species = "Arabidopsis_TAIR10")

# Download all available databases
downloadPlantTxDbs()

Get the local path to a cached TxDb SQLite file

Description

Returns the full file path to a previously downloaded TxDb database. If the file does not exist in the cache, the function stops with an error.

Usage

getTxDbPath(species, dest_dir = tools::R_user_dir("PlantTxDbHub", "data"))

Arguments

species

Character string. A species identifier as returned by [listPlantTxDbSpecies()] (e.g., '"Arabidopsis_TAIR10"').

dest_dir

Character string. The BiocFileCache directory. Defaults to the same cache used by [downloadPlantTxDbs()].

Value

Character string giving the complete file path.

Examples

# Download only the Arabidopsis database
downloadPlantTxDbs(species = "Arabidopsis_TAIR10")
getTxDbPath("Arabidopsis_TAIR10")

Show data provider and source information for a species

Description

Show data provider and source information for a species

Usage

getTxDbProvenance(species)

Arguments

species

Character. A SpeciesID from [listPlantTxDbSpecies()].

Value

A one-row 'data.frame' with columns 'SpeciesID', 'DataProvider', 'SourceUrl', 'SourceVersion'.

Examples

getTxDbProvenance("Arabidopsis_TAIR10")

List available plant TxDb species

Description

Reads the internal metadata table ('inst/extdata/metadata.csv') and returns a data.frame of available species and their annotation metadata.

Usage

listPlantTxDbSpecies()

Value

A 'data.frame' with columns 'SpeciesID', 'Species', 'Genome', 'SourceVersion', 'DataProvider', 'Filename', and 'Description'.

Examples

listPlantTxDbSpecies()