mapNmerge: A function to map eSet featureNames and calculate summaries...

Description Usage Arguments Value Note Author(s) Examples

View source: R/utility-functions.R

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

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

Note

For large eSet objects, applying 'summary.fun' can be time-consuming. Other strategies, e.g. based on selecting a single probe for each gene based on cross-sample variability are available in the genefilter package.

Author(s)

Thomas Sandmann, sandmann.thomas@gene.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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)

gCMAP documentation built on May 31, 2017, 2:35 p.m.

Search within the gCMAP package
Search all R packages, documentation and source code