probe2gene: Transformation of probe level expression to gene level...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/probe2gene.R

Description

Transforms expression data on probe level to gene level expression by summarizing all probes that are annotated to a particular gene.

Usage

1
2
3
4
5
6
7
8
probe2gene(
  probeSE,
  chip = NA,
  from = "PROBEID",
  to = "ENTREZID",
  multi.to = "first",
  multi.from = "mean"
)

Arguments

probeSE

Probe expression data. An object of class SummarizedExperiment. Make sure that the metadata contains an element named annotation that provides the corresponding ID of a recognized platform such as hgu95av2 (Affymetrix Human Genome U95 chip). This requires that a corresponding .db package exists (see http://www.bioconductor.org/packages/release/BiocViews.html#___ChipName for available chips/packages) and that you have it installed. Alternatively, the mapping from probe to gene can also be defined in the rowData slot via two columns named (i) PROBEID for the platform-specific probe ID, and (ii) ENTREZID for the corresponding NCBI Entrez Gene ID.

chip

Character. The ID of a recognized microarray platform. Only required if not provided in the metadata of probeSE via an element named annotation.

from

Character. ID type from which should be mapped. Corresponds to the ID type of the names of argument se, with the default PROBEID being appropriate if the mapping is based on Bioconductor annotation packages. Note that from is ignored if to is a rowData column of probeSE.

to

Character. Gene ID type to which should be mapped. Corresponds to the gene ID type the rownames of argument probeSE should be updated with. Note that this can also be the name of a column in the rowData slot of probeSE to specify user-defined mappings in which conflicts have been manually resolved. Defaults to ENTREZID.

multi.to

How to resolve 1:many mappings, i.e. multiple gene IDs for a single probe ID? This is passed on to the multiVals argument of mapIds and can thus take several pre-defined values, but also the form of a user-defined function. However, note that this requires that a single gene ID is returned for each probe ID. Default is "first", which accordingly returns the first gene ID mapped onto the respective probe ID.

multi.from

How to resolve many:1 mappings, i.e. multiple probe IDs mapping to the same gene ID? Pre-defined options include:

  • 'mean' (Default): updates the respective gene expression with the average over the expression of all probes mapping to that gene,

  • 'first': returns the first probe ID for each gene ID with multiple probe IDs,

  • 'minp' selects the probe ID with minimum p-value (according to the rowData column PVAL of probeSE),

  • 'maxfc' selects the probe ID with maximum absolute log2 fold change (according to the rowData column FC of probeSE).

Value

A SummarizedExperiment on gene level.

Author(s)

Ludwig Geistlinger <Ludwig.Geistlinger@sph.cuny.edu>

See Also

readSE for reading expression data from file, deAna for differential expression analysis.

Examples

1
2
3
4
5
6
    # (1) reading the expression data from file
    exprs.file <- system.file("extdata/exprs.tab", package="EnrichmentBrowser")
    cdat.file <- system.file("extdata/colData.tab", package="EnrichmentBrowser")
    rdat.file <- system.file("extdata/rowData.tab", package="EnrichmentBrowser")
    probeSE <- readSE(exprs.file, cdat.file, rdat.file)
    geneSE <- probe2gene(probeSE) 

EnrichmentBrowser documentation built on Dec. 12, 2020, 2 a.m.