zerosInBinMSnSet: Compute the number of non-zero values in each marker classes

Description Usage Arguments Value Author(s) See Also Examples

View source: R/MSnSet.R

Description

The function assumes that its input is a binary MSnSet and computes, for each marker class, the number of non-zero expression profiles. The function is meant to be used to produce heatmaps (see the example) and visualise binary (such as GO) MSnSet objects and assess their utility: all zero features/classes will not be informative at all (and can be filtered out with filterBinMSnSet) while features/classes with many annotations (GO terms) are likely not be be informative either.

Usage

1
2
zerosInBinMSnSet(object, fcol = "markers", as.matrix = TRUE,
  percent = TRUE)

Arguments

object

An instance of class MSnSet with binary data.

fcol

A character defining the feature data variable to be used as markers. Default is "markers".

as.matrix

If TRUE (default) the data is formatted and returned as a matrix. Otherwise, a list is returned.

percent

If TRUE, percentages are returned. Otherwise, absolute values.

Value

A matrix or a list indicating the number of non-zero value per marker class.

Author(s)

Laurent Gatto

See Also

filterBinMSnSet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
library(pRolocdata)
data(hyperLOPIT2015goCC)
zerosInBinMSnSet(hyperLOPIT2015goCC)
zerosInBinMSnSet(hyperLOPIT2015goCC, percent = FALSE)
pal <- colorRampPalette(c("white", "blue"))
library(lattice)
levelplot(zerosInBinMSnSet(hyperLOPIT2015goCC),
          xlab = "Number of non-0s",
          ylab = "Marker class",
          col.regions = pal(140))

pRoloc documentation built on Nov. 8, 2020, 6:26 p.m.