Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotNA-methods

Exploring missing data in 'MSnSet' instances


Description

These methods produce plots that illustrate missing data.

is.na returns the expression matrix of it MSnSet argument as a matrix of logicals referring whether the corresponding cells are NA or not. It is generally used in conjunction with table and image (see example below).

The plotNA method produces plots that illustrate missing data. The completeness of the full dataset or a set of proteins (ordered by increasing NA content along the x axis) is represented. The methods make use the ggplot2 system. An object of class 'ggplot' is returned invisibly.

Methods

is.na

signature(x = "MSnSet")

Returns the a matrix of logicals of dimensions dim(x) specifiying if respective values are missing in the MSnSet's expression matrix.

plotNA

signature(object = "MSnSet", pNA = "numeric")

Plots missing data for an MSnSet instance. pNA is a numeric of length 1 that specifies the percentage of accepted missing data values per features. This value will be highlighted with a point on the figure, illustrating the overall percentage of NA values in the full data set and the number of proteins retained. Default is 1/2.

Author(s)

Laurent Gatto <lg390@cam.ac.uk>

See Also

See also the filterNA method to filter out features with a specified proportion if missing values.

Examples

data(msnset)
exprs(msnset)[sample(prod(dim(msnset)), 120)] <- NA

head(is.na(msnset))
table(is.na(msnset))
image(msnset)

plotNA(msnset, pNA = 1/4)

MSnbase

Base Functions and Classes for Mass Spectrometry and Proteomics

v2.16.1
Artistic-2.0
Authors
Laurent Gatto, Johannes Rainer and Sebastian Gibb with contributions from Guangchuang Yu, Samuel Wieczorek, Vasile-Cosmin Lazar, Vladislav Petyuk, Thomas Naake, Richie Cotton, Arne Smits, Martina Fisher, Ludger Goeminne, Adriaan Sticker and Lieven Clement.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.