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 raw_df object (output of create_df) containing technical replicates.

rep_1

Numerical. Technical replicate number.

rep_2

Numerical. Number of the second technical replicate to compare to rep1.

save

Logical. If TRUE saves a copy of the plot in the directory provided in file_path.

file_type

File type to save the scatter plots. Default is "pdf".

palette

Viridis color palette option for plots. Default is "viridis". See viridis for available options.

text_size

Text size for plot labels, axis labels etc. Default is 10.

n_row

Numerical. Number of plots to print in a row in a single page. Default is 4.

n_col

Numerical. Number of plots to print in a column in a single page. Default is 4.

dpi

Plot resolution. Default is 80.

file_path

A string containing the directory path to save the file.

Details

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)



[Package promor version 0.2.1 Index]