Skip to contents

Tests whether the discrepancy between weighted and simple means is driven by a systematic fragment-length score bias or by underlying biological/stochastic variance. It models any length-based bias by fitting a Generalized Additive Model (GAM) to all non-peak fragments, predicts the expected bias discrepancy per region, and compares it to the observed discrepancy.

Usage

test_weighting_vs_bias_artifact(diff_results, sample_name, plot = TRUE)

Arguments

diff_results

A `DamIDResults` object

sample_name

Character string of the sample to analyse

plot

Logical. Whether to print the summary plots (Default: TRUE)

Value

A list containing the discrepancy data, the summary statistics, and a two-panel patchwork plot for verification and results.