Create a mapping of gene identifiers (Ensembl, symbol, etc.) to their Gesel gene indices.

createGeneIdentifierMap(species, type, ignore.case = FALSE, config = NULL)

Arguments

species

String specifying the taxonomy ID of the species of interest.

type

String specifying the type of gene identifier. This can be any type listed in fetchGeneTypes.

ignore.case

Boolean indicating whether case should be ignored.

config

Configuration list, typically created by newConfig. If NULL, the default configuration is used.

Value

Named list of integer vectors. Each name is an identifier of the specified type, and each vector contains the identities of genes associated with that identifier (after ignoring case, if ignore.case=TRUE). Specifically, each gene's identity is represented as a row index into the data frame returned by fetchAllGenes.

See also

searchGenes, which uses the mapping when searching for genes.

Author

Aaron Lun

Examples

mapping <- createGeneIdentifierMap("9606", type="symbol")

# Taking it for a spin:
found <- mapping[["SNAP25"]]
fetchAllGenes("9606")$symbol[found]
#> [[1]]
#> [1] "SNAP25"
#>