plot_peptide_data: plot peptide-level data

View source: R/plot_peptide_data.R

plot_peptide_dataR Documentation

plot peptide-level data

Description

plot peptide-level data

Usage

plot_peptide_data(
  dataset,
  select_all_proteins = FALSE,
  select_diffdetect_candidates = NA,
  select_dea_signif = FALSE,
  filter_protein_ids = NA,
  filter_genes = NA,
  output_dir,
  show_unused_datapoints = FALSE,
  norm_algorithm = NA
)

Arguments

dataset

your dataset

select_all_proteins

plot all proteins. This will take a long time. Default: FALSE

select_diffdetect_candidates

if "differential detection" was enabled (it is by default in analysis_quickstart), plot candidate proteins based on their zscores. Valid parameters are positive numeric values that are to be used as absolute z-score cutoffs (5 or higher is typically reasonable; use plot_differential_detect to visualize the score distributions). This selects all proteins that meet this criterium in any contrast, and plots these proteins in every contrast (include those where it is has a z-score below given threshold). Alternative, set to TRUE to use an absolute z-score cutoff value of 4. Default: NA (disable)

select_dea_signif

plot all significant proteins from DEA? This effectively checks the "signif" column in the dataset$de_proteins data table (DEA results generated by MS-DAP), finds all proteins that are signif in any contrast, and plots these proteins in every contrast (include those where it is not signif). Boolean parameter, default: FALSE

filter_protein_ids

a vector of protein_id values that should be plotted. For example, you can find specific protein_id values in the differential expression result table and provide only these as a parameter (in this case, set select_dea_signif=FALSE to ensure only your specific protein identifiers are plotted)

filter_genes

a vector of gene symbols to plot (alternative for filter_protein_ids)

output_dir

full path to the output directory

show_unused_datapoints

should data points be shown for peptides that were not used in the differential expression analyses? i.e. peptides that did not pass the filtering prior to DEA (found in N samples in both experimental conditions). Boolean value, default: FALSE

norm_algorithm

normalization algorithms. This should be exactly the same as the parameter your provided to analysis_quickstart

Examples

## Not run: 
# example 1:
# <assuming you imported a dataset and applied analysis_quickstart()>
# plot all significant proteins found by DEA
plot_peptide_data( dataset, select_dea_signif = TRUE,
  # should match analysis_quickstart() parameters !
  norm_algorithm = c("vwmb", "modebetween_protein"),
  show_unused_datapoints = TRUE, output_dir = "C:/temp")

# example 2:
# filter the DEA results for some specific proteins, then plot these
pid = dataset$de_proteins %>%
  filter(dea_algorithm == "deqms" & qvalue < 10^-4) %>%
  pull(protein_id)
plot_peptide_data(
  dataset, filter_protein_ids = pid,
  # should match analysis_quickstart() parameters !
  norm_algorithm = c("vwmb", "modebetween_protein"),
  show_unused_datapoints = TRUE, output_dir = "C:/temp")

# example 3:
# plot specific proteins by providing gene symbols (not case sensitive)
plot_peptide_data(
  dataset, filter_genes = c("shisa6", "gria2"),
  # should match analysis_quickstart() parameters !
  norm_algorithm = c("vwmb", "modebetween_protein"),
  show_unused_datapoints = TRUE, output_dir = "C:/temp")

## End(Not run)

ftwkoopmans/msdap documentation built on March 5, 2025, 12:15 a.m.