plot_sample_corr_distribution {proBatch} | R Documentation

## Create violin plot of correlation distribution

### Description

Useful to visualize within batch vs within replicate vs non-related sample correlation

### Usage

    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")

### Arguments

`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) `sample_id_col` (this can be repeated as row names) 2) biological and 3) technical covariates (batches etc)
`repeated_samples` | if `NULL`, only repeated sample correlation is plotted
`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 `sample_annotation` that should be used for batch comparison
`biospecimen_id_col` | column in `sample_annotation` that captures the biological sample, that (possibly) was profiled several times as technical replicates. Tip: if such ID is absent, but can be defined from several columns, create new `biospecimen_id` column
`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 `get_sample_corr_distrib`, specifically, #' `replicate` `batch_the_same` `batch_replicate` `batches` ;

### Value

`ggplot` type object with violin plot for each `plot_param`

### See Also

`get_sample_corr_distrib`, `ggplot`

### Examples

    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')

[Package proBatch version 1.0.0 Index]