View source: R/qc_intensity_distribution.R
| qc_intensity_distribution | R Documentation | 
Plots the overall or sample-wise distribution of all peptide intensities as a boxplot or histogram.
qc_intensity_distribution(
  data,
  sample = NULL,
  grouping,
  intensity_log2,
  plot_style
)
| data | a data frame that contains at least sample names, grouping identifiers (precursor, peptide or protein) and log2 transformed intensities for each grouping identifier. | 
| sample | an optional character or factor column in the  | 
| grouping | a character column in the  | 
| intensity_log2 | a numeric column in the  | 
| plot_style | a character value that indicates the plot type. This can be either "histogram", "boxplot" or "violin". Plot style "boxplot" and "violin" can only be used if a sample column is provided. | 
A histogram or boxplot that shows the intensity distribution over all samples or by sample.
set.seed(123) # Makes example reproducible
# Create example data
data <- create_synthetic_data(
  n_proteins = 100,
  frac_change = 0.05,
  n_replicates = 3,
  n_conditions = 2,
  method = "effect_random"
)
# Plot intensity distribution
# The plot style can be changed
qc_intensity_distribution(
  data = data,
  sample = sample,
  grouping = peptide,
  intensity_log2 = peptide_intensity_missing,
  plot_style = "boxplot"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.