Skip to contents

Creates one validated row per marker. Signal policies make the selected compartment, statistic, fallback and minimum usable value explicit.

Usage

cs_signal_policy(
  marker,
  compartment = "cell",
  statistic = "mean",
  fallback_compartment = NA_character_,
  min_value = 0,
  preferred_domain = "minimum",
  fallback_domain = "minimum"
)

Arguments

marker

Character vector of unique marker names.

compartment

Preferred compartment for each marker. A single value is recycled across marker.

statistic

Intensity statistic for each marker. A single value is recycled across marker.

fallback_compartment

Optional fallback compartment for each marker; NA disables fallback. A single value is recycled across marker.

min_value

Minimum usable value for each marker. Values below this threshold are unavailable. A single value is recycled across marker.

preferred_domain, fallback_domain

Usability domain for each branch: "minimum" requires a finite value at least min_value; "finite" accepts any finite value, including negatives, without applying the minimum. A plain character scalar is recycled across markers.

Value

A data frame with class cs_signal_policy and columns marker, compartment, statistic, fallback_compartment and min_value. Non-default domains append preferred_domain and fallback_domain. Default policies retain the original five-column representation.

Examples

cs_signal_policy(
  marker = c("PanCK", "FOXP3"),
  compartment = c("cytoplasm", "nucleus"),
  fallback_compartment = "cell"
)
#>   marker compartment statistic fallback_compartment min_value
#> 1  PanCK   cytoplasm      mean                 cell         0
#> 2  FOXP3     nucleus      mean                 cell         0