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
#> 1 GO:0000009             alpha-1,6-mannosyltransferase activity    2          1
#> 2 GO:0000012                         single strand break repair   12          1
#> 3 GO:0000014 single-stranded DNA endodeoxyribonuclease activity   10          1
#> 4 GO:0000015                  phosphopyruvate hydratase complex    4          1
#> 5 GO:0000016                                   lactase activity    1          1
#>   number
#> 1      1
#> 2      2
#> 3      3
#> 4      4
#> 5      5