plot_with_fitting_curve {proBatch} | R Documentation |
Plot Intensity of a few representative peptides for each step of the analysis including the fitting curve
plot_with_fitting_curve(pep_name, df_long, sample_annotation, fit_df, fit_value_var = "fit", order_col = "order", sample_id_col = "FullRunName", batch_col = "MS_batch", measure_col = "Intensity", feature_id_col = "peptide_group_label", geom = c("point", "line"), color_by_batch = FALSE, color_scheme = "brewer", facet_by_batch = FALSE, plot_title = sprintf("Fitting curve of %s peptide", pep_name), color_by_col = NULL, color_by_value = NULL, theme = "classic", vline_color = "grey", ...)
pep_name |
name of the peptide for diagnostic profiling |
df_long |
data frame where each row is a single feature in a single
sample. It minimally has a |
sample_annotation |
data matrix with:
|
fit_df |
data frame typically output generated from nonlinear curve
fitting by |
fit_value_var |
column denoting intensity values, typically fitted to curve |
order_col |
column in |
sample_id_col |
name of the column in sample_annotation file, where the filenames (colnames of the data matrix are found) |
batch_col |
column in |
measure_col |
if |
feature_id_col |
name of the column with feature/gene/peptide/protein
ID used in the long format representation |
geom |
for the intensity |
color_by_batch |
(logical) whether to color points by batch |
color_scheme |
color scheme for |
facet_by_batch |
(logical) whether to plot each batch in its own facet |
plot_title |
the string indicating the source of the peptides |
color_by_col |
column to color by certain value denoted
by |
color_by_value |
value in |
theme |
plot theme (default is 'classical'; other options not implemented) |
vline_color |
color of vertical lines, typically denoting
different MS batches in ordered runs; should be |
... |
additional arguments to |
ggplot
-class plot with minimally two facets (before and after
non-linear fit) with measure_col
(Intensity) vs order_col
(injection order) for selected peptides (specified in pep_name
)
Other feature-level diagnostic functions: plot_iRT
,
plot_peptides_of_one_protein
,
plot_single_feature
,
plot_spike_in
loess_fit_70 <- adjust_batch_trend(example_proteome_matrix, example_sample_annotation, span = 0.7) fitting_curve_plot <- plot_with_fitting_curve( pep_name = "10231_QDVDVWLWQQEGSSK_2", df_long = example_proteome, example_sample_annotation, fit_df = loess_fit_70$fit_df, plot_title = "Curve fitting with 70% span")