Learn R Programming

gCMAP (version 1.16.0)

mapNmerge: A function to map eSet featureNames and calculate summaries for many-to-one mapping features

Description

This function converts the featureNames of an eSet-derived object, either by applying a user-specified translation function (e.g. to remove pre- or suffices) or by refering to the annotation slot of the object to locate the corresponding Bioconductor annotation package.

In cases where multiple features map to the same target identifier, scores are summarized by applying 'summary.fun' (default: mean). For eSet-like object with multiple assayDataElements, each element is summarized separately.

Usage

mapNmerge( eset, translation.fun = NULL, get = "ENTREZID", verbose = FALSE, summary.fun = function(x) mean(x, na.rm = TRUE))

Arguments

eset
An eSet-like object.
translation.fun
A function that will be applied to the results of applying the 'featureNames' method to the eSet. If not 'NULL', this parameter takes precendence and the 'get' parameter will be ignored.
get
A character vector specifying the gene identifier universe to be retrieved from the Bioconductor annotation package.
verbose
Logical, should basid mapping statistics be returned ?
summary.fun
A function that will be applied to the scores after featureName mapping (default: mean).

Value

An eSet object with the same number of samples as the original and one row for each unique new featureName (after mapping & summary).

Examples

Run this code
## Not run: 
# ## requires hgu95av2.db annotation package
# 
# if( require( "hgu95av2.db" )) {
#   data(sample.ExpressionSet) ## from Biobase
#   dim(sample.ExpressionSet)
#   head(featureNames(sample.ExpressionSet))
#   entrez <- mapNmerge(sample.ExpressionSet)
#   dim(entrez)
#   head(featureNames(entrez))
# }
# ## End(Not run)

Run the code above in your browser using DataLab