Rebuild a ContrastConfiguration from a list
Source:R/ContrastConfiguration.R
list_to_contrast_configuration.RdRound-trip partner of r6_extract_values, which keeps the
fields but drops the methods. Use it to restore the column-role mapping
from a serialized result artifact (e.g. SummarizedExperiment metadata
or an AnnData uns entry) so consumers can call has_pvalue() and
friends again.
Arguments
- dd
named list of
ContrastConfigurationfields
See also
Other configuration:
AnalysisConfiguration,
ContrastConfiguration,
INTERNAL_FUNCTIONS_BY_FAMILY,
r6_extract_values(),
setup_analysis()
Examples
cfg <- ContrastConfiguration$new(
subject_id = "protein_Id",
contrast_col = "Bait",
pvalue_col = NA_character_
)
values <- r6_extract_values(cfg)
restored <- list_to_contrast_configuration(values)
stopifnot(all.equal(r6_extract_values(restored), values))
restored$has_pvalue()
#> [1] FALSE