Learn R Programming

gCMAP (version 1.16.0)

geneIndex-methods: Methods for Function geneIndex in Package gCMAP

Description

These methods match a character vector of gene ids to the members of a GeneSet, GeneSetCollection or CMAPCollection and return the match indices.

Usage

"geneIndex"(gene.sets,gene.ids,remove.empty=TRUE)
"geneIndex"(gene.sets,gene.ids,remove.empty=TRUE)
"geneIndex"(gene.sets,gene.ids,remove.empty=TRUE)

Arguments

gene.sets
A CMAPCollection, GeneSetCollection or GeneSet to match the 'gene.ids' against.
gene.ids
A character string of gene identifiers whose position (if any) in the 'gene.sets' is to be determined.
remove.empty
Logical parameter specifying whether gene sets without any matching gene.ids should be removed from the output.

Value

An integer vector or (if a collection was searched) a list of integer vectors with the matching positions of gene.ids in the gene.sets.

Examples

Run this code

## induce CMAPCollection
data(gCMAPData)
gene.set.collection <- induceCMAPCollection(gCMAPData, "z", higher=2, lower=-2)

gene.ids <- geneIds(gene.set.collection[,2]) ## geneIds of the second set
geneIndex(gene.set.collection, gene.ids)

Run the code above in your browser using DataLab