plot_sample_corr_distribution {proBatch} | R Documentation |
Useful to visualize within batch vs within replicate vs non-related sample correlation
plot_sample_corr_distribution(data_matrix, sample_annotation, repeated_samples = NULL, sample_id_col = "FullRunName", batch_col = "MS_batch", biospecimen_id_col = "EarTag", plot_title = "Correlation distribution", plot_param = "batch_replicate")
data_matrix |
features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. Usually the log transformed version of the original data |
sample_annotation |
data matrix with 1) |
repeated_samples |
if |
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 |
biospecimen_id_col |
column in |
plot_title |
Title of the plot (usually, processing step + representation level (fragments, transitions, proteins)) |
plot_param |
columns, defined in correlation_df, which is output of
; |
ggplot
type object with violin plot
for each plot_param
get_sample_corr_distrib
, ggplot
sample_corr_distribution_plot <- plot_sample_corr_distribution( example_proteome_matrix, example_sample_annotation, batch_col = 'MS_batch', biospecimen_id_col = "EarTag", plot_param = 'batch_replicate')