norm_plot {promor} | R Documentation |
Visualize the effect of normalization
Description
This function visualizes the impact of normalization on the data
Usage
norm_plot(
original,
normalized,
type = "box",
text_size = 10,
palette = "viridis",
save = FALSE,
file_path = NULL,
file_name = "Norm_plot",
file_type = "pdf",
dpi = 80,
plot_width = 10,
plot_height = 7
)
Arguments
original |
A |
normalized |
A |
type |
Type of plot to generate. Choices are "box" or "density." Default
is |
text_size |
Text size for plot labels, axis labels etc. Default is
|
palette |
Viridis color palette option for plots. Default is
|
save |
Logical. If |
file_path |
A string containing the directory path to save the file. |
file_name |
File name to save the plot.
Default is |
file_type |
File type to save the plot.
Default is |
dpi |
Plot resolution. Default is |
plot_width |
Width of the plot. Default is |
plot_height |
Height of the plot. Default is |
Details
Given two data frames, one with data prior to normalization
(original
), and the other, after normalization (normalized
),
norm_plot
generates side-by-side plots to visualize the effect of
normalization on the protein intensity data.
Value
A ggplot2
plot object.
Author(s)
Chathurani Ranathunge
See Also
-
create_df
-
impute_na
Examples
## Generate a raw_df object with default settings. No technical replicates.
raw_df <- create_df(
prot_groups = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/pg1.txt",
exp_design = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed1.txt"
)
## Impute missing values in the data frame using the default minProb
## method.
imp_df <- impute_na(raw_df)
## Normalize the imp_df object using the default quantile method
norm_df <- normalize_data(imp_df)
## Visualize normalization using box plots
norm_plot(original = imp_df, normalized = norm_df)
## Visualize normalization using density plots
norm_plot(imp_df, norm_df, type = "density")