mapGenesByName.Rd
Create a mapping of gene names (Ensembl, symbol, etc.) to their gene indices.
mapGenesByName(species, type, ignore.case = FALSE, config = NULL)
String specifying the taxonomy ID of the species of interest.
String specifying the type of name.
This is typically one of "symbol"
, "entrez"
, and "ensembl"
,
Logical scalar indicating whether case should be ignored.
Configuration list, typically created by newConfig
.
If NULL
, the default configuration is used.
Named list of integer vectors.
Each name corresponds to an name of the specified type
,
and each vector contains the genes associated with that name (after ignoring case, if ignore.case=TRUE
).
Vector entries should be interpreted as indices into any of the lists returned by fetchAllGenes
.
mapping <- mapGenesByName("9606", type="symbol")
# Taking it for a spin:
found <- mapping[["SNAP25"]]
fetchAllGenes("9606")$symbol[found]
#> [[1]]
#> [1] "SNAP25"
#>