Returns every table in the release as a lazy dplyr table, nested
by schema, so that db$sradb$<TAB> completes table names. Each
table is built the first time it is accessed, and no data are read
until a query is run (for example with
dplyr::collect()).
Arguments
- con
A connection from
omicidx_connect(), or a version string to open a new one. Defaults toversion.- version
character(1). Release to connect to when
conisNULL; seeomicidx_connect().
Value
An omicidx_db object: a named list with one element per
schema, each an environment of lazy tables. The connection is
available as attr(db, "con"), and its release, with row counts,
as omicidx_release(db). All omicidxr helpers accept an
omicidx_db in place of a connection.
Examples
db <- omicidx_db()
db
#> <omicidx_db> OmicIDX release latest (published 2026-12-02)
#>
#> geometadb
#> geo_supplemental_files 7,170,968
#> gpl 29,324
#> gse 302,487
#> gse_gpl 345,274
#> gse_gsm 10,683,166
#> gsm 8,878,923
#>
#> main
#> bioprojects 1,146,181
#> biosamples 61,891,234
#> biosamples__attribute_recs 900,240,874
#> ebi_biosamples 55,268,604
#> geo_platforms 29,324
#> geo_samples 8,878,923
#> geo_series 302,487
#> geo_series_with_rnaseq_counts 27,714
#> metahq_annotations 1,153,814
#> metahq_entities 594,540
#> metahq_external_links 22,008
#> metahq_ontology_ancestors 1,007,794
#> metahq_ontology_synonyms 124,992
#> metahq_ontology_terms 39,104
#> metahq_refinebio_map 276,049
#> sra_accessions 165,778,347
#> sra_experiments 43,319,461
#> sra_experiments__attributes 21,489,867
#> sra_runs 46,373,078
#> sra_runs__attributes 44,422,078
#> sra_samples 45,339,542
#> sra_samples__attributes 678,740,067
#> sra_studies 786,567
#> sra_studies__attributes 318,558
#>
#> metahq
#> annotation 1,153,814
#>
#> sradb
#> experiment 43,319,461
#> human_runs 8,648,953
#> mouse_runs 4,468,444
#> rnaseq_runs 9,216,772
#> run 46,518,462
#> run_with_study 46,518,462
#> sample 45,339,542
#> sra 46,518,462
#> study 786,567
#> wgs_runs 9,787,361
#>
#> Tables: db$<schema>$<table>. Connection: attr(db, "con").
db$sradb$study |>
dplyr::count(study_type, sort = TRUE) |>
head() |>
dplyr::collect()
#> # A tibble: 6 × 2
#> study_type n
#> <chr> <dbl>
#> 1 Other 453071
#> 2 Transcriptome Analysis 131673
#> 3 Whole Genome Sequencing 127214
#> 4 Metagenomics 72220
#> 5 Population Genomics 836
#> 6 Epigenetics 697
DBI::dbDisconnect(attr(db, "con"))