Rebuild a ContrastConfiguration from a list
Source:R/ContrastConfiguration.R
list_to_ContrastConfiguration.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
Examples
cfg <- ContrastConfiguration$new(
subject_id = "protein_Id",
contrast_col = "Bait",
pvalue_col = NA_character_
)
values <- R6_extract_values(cfg)
restored <- list_to_ContrastConfiguration(values)
stopifnot(all.equal(R6_extract_values(restored), values))
restored$has_pvalue()
#> [1] FALSE