Test weighting discrepancy against systematic length bias
Source:R/diagnostic_plots.R
test_weighting_vs_bias_artifact.RdTests 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.