Search for genes by converting gene identifiers to gene indices.

searchGenes(species, genes, types = NULL, ignore.case = TRUE, config = NULL)

Arguments

species

String specifying the taxonomy ID of the species of interest.

genes

Character vector of gene names of any type specified in types.

types

Character vector specifying the types of gene names to return. This is typically one or more of "symbol", "entrez", and "ensembl", defaulting to all of them.

ignore.case

Logical scalar indicating whether case should be ignored.

config

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

Value

List of length equal to genes. Each entry is an integer vector of gene indices that refer to rows of the data frame returned by fetchAllGenes; these rows represent the genes that match to the corresponding entry of genes.

Author

Aaron Lun

Examples

searchGenes("9606", c("SNAP25", "NEUROD6", "ENSG00000139618"))
#> [[1]]
#> [1] 4640
#> 
#> [[2]]
#> [1] 12768
#> 
#> [[3]]
#> [1] 485
#>