zerosInBinMSnSet {pRoloc} | R Documentation

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

### 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

    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

    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))

[Package pRoloc version 1.34.0 Index]