plot-moleculeFilt: Plot moleculeFilt Object

plot.moleculeFiltR Documentation

Plot moleculeFilt Object

Description

For plotting an S3 object of type 'moleculeFilt':

Usage

## S3 method for class 'moleculeFilt'
plot(
  x,
  min_num = NULL,
  cumulative = TRUE,
  interactive = FALSE,
  x_lab = NULL,
  y_lab = NULL,
  x_lab_size = 11,
  y_lab_size = 11,
  x_lab_angle = 0,
  title_lab = NULL,
  title_lab_size = 14,
  legend_lab = NULL,
  legend_position = "right",
  text_size = 3,
  bar_width = 0.8,
  bw_theme = TRUE,
  palette = NULL,
  display_count = TRUE,
  ...
)

Arguments

x

object of class moleculeFilt that contains the molecule identifier and the number of samples for which the molecule was measured (not NA)

min_num

An integer specifying the minimum number of samples in which a biomolecule must appear. If a value is specified, a horizontal line will be drawn when cumulative=TRUE, and bars will be colored appropriately if cumulative=FALSE. Defaults to NULL.

cumulative

logical indicating whether the number of biomolecules observed in at least (TRUE) x number of samples or exactly (FALSE) x number of samples should be plotted. Defaults to TRUE.

interactive

logical value. If TRUE produces an interactive plot.

x_lab

character string specifying the x-axis label

y_lab

character string specifying the y-axis label. The default is NULL in which case the y-axis label will be the metric selected for the metric argument.

x_lab_size

integer value indicating the font size for the x-axis. The default is 11.

y_lab_size

integer value indicating the font size for the y-axis. The default is 11.

x_lab_angle

integer value indicating the angle of x-axis labels. The default is 0.

title_lab

character string specifying the plot title

title_lab_size

integer value indicating the font size of the plot title. The default is 14.

legend_lab

character string specifying the legend title.

legend_position

character string specifying the position of the legend. Can be one of "right", "left", "top", "bottom", or "none". The default is "none".

text_size

integer specifying the size of the text (number of biomolecules by sample) within the bar plot. The default is 3.

bar_width

integer indicating the width of the bars in the bar plot. The default is 0.8.

bw_theme

logical value. If TRUE uses the ggplot2 black and white theme.

palette

character string indicating the name of the RColorBrewer palette to use. For a list of available options see the details section in RColorBrewer.

display_count

logical value. Indicates whether the missing value counts by sample will be displayed on the bar plot. The default is TRUE.

...

further arguments passed to or from other methods.

Value

ggplot2 plot object if interactive is FALSE, or plotly plot object if interactive is TRUE

Examples


library(pmartRdata)
data(pep_object)
molfilt <- molecule_filter(omicsData = pep_object)
plot(molfilt, min_num = 5)
plot(molfilt, min_num = 3, cumulative = FALSE)


pmartR/pmartR documentation built on March 4, 2024, 8:32 a.m.