nGenes | R Documentation |
Functions to manipulate GeneSet and GeneSetCollection objects (from package GSEABase)
nGenes(geneSet)
## S4 method for signature 'GeneSet'
nGenes(geneSet)
## S4 method for signature 'GeneSetCollection'
nGenes(geneSet)
subsetGeneSets(geneSets, geneNames)
## S4 method for signature 'GeneSetCollection'
subsetGeneSets(geneSets, geneNames)
setGeneSetNames(geneSets, newNames)
## S4 method for signature 'GeneSetCollection'
setGeneSetNames(geneSets, newNames)
geneSet |
One gene-set ( |
geneSets |
Gene-set collection
( |
geneNames |
Gene names (for subset) |
newNames |
New names (to assign to the gene sets) |
- **nGenes()**: provides the number of genes in the gene-set, or each of the gene-sets in a collection
- **subsetGeneSets()**: Subsets each of the gene-sets in a collection to contain only the genes inthe given list. Equivalent to intersect(), but keeping the original gene-set name.
- **setGeneSetNames()**: Modifies the name of each gene-set in a collection
library(GSEABase)
genes_1 <- GeneSet(paste("Gene", 1:20, sep=""), setName="geneSet1")
genes_2 <- GeneSet(paste("Gene", 18:22, sep=""), setName="geneSet2")
geneSets <- GeneSetCollection(genes_1, genes_2)
nGenes(genes_1)
nGenes(geneSets)
subsetGeneSets(geneSets, paste("Gene", 15:20, sep=""))
geneSets_newNames <- setGeneSetNames(geneSets, c("one", "two"))
names(geneSets_newNames)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.