Fetch genes for some sets in the Gesel database. This can be more efficient than fetchGenesForAllSets if only a few sets are of interest.

fetchGenesForSomeSets(species, sets, config = NULL)

Arguments

species

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

sets

Integer vector containing set indices. 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

List of integer vectors. Each vector corresponds to a set in sets and contains the identities of its member genes. Each gene is defined by its gene index, which refers to a row of the data frame returned by fetchAllGenes.

Author

Aaron Lun

Examples

first.set <- fetchGenesForSomeSets("9606", 1)
str(first.set)
#> List of 1
#>  $ : int [1:11] 205 1357 2947 3050 3397 6394 6929 11392 13719 14489 ...

# Genes in the first set:
gene.symbols <- fetchAllGenes("9606")$symbol
head(gene.symbols[first.set[[1]]])
#> [[1]]
#> [1] "SLC25A4"
#> 
#> [[2]]
#> [1] "TYMP"
#> 
#> [[3]]
#> [1] "MEF2A"
#> 
#> [[4]]
#> [1] "MPV17"
#> 
#> [[5]]
#> [1] "OPA1"
#> 
#> [[6]]
#> [1] "LONP1"
#>