fetchSetsForSomeGenes.Rd
Fetch all sets that contain some genes in the Gesel database.
This can be more efficient than fetchSetsForAllGenes
if only a few genes are of interest.
fetchSetsForSomeGenes(species, genes, config = NULL)
String containing the NCBI taxonomy ID of the species of interest.
Integer vector containing gene indices.
Each gene index refers to a row of the data frame returned by fetchAllGenes
).
Configuration list, typically created by newConfig
.
If NULL
, the default configuration is used.
List of integer vectors.
Each vector corresponds to a gene in genes
and contains the identities of the sets containing that gene.
Each set is defined by its set index, which refers to a row of the data frame returned by fetchAllSets
.
first.gene <- fetchSetsForSomeGenes("9606", 1)
str(first.gene)
#> List of 1
#> $ : int [1:68] 1327 2337 2366 3538 6639 8166 13182 13273 14384 17635 ...
# Sets containing the first gene
all.set.info <- fetchAllSets("9606")
head(all.set.info[first.gene[[1]],])
#> name description size collection number
#> 1327 GO:0003674 molecular_function 710 1 1327
#> 2337 GO:0005576 extracellular region 1916 1 2337
#> 2366 GO:0005615 extracellular space 1865 1 2366
#> 3538 GO:0008150 biological_process 561 1 3538
#> 6639 GO:0031093 platelet alpha granule lumen 67 1 6639
#> 8166 GO:0034774 secretory granule lumen 115 1 8166