corr_plot {promor} | R Documentation |
Correlation between technical replicates
Description
This function generates scatter plots to visualize the correlation between a given pair of technical replicates (Eg: 1 vs 2) for each sample.
Usage
corr_plot(
raw_df,
rep_1,
rep_2,
save = FALSE,
file_type = "pdf",
palette = "viridis",
text_size = 5,
n_row = 4,
n_col = 4,
dpi = 80,
file_path = NULL
)
Arguments
raw_df |
A |
rep_1 |
Numerical. Technical replicate number. |
rep_2 |
Numerical. Number of the second technical replicate to compare
to |
save |
Logical. If |
file_type |
File type to save the scatter plots.
Default is |
palette |
Viridis color palette option for plots. Default is
|
text_size |
Text size for plot labels, axis labels etc. Default is
|
n_row |
Numerical. Number of plots to print in a row in a single page.
Default is |
n_col |
Numerical. Number of plots to print in a column in a single
page. Default is |
dpi |
Plot resolution. Default is |
file_path |
A string containing the directory path to save the file. |
Details
Given a data frame of log-transformed intensities (a
raw_df
object) and a pair of numbers referring to the technical replicates,corr_plot
produces a list of scatter plots showing correlation between the given pair of technical replicates for all the samples provided in the data frame.Note:
n_row
*n_col
should be equal to the number of samples to display in a single page.
Value
A list of ggplot2
plot objects.
Author(s)
Chathurani Ranathunge
See Also
create_df
Examples
## Use a data set containing technical replicates to create a raw_df object
raw_df <- create_df(
prot_groups = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/pg2.txt",
exp_design = "https://raw.githubusercontent.com/caranathunge/promor_example_data/main/ed2.txt",
tech_reps = TRUE
)
## Compare technical replicates 1 vs. 2 for all samples
corr_plot(raw_df, rep_1 = 1, rep_2 = 2)