TxDb.Osativa.MSU.RGAP7 is a Bioconductor transcript annotation package
for Oryza sativa (rice) generated from the official Rice Genome
Annotation Project (RGAP) Release 7 GFF3 annotation based on the
IRGSP-1.0 reference genome assembly (also known as MSU7).
The package provides genomic coordinates and transcript models, including genes, transcripts, exons, and coding sequences (CDS). It supports downstream genomic analyses using Bioconductor packages such as GenomicFeatures, GenomicRanges, Signac, and ChIPseeker.
The TxDb SQLite resource is retrieved from AnnotationHub.
Install the package from Bioconductor with:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("TxDb.Osativa.MSU.RGAP7")
library(TxDb.Osativa.MSU.RGAP7)
library(AnnotationHub)
library(GenomicFeatures)
library(GenomicRanges)
The TxDb object is available through AnnotationHub. The package resource
is identified by AH122276:
ah <- AnnotationHub::AnnotationHub()
txdb <- ah[["AH122276"]]
Check the class of the retrieved object:
class(txdb)
## [1] "TxDb"
## attr(,"package")
## [1] "GenomicFeatures"
Display the transcript database:
txdb
## TxDb object:
## # Db type: TxDb
## # Supporting package: GenomicFeatures
## # Data source: Rice Genome Annotation Project (RGAP) Release 7
## # Organism: Oryza sativa
## # Taxonomy ID: 4530
## # Genome: IRGSP-1.0
## # Nb of transcripts: 66250
## # Db created by: txdbmaker package from Bioconductor
## # Creation time: 2026-10-31 11:22:26 +0500 (Sat, 31 Oct 2026)
## # txdbmaker version at creation time: 1.9.0
## # RSQLite version at creation time: 3.53.3
## # DBSCHEMAVERSION: 1.2
A summary can also be obtained with:
summary(txdb)
## Length Class Mode
## 1 TxDb S4
The sequence and chromosome information can be examined with seqinfo():
seqinfo(txdb)
## Seqinfo object with 14 sequences from IRGSP-1.0 genome:
## seqnames seqnames seqlengths isCircular genome
## 1 Chr1 43270923 FALSE IRGSP-1.0
## 2 Chr2 35937250 FALSE IRGSP-1.0
## 3 Chr3 36413819 FALSE IRGSP-1.0
## 4 Chr4 35502694 FALSE IRGSP-1.0
## 5 Chr5 29958434 FALSE IRGSP-1.0
## ... ... ... ... ...
## 10 Chr10 23207287 FALSE IRGSP-1.0
## 11 Chr11 29021106 FALSE IRGSP-1.0
## 12 Chr12 27531856 FALSE IRGSP-1.0
## 13 ChrUn 633585 FALSE IRGSP-1.0
## 14 ChrSy 592136 FALSE IRGSP-1.0
The available sequence levels can be obtained with:
seqlevels(txdb)
## [1] "Chr1" "Chr2" "Chr3" "Chr4" "Chr5" "Chr6" "Chr7" "Chr8" "Chr9"
## [10] "Chr10" "Chr11" "Chr12" "ChrUn" "ChrSy"
The reference FASTA used to construct the database contains 12 nuclear
chromosomes, unanchored sequences (ChrUn), and the Syngenta pseudomolecule
(ChrSy).
During import of the RGAP Release 7 GFF3 file, txdbmaker reports some CDS
features with missing or invalid phase values. It also excludes 88 transcript
models for which one or more CDS features cannot be mapped to a corresponding
exon under the importer’s containment rules. Inspection of these records found
89 unmatched CDS features. The original GFF3 coordinates were retained
without manual modification.
These exclusions reflect limitations in the source annotation relative to the TxDb import requirements; they should not be interpreted as evidence that the corresponding biological transcripts do not exist.
Retrieve all annotated genes:
gene_annotations <- genes(txdb)
gene_annotations
## GRanges object with 55952 ranges and 1 metadata column:
## seqnames ranges strand |
## <Rle> <IRanges> <Rle> |
## ChrSy.fgenesh.gene.1 ChrSy 785-1168 - |
## ChrSy.fgenesh.gene.10 ChrSy 48848-51012 - |
## ChrSy.fgenesh.gene.11 ChrSy 53593-53841 - |
## ChrSy.fgenesh.gene.12 ChrSy 58993-64286 + |
## ChrSy.fgenesh.gene.13 ChrSy 64974-68668 - |
## ... ... ... ... .
## LOC_Os12g44350 Chr12 27491864-27493254 + |
## LOC_Os12g44360 Chr12 27494401-27508851 - |
## LOC_Os12g44370 Chr12 27512303-27513821 + |
## LOC_Os12g44380 Chr12 27513939-27518251 - |
## LOC_Os12g44390 Chr12 27524980-27529682 - |
## gene_id
## <character>
## ChrSy.fgenesh.gene.1 ChrSy.fgenesh.gene.1
## ChrSy.fgenesh.gene.10 ChrSy.fgenesh.gene.10
## ChrSy.fgenesh.gene.11 ChrSy.fgenesh.gene.11
## ChrSy.fgenesh.gene.12 ChrSy.fgenesh.gene.12
## ChrSy.fgenesh.gene.13 ChrSy.fgenesh.gene.13
## ... ...
## LOC_Os12g44350 LOC_Os12g44350
## LOC_Os12g44360 LOC_Os12g44360
## LOC_Os12g44370 LOC_Os12g44370
## LOC_Os12g44380 LOC_Os12g44380
## LOC_Os12g44390 LOC_Os12g44390
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
Retrieve transcript annotations:
transcript_annotations <- transcripts(txdb)
head(transcript_annotations)
## GRanges object with 6 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] Chr1 2903-10817 + | 1 LOC_Os01g01010.1
## [2] Chr1 2984-10562 + | 2 LOC_Os01g01010.2
## [3] Chr1 11218-12435 + | 3 LOC_Os01g01019.1
## [4] Chr1 12648-15915 + | 4 LOC_Os01g01030.1
## [5] Chr1 16292-18304 + | 5 LOC_Os01g01040.4
## [6] Chr1 16292-20323 + | 6 LOC_Os01g01040.1
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
Retrieve exon annotations:
exon_annotations <- exons(txdb)
head(exon_annotations)
## GRanges object with 6 ranges and 1 metadata column:
## seqnames ranges strand | exon_id
## <Rle> <IRanges> <Rle> | <integer>
## [1] Chr1 2903-3268 + | 1
## [2] Chr1 2984-3255 + | 2
## [3] Chr1 3354-3616 + | 3
## [4] Chr1 3354-3616 + | 4
## [5] Chr1 4357-4455 + | 5
## [6] Chr1 4357-4455 + | 6
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
Retrieve coding sequence annotations:
cds_annotations <- cds(txdb)
head(cds_annotations)
## GRanges object with 6 ranges and 1 metadata column:
## seqnames ranges strand | cds_id
## <Rle> <IRanges> <Rle> | <integer>
## [1] Chr1 3449-3616 + | 1
## [2] Chr1 3449-3616 + | 2
## [3] Chr1 4357-4455 + | 3
## [4] Chr1 4357-4455 + | 4
## [5] Chr1 5457-5560 + | 5
## [6] Chr1 5457-5560 + | 6
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
Extract promoter regions 2 kb upstream and 200 bp downstream of transcription start sites:
promoter_annotations <- promoters(
txdb,
upstream = 2000,
downstream = 200
)
## Warning in valid.GenomicRanges.seqinfo(x, suggest.trim = TRUE): GRanges object contains 4 out-of-bound ranges located on sequences Chr5,
## Chr9, and Chr10. Note that ranges located on a sequence whose length is
## unknown (NA) or on a circular sequence are not considered out-of-bound (use
## seqlengths() and isCircular() to get the lengths and circularity flags of the
## underlying sequences). You can use trim() to trim these ranges. See
## ?`trim,GenomicRanges-method` for more information.
head(promoter_annotations)
## GRanges object with 6 ranges and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## LOC_Os01g01010.1 Chr1 903-3102 + | 1 LOC_Os01g01010.1
## LOC_Os01g01010.2 Chr1 984-3183 + | 2 LOC_Os01g01010.2
## LOC_Os01g01019.1 Chr1 9218-11417 + | 3 LOC_Os01g01019.1
## LOC_Os01g01030.1 Chr1 10648-12847 + | 4 LOC_Os01g01030.1
## LOC_Os01g01040.4 Chr1 14292-16491 + | 5 LOC_Os01g01040.4
## LOC_Os01g01040.1 Chr1 14292-16491 + | 6 LOC_Os01g01040.1
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
Transcripts can be grouped by gene using transcriptsBy():
tx_by_gene <- GenomicFeatures::transcriptsBy(
txdb,
by = "gene"
)
tx_by_gene
## GRangesList object of length 55952:
## $ChrSy.fgenesh.gene.1
## GRanges object with 1 range and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] ChrSy 785-1168 - | 66208 ChrSy.fgenesh.mRNA.1
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
##
## $ChrSy.fgenesh.gene.10
## GRanges object with 1 range and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] ChrSy 48848-51012 - | 66211 ChrSy.fgenesh.mRNA.10
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
##
## $ChrSy.fgenesh.gene.11
## GRanges object with 1 range and 2 metadata columns:
## seqnames ranges strand | tx_id tx_name
## <Rle> <IRanges> <Rle> | <integer> <character>
## [1] ChrSy 53593-53841 - | 66212 ChrSy.fgenesh.mRNA.11
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
##
## ...
## <55949 more elements>
Exons can be grouped by transcript using exonsBy():
exons_by_transcript <- GenomicFeatures::exonsBy(
txdb,
by = "tx"
)
exons_by_transcript
## GRangesList object of length 66250:
## $`1`
## GRanges object with 12 ranges and 3 metadata columns:
## seqnames ranges strand | exon_id exon_name exon_rank
## <Rle> <IRanges> <Rle> | <integer> <character> <integer>
## [1] Chr1 2903-3268 + | 1 LOC_Os01g01010.1:exo.. 1
## [2] Chr1 3354-3616 + | 3 LOC_Os01g01010.1:exo.. 2
## [3] Chr1 4357-4455 + | 5 LOC_Os01g01010.1:exo.. 3
## [4] Chr1 5457-5560 + | 7 LOC_Os01g01010.1:exo.. 4
## [5] Chr1 7136-7944 + | 9 LOC_Os01g01010.1:exo.. 5
## ... ... ... ... . ... ... ...
## [8] Chr1 8408-8608 + | 15 LOC_Os01g01010.1:exo.. 8
## [9] Chr1 9210-9617 + | 18 LOC_Os01g01010.1:exo.. 9
## [10] Chr1 10104-10187 + | 19 LOC_Os01g01010.1:exo.. 10
## [11] Chr1 10274-10430 + | 22 LOC_Os01g01010.1:exo.. 11
## [12] Chr1 10504-10817 + | 24 LOC_Os01g01010.1:exo.. 12
## -------
## seqinfo: 14 sequences from IRGSP-1.0 genome
##
## ...
## <66249 more elements>
Gene models in this database are keyed by MSU locus identifiers
(LOC_Os##g#####). Many rice resources instead use RAP-DB identifiers
(Os##g#######). The msu_to_rap() function translates between the two,
preserving input order and dropping identifiers that cannot be converted.
if (requireNamespace("riceidconverter", quietly = TRUE)) {
msu_ids <- c(
"LOC_Os01g01010",
"LOC_Os01g01019",
"LOC_Os01g01040"
)
rap_ids <- msu_to_rap(msu_ids)
print(rap_ids)
}
## [1] "Os01g0100100" "Os01g0100200" "Os01g0100500"
sessionInfo()
## R version 4.6.1 (2026-06-24)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.5 LTS
##
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.24-bioc/R/lib/libRblas.so
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0 LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_GB 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
##
## time zone: America/New_York
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] GenomicFeatures_1.65.0 AnnotationDbi_1.75.2
## [3] Biobase_2.73.2 GenomicRanges_1.65.4
## [5] Seqinfo_1.3.2 IRanges_2.47.5
## [7] S4Vectors_0.51.10 AnnotationHub_4.3.3
## [9] BiocFileCache_3.3.3 dbplyr_2.6.0
## [11] BiocGenerics_0.59.12 generics_0.1.4
## [13] TxDb.Osativa.MSU.RGAP7_0.99.10 BiocStyle_2.41.0
##
## loaded via a namespace (and not attached):
## [1] KEGGREST_1.53.6 httr2_1.3.0 rjson_0.2.23
## [4] xfun_0.62 bslib_0.12.0 vctrs_0.7.3
## [7] tools_4.6.1 bitops_1.1-0 curl_8.1.0
## [10] parallel_4.6.1 tibble_3.3.1 RSQLite_3.53.3
## [13] blob_1.3.0 pkgconfig_2.0.3 BiocBaseUtils_1.15.1
## [16] cigarillo_1.3.1 lifecycle_1.0.5 compiler_4.6.1
## [19] Rsamtools_2.29.0 Biostrings_2.81.9 codetools_0.2-20
## [22] htmltools_0.5.9 sass_0.4.10 RCurl_1.98-1.20
## [25] yaml_2.3.12 pillar_1.11.1 crayon_1.5.3
## [28] jquerylib_0.1.4 BiocParallel_1.47.0 cachem_1.1.0
## [31] riceidconverter_1.1.1 tidyselect_1.2.1 digest_0.6.39
## [34] purrr_1.2.2 BiocVersion_3.24.0 dplyr_1.2.1
## [37] restfulr_0.0.17 bookdown_0.48 fastmap_1.2.0
## [40] cli_3.6.6 magrittr_2.0.5 XML_3.99-0.25
## [43] withr_3.0.3 rappdirs_0.3.4 filelock_1.0.3
## [46] bit64_4.8.6 rmarkdown_2.32 XVector_0.53.0
## [49] httr_1.4.9 bit_4.6.0 otel_0.3.0
## [52] png_0.1-9 memoise_2.0.1 evaluate_1.0.5
## [55] knitr_1.52 BiocIO_1.23.3 rtracklayer_1.73.0
## [58] rlang_1.3.0 glue_1.8.1 DBI_1.3.0
## [61] BiocManager_1.30.27 jsonlite_2.0.0 R6_2.6.1
## [64] GenomicAlignments_1.49.2