plot_peptide_corr_distribution: Create violin plot of peptide correlation distribution

plot_peptide_corr_distributionR Documentation

Create violin plot of peptide correlation distribution

Description

Plot distribution of peptide correlations within one protein and between proteins

Usage

plot_peptide_corr_distribution(data_matrix, peptide_annotation,
  protein_col = "ProteinName", feature_id_col = "peptide_group_label",
  filename = NULL, width = NA, height = NA, units = c("cm", "in",
  "mm"), plot_title = "Distribution of peptide correlation",
  theme = "classic")

plot_peptide_corr_distribution.corrDF(corr_distribution, filename = NULL,
  width = NA, height = NA, units = c("cm", "in", "mm"),
  plot_title = "Correlation of peptides", theme = "classic",
  base_size = 20)

Arguments

data_matrix

features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. See "example_proteome_matrix" for more details (to call the description, use help("example_proteome_matrix"))

peptide_annotation

long format data frame with peptide ID and their corresponding protein and/or gene annotations. See help("example_peptide_annotation").

protein_col

column where protein names are specified

feature_id_col

name of the column with feature/gene/peptide/protein ID used in the long format representation df_long. In the wide formatted representation data_matrix this corresponds to the row names.

filename

path where the results are saved. If null the object is returned to the active window; otherwise, the object is save into the file. Currently only pdf and png format is supported

width

option determining the output image width

height

option determining the output image width

units

units: 'cm', 'in' or 'mm'

plot_title

title of the plot (e.g., processing step + representation level (fragments, transitions, proteins) + purpose (meanplot/corrplot etc))

theme

ggplot theme, by default classic. Can be easily overriden

corr_distribution

data frame with peptide correlation distribution

Value

ggplot object (violin plot of peptide correlation)

See Also

calculate_peptide_corr_distr, ggplot

Examples

peptide_corr_distribution <- plot_peptide_corr_distribution(
example_proteome_matrix, 
example_peptide_annotation, protein_col = 'Gene')

selected_genes = c('BOVINE_A1ag','BOVINE_FetuinB','Cyfip1')
gene_filter = example_peptide_annotation$Gene %in% selected_genes
peptides_ann = example_peptide_annotation$peptide_group_label
selected_peptides = peptides_ann[gene_filter]
matrix_test = example_proteome_matrix[selected_peptides,]
pep_annotation_sel = example_peptide_annotation[gene_filter, ]
corr_distribution = calculate_peptide_corr_distr(matrix_test, 
pep_annotation_sel, protein_col = 'Gene')
peptide_corr_distribution <- plot_peptide_corr_distribution.corrDF(corr_distribution)

## Not run: 
peptide_corr_distribution <- plot_peptide_corr_distribution.corrDF(corr_distribution, 
filename = 'test_peptide.png', 
width = 28, height = 28, units = 'cm')

## End(Not run)


symbioticMe/proBatch documentation built on April 9, 2023, 11:59 a.m.