Fetch the details of some gene set collections from the Gesel database. This can be more efficient than fetchAllCollections when only a few collections are of interest.

fetchSomeCollections(species, collections, config = NULL)

Arguments

species

String containing the NCBI taxonomy ID of the species of interest.

collections

Integer vector containing collection indices. Each entry refers to a row of the data frame returned by fetchAllCollections).

config

Configuration list, typically created by newConfig. If NULL, the default configuration is used.

Value

Data frame with the same columns as the return value of fetchAllCollections, where each row corresponds to an entry of collections.

Details

Every time this function is called, information from the requested collections will be added to an in-memory cache. Subsequent calls to this function will re-use as many of the cached collections as possible before making new requests to the Gesel database.

If fetchAllCollections was previously called, its cached data will be used by fetchSomeCollections to avoid extra requests to the database. If collections is large, it may be more efficient to call fetchAllCollections to prepare the cache before calling this function.

Author

Aaron Lun

Examples

fetchSomeCollections("9606", 1:5)
#>                                                                   title
#> 1                                                         Gene ontology
#> 2                                       MSigDB C1: positional gene sets
#> 3 MSigDB C2: curated gene sets, CGP: chemical and genetic perturbations
#> 4      MSigDB C2: curated gene sets, CP: Canonical pathways, PID subset
#> 5 MSigDB C2: curated gene sets, CP: Canonical pathways, Reactome subset
#>                                                                                                                                                                                                                                       description
#> 1                                                                                                                           Gene sets defined from the Gene Ontology (version 2026-01-23), sourced from AH121953 in Bioconductor's AnnotationHub.
#> 2                                                                                                                                                           Gene sets corresponding to human chromosome cytogenetic bands. Part of MSigDB 2026.1.
#> 3 Gene sets represent expression signatures of genetic and chemical perturbations. A number of these gene sets come in pairs: xxx_UP (and xxx_DN) gene set representing genes induced (and repressed) by the perturbation. Part of MSigDB 2026.1.
#> 4                                                                                                                                                      Canonical Pathways gene sets derived from the PID pathway database. Part of MSigDB 2026.1.
#> 5                                                                                                                                                 Canonical Pathways gene sets derived from the Reactome pathway database. Part of MSigDB 2026.1.
#>   maintainer
#> 1  Aaron Lun
#> 2  Aaron Lun
#> 3  Aaron Lun
#> 4  Aaron Lun
#> 5  Aaron Lun
#>                                                                     source
#> 1         https://github.com/gesel-inc/feedstock/blob/go-v1.1.0/go/build.R
#> 2 https://github.com/gesel-inc/feedstock/blob/msigdb-v1.1.0/msigdb/build.R
#> 3 https://github.com/gesel-inc/feedstock/blob/msigdb-v1.1.0/msigdb/build.R
#> 4 https://github.com/gesel-inc/feedstock/blob/msigdb-v1.1.0/msigdb/build.R
#> 5 https://github.com/gesel-inc/feedstock/blob/msigdb-v1.1.0/msigdb/build.R
#>   start  size
#> 1     1 18864
#> 2 18865   302
#> 3 19167  3555
#> 4 22722   196
#> 5 22918  1839