Given a list of qSIP2 objects, this function will return the delta EAF value
for each feature_id, including the confidence interval, standard deviation,
and two p-values from 1) the bootstrap percentile test (bs_pval) and 2) the
Wald's z-test (pval).
Details
By default the function will do all pairwise comparisons of the groups in the
object list with the first listed as the "control" and the second as the
"treatment". Optionally, data frame with "control", "treatment" and
"contrast" columns can be provided to specify only the contrasts of interest
and to define the proper "control" vs. "treatment" groups. To ensure this
data frame is properly formatted (e.g. has the proper column names and all
groups are found in the qSIP2 object list), it must be validated through the
validate_delta_EAF_contrasts() function.
Under the hood, for each feature_id this function subtracts the observed EAF
in the "treatment" group from the "control" and saves this as the \(\Delta\)
value. Then, it pulls the data from run_resampling() and for each resampling
\(i\) calculates the delta (so \(\Delta_i = treatment_i - control_i\)) saving
these values as a vector of delta distributions. The bs_pval is calculated
from this distribution, and pval is calculated from \(\Delta\) and the
standard deviation of the distribution.
