Methods for Function geneIndex in Package gCMAP

Share:

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

1
2
3
4
5
6
7
8
## S4 method for signature 'CMAPCollection,character'
geneIndex(gene.sets,gene.ids,remove.empty=TRUE)

## S4 method for signature 'GeneSetCollection,character'
geneIndex(gene.sets,gene.ids,remove.empty=TRUE)

## S4 method for signature 'GeneSet,character'
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

1
2
3
4
5
6
## 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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.