Skip to contents

Import & Data

Import data and create pepdiff_data objects

read_pepdiff()
Read proteomics data into a pepdiff_data object
combine_tech_reps()
Combine technical replicates
import_data()
read data from a file
new_pepdiff_data()
Create a new pepdiff_data object
validate_pepdiff_data()
Validate a pepdiff_data object
print(<pepdiff_data>)
Print method for pepdiff_data
summary(<pepdiff_data>)
Summary method for pepdiff_data
subset(<pepdiff_data>)
Subset a pepdiff_data object
plot(<pepdiff_data>)
Plot method for pepdiff_data

Analysis

Run differential abundance analysis

compare()
Compare peptide abundances between conditions
compare_glm()
Compare using GLM
compare_art()
Compare using ART
compare_pairwise()
Compare using pairwise tests
compare_pairwise_rankprod()
Compare using Rank Products (full matrix approach)
compare_within_strata()
Compare within strata
significant()
Extract significant results
get_peptide()
Get results for a specific peptide
get_comparison()
Get results for a specific comparison

Results

Results class and methods

new_pepdiff_results()
Create a new pepdiff_results object
validate_pepdiff_results()
Validate a pepdiff_results object
print(<pepdiff_results>)
Print method for pepdiff_results
summary(<pepdiff_results>)
Summary method for pepdiff_results
plot(<pepdiff_results>)
Plot method for pepdiff_results
long_results()
Convert wide format results table to long format
build_results_tibble()
Build results tibble from model output
build_pairwise_results()
Build results tibble from pairwise tests

Diagnostics

Check model fit and convergence

plot_fit_diagnostics()
Plot GLM fit diagnostics
extract_diagnostics()
Extract model diagnostics
extract_stored_residuals()
Extract stored residuals and fitted values for selected peptides
get_all_residuals()
Get standardized residuals from all peptide models
print_diagnostic_summary()
Print diagnostic summary to console

Visualization

Plot functions for data and results

plot_pca()
plots a pca on the treatment, seconds, bio-rep
plot_pca_simple()
Simple PCA plot for pepdiff_data
plot_heatmap()
makes heatmap from all experiments, filter on a single metric and sig value
plot_volcano_new()
Volcano plot for pepdiff_results
plot_volcano_bf()
Volcano plot for Bayes factor results
plot_pvalue_histogram()
P-value histogram for pepdiff_results
plot_fc_distribution_new()
Fold change distribution for pepdiff_results
plot_bf_distribution()
Bayes factor distribution plot
plot_distributions_simple()
Simple distribution plot for pepdiff_data
plot_missingness_simple()
Simple missingness plot for pepdiff_data
plot_quant_distributions()
draw density plots for data
plot_fc()
plot histogram of fold change distribution for a comparison
plot_kmeans()
K-means cluster the data on the samples
plot_result()
plot the p-values against fold change for the tests used in `compare()`
volcano_plot()
volcano plot the data
p_value_hist()
plot histograms of p-values for each test used
fc_qqplot()
plot qqplot of fold changes from a comparison
norm_qqplot()
draw qqplots for data
missing_peptides_plot()
plot the representation of peptides in each group.
times_measured_plot()
plot the count of the number of times peptides were measured.

Statistical Tests

Individual test implementations

test_wilcoxon()
Wilcoxon rank-sum test for two groups
test_bootstrap_t()
Bootstrap t-test for two groups
test_bayes_t()
Bayes factor t-test for two groups
test_rankprod()
Rank products test for two groups
jzs_bf_approx()
JZS Bayes factor approximation
classify_bf_evidence()
Classify Bayes factor into evidence categories
calc_t_statistic()
Calculate t-statistic for two groups
calc_rank_product()
Calculate rank products for two groups
build_replicate_matrix()
Build replicate matrix from pepdiff_data

Model Fitting

GLM and ART model fitting internals

fit_glm()
Fit a Gamma GLM for a single peptide
fit_art()
Fit an Aligned Rank Transform model for a single peptide
fit_and_extract_glm()
Fit GLM and extract contrasts for one peptide
fit_and_extract_art()
Fit ART and extract contrasts for one peptide
extract_contrasts_glm()
Extract contrasts from a fitted GLM using emmeans
extract_contrasts_art()
Extract contrasts from a fitted ART model
run_models()
Run statistical model for all peptides
has_sufficient_variation()
Check if a model has enough variation to fit
build_formula()
Build formula from factor names

Data Utilities

Helper functions for data manipulation

assess_missing()
calculate the proportion of peptides with missing values per group in a data set.
compute_missingness()
Compute missingness statistics per peptide
compute_design_summary()
Compute design summary from data
times_measured()
calculate number of measurements of each peptide in each treatment and time
fold_change_matrix()
returns a matrix of fold change values
matrix_data()
Convert data frame to matrix format (legacy)
list2mat()
converts a results object to a matrix as if for direct use in external heatmap functions
mean_fold_change()
Calculate mean fold change for peptide
log2_fc()
Calculate log2 fold change
apply_fdr_by_comparison()
Apply FDR correction within groups

Legacy Functions

Deprecated functions from earlier versions

compare(<data.frame>)
Default compare method for legacy data frames
compare_legacy()
Legacy compare function (deprecated)
compare_many()
compare many combinations of treatment and control
compare_calls()
compare sets of significant peptides called by the used data
get_sig_rows()
works out if a peptide has at least one significant value across the experiment Composes a matrix of the `metric` significance values with peptides in rows, experiments in columns and works out if each peptide row has a value below the stated cut off
estimate_result_clusters()
plots a Figure of Merit curve to help estimate the number of clusters in the results
kmeans_by_selected_cols()
Perform kmeans of a dataset using just data in selected columns, then return matrices of all columns
get_bootstrap_percentile()
get p values for contrast using boostrap t test
get_wilcoxon_percentile()
get p values for contrast using Wilcoxon test
get_kruskal_percentile()
get p values for contrast using Kruskal-Wallis test
get_rp_percentile()
get p values for contrast using Rank Products test
get_percentile_lowest_observed_value_iterative()
get p values for contrast using normal percentile
select_columns_for_contrast()
Select columns for contrast (legacy)
min_peptide_values()
Find minimal values for a peptide across replicates (legacy)
replace_vals()
Replace missing values with replacements (legacy)
metrics()
reports metrics available for significance values

Internal Utilities

Internal helper functions

validate_factors()
Validate factor columns exist in data
validate_positive()
Validate positive values for Gamma GLM
check_zeros()
Check for zeros in values (used before GLM fitting)
is_useable()
Check if values are useable (non-NA and non-NaN)