Perform a generic conservation test by comparing observed TXI patterns against a null distribution generated by permutation.
stat_generic_conservation_test(
phyex_set,
test_name,
scoring_function,
fitting_dist,
alternative = c("two-sided", "greater", "less"),
p_label = p_label,
custom_null_txis = NULL,
plot_result = TRUE
)A ConservationTestResult object containing test statistics and p-values
A PhyloExpressionSet object
Character string naming the test
Function to compute test statistic from TXI profile
Distribution object for fitting the null distribution
Character string specifying alternative hypothesis: "two-sided", "greater", or "less" (default: "two-sided")
Label for p-value in results (default: p_label)
Optional custom null TXI distribution (default: NULL)
Logical indicating whether to plot results (default: TRUE)
This function provides a generic framework for conservation testing by: 1. Generating null TXI distributions via permutation 2. Computing test statistics using the provided scoring function 3. Fitting the specified distribution to the null sample 4. Computing p-values based on the alternative hypothesis
stat_flatline_test, stat_early_conservation_test