Fetch the identities of the sets that contain each gene in the Gesel database.
fetchSetsForAllGenes(species, config = NULL)String containing the NCBI taxonomy ID of the species of interest.
Configuration list, typically created by newConfig.
If NULL, the default configuration is used.
List of integer vectors.
Each vector corresponds to a gene, corresponding to a row of the data frame returned by fetchAllGenes.
Each vector contains the identities of the sets that contain that gene,
where each integer is a set index that refers to a row of the data frame returned by fetchAllSets.
If this function is called once, the returned list will be cached in memory and re-used in subsequent calls to this function.
The cached data will also be used to speed up calls to fetchSetsForSomeGenes.
all.genes <- fetchSetsForAllGenes("9606")
length(all.genes)
#> [1] 236560
# Sets containing the first gene:
head(fetchAllSets("9606")[all.genes[[1]],])
#> name description size collection
#> 1055 GO:0002764 immune response-regulating signaling pathway 38 1
#> 2335 GO:0005576 extracellular region 2553 1
#> 2364 GO:0005615 extracellular space 1774 1
#> 2509 GO:0005886 plasma membrane 5698 1
#> 6548 GO:0031093 platelet alpha granule lumen 67 1
#> 8048 GO:0034774 secretory granule lumen 121 1
#> number
#> 1055 1055
#> 2335 2335
#> 2364 2364
#> 2509 2509
#> 6548 6548
#> 8048 8048
# Details about the first gene:
fetchAllGenes("9606")$symbol[1]
#> [[1]]
#> [1] "A1BG"
#>