Arguments
- df
Cohort data frame from
zhn_read_cohort().- remove_negative
Logical; drop
"negativ/kein Nachweis"entries (defaultTRUE).
Value
A data frame with one row per (patient, alteration) pair:
patient_label, diagnose_label, alteration, alteration_class,
alteration_raw, oncoprint_mutation. Empty input returns a 0-row
tibble with this column set.
Details
Splits the free-text mutation column into per-alteration rows, classifies
each entry via zhn_alteration_type(), and flags genuine mutations for
the oncoprint tile plot.
Unlike the legacy v5 implementation, this function does not call
shiny::validate() – packaged functions must work outside Shiny. If the
required source column is missing, the function raises a cli::cli_abort
so the server layer can wrap the message with validate(need(...)).