plotHisto: Plots histograms

plotHistoR Documentation

Plots histograms

Description

Plots histograms

Usage

plotHisto(
  df = NULL,
  id,
  label_scheme_sub,
  scale_log2r = TRUE,
  complete_cases = FALSE,
  cut_points,
  show_curves = FALSE,
  show_vline = FALSE,
  scale_y = TRUE,
  filepath = NULL,
  filename = NULL,
  theme = NULL,
  ...
)

Arguments

df

The name of a primary data file. By default, it will be determined automatically after matching the types of data and analysis with an id among c("pep_seq", "pep_seq_mod", "prot_acc", "gene"). A primary file contains normalized peptide or protein data and is among c("Peptide.txt", "Peptide_pVal.txt", "Peptide_impNA_pVal.txt", "Protein.txt", "Protein_pVal.txt", "protein_impNA_pVal.txt"). For analyses require the fields of significance p-values, the df will be one of c("Peptide_pVal.txt", "Peptide_impNA_pVal.txt", "Protein_pVal.txt", "protein_impNA_pVal.txt").

id

Character string; one of pep_seq, pep_seq_mod, prot_acc and gene.

label_scheme_sub

A data frame. Subset entries from label_scheme for selected samples.

scale_log2r

Logical; if TRUE, adjusts log2FC to the same scale of standard deviation across all samples. The default is TRUE. At scale_log2r = NA, the raw log2FC without normalization will be used.

complete_cases

Logical; if TRUE, only cases that are complete with no missing values will be used. The default is FALSE.

cut_points

A named, numeric vector defines the cut points (knots) in histograms. The default is cut_points = c(mean_lint = NA) where the cut points correspond to the quantile values under column mean_lint (mean log10 intensity) of input data. Values of log2FC will be then binned from -Inf to Inf according to the cut points. To disable data binning, set cut_points = Inf or -Inf. The binning of log2FC can also be achieved through a different numeric column, e.g., cut_points = c(prot_icover = seq(.25, .75, .25)). See also mergePep for data alignment with binning.

show_curves

Logical; if TRUE, shows the fitted curves. At the TRUE default, the curve parameters are based on the latest call to standPep or standPrn with method_align = MGKernel. This feature can inform the effects of data filtration on the alignment of logFC profiles. Also see standPep and standPrn for more examples.

show_vline

Logical; if TRUE, shows the vertical lines at x = 0. The default is TRUE.

scale_y

Logical; if TRUE, scale data on the y-axis. The default is TRUE.

filepath

A file path to output results. By default, it will be determined automatically by the name of the calling function and the value of id in the call.

filename

A representative file name to outputs. By default, the name(s) will be determined automatically. For text files, a typical file extension is .txt. For image files, they are typically saved via ggsave or pheatmap where the image type will be determined by the extension of the file name.

theme

A ggplot2 theme, i.e., theme_bw(), or a custom theme. At the NULL default, a system theme will be applied.

...

filter_: Variable argument statements for the row filtration of data against the column keys in Peptide.txt for peptides or Protein.txt for proteins. Each statement contains to a list of logical expression(s). The lhs needs to start with filter_. The logical condition(s) at the rhs needs to be enclosed in exprs with round parenthesis.

For example, pep_len is a column key in Peptide.txt. The statement filter_peps_at = exprs(pep_len <= 50) will remove peptide entries with pep_len > 50. See also normPSM.

Additional parameters for plotting with ggplot2:
xmin, the minimum x at a log2 scale; the default is -2.
xmax, the maximum x at a log2 scale; the default is +2.
xbreaks, the breaks in x-axis at a log2 scale; the default is 1.
binwidth, the binwidth of log2FC; the default is (xmax - xmin)/80.
ncol, the number of columns; the default is 1.
width, the width of plot;
height, the height of plot.
scales, should the scales be fixed across panels; the default is "fixed" and the alternative is "free".


qzhang503/proteoQ documentation built on Dec. 14, 2024, 12:27 p.m.