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: a character column in the data data frame that contains the sample names.
grouping: a character column in the data data frame that contains protein, precursor, or peptide identifiers.
intensity_log2: a numeric column in the data data frame that contains the log2 transformed intensities of the selected grouping variable.
facet: a logical value that specifies whether the calculation should be done group wise by sample and if the resulting plot should be faceted by sample. (default is FALSE). If facet = FALSE the median of each protein intensity will be returned.
plot: a logical value that specifies whether the result should be plotted (default is FALSE).
y_axis_transformation: a character value that determines that y-axis transformation. The value is either "log2" or "log10" (default is "log10").
interactive: a logical value that specifies whether the plot should be interactive (default is FALSE).
Returns
A data frame containing the ranked intensities is returned. If plot = TRUE a plot is returned. The intensities are log10 transformed for the plot.
Examples
set.seed(123)# Makes example reproducible# Create synthetic datadata <- create_synthetic_data( n_proteins =50, frac_change =0.05, n_replicates =4, n_conditions =3, method ="effect_random", additional_metadata =FALSE)# Plot ranked intensities for all samples combinedqc_ranked_intensities( data = data, sample = sample, grouping = peptide, intensity_log2 = peptide_intensity, plot =TRUE,)# Plot ranked intensities for each sample separatelyqc_ranked_intensities( data = data, sample = sample, grouping = peptide, intensity_log2 = peptide_intensity, plot =TRUE, facet =TRUE)