Fetch the details of some gene sets from the Gesel database. This can be more efficient than calling fetchAllSets when only a few sets are of interest.

fetchSomeSets(species, sets, config = NULL)

Arguments

species

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

sets

Integer vector of set indices, where each set index refers to a row in the data frame returned by fetchAllSets.

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 fetchAllSets, where each row corresponds to an entry of sets.

Details

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

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

Author

Aaron Lun

Examples

fetchSomeSets("9606", 1:5)
#>         name                               description size collection number
#> 1 GO:0000002          mitochondrial genome maintenance   11          1      1
#> 2 GO:0000003                              reproduction    4          1      2
#> 3 GO:0000009    alpha-1,6-mannosyltransferase activity    2          1      3
#> 4 GO:0000010 trans-hexaprenyltranstransferase activity    2          1      4
#> 5 GO:0000012                single strand break repair   10          1      5