v1
biomarker_tabulation step v1.
Module
Submodules
- bitfount.steps.biomarker_tabulation.v1.config - Config for the biomarker_tabulation step (v1).
- bitfount.steps.biomarker_tabulation.v1.result - Result for the biomarker_tabulation step (v1).
- bitfount.steps.biomarker_tabulation.v1.task - Prefect task tabulating the four Granite metric caches into a csv_report_df.
Functions
task_fn
def task_fn( datasource: BaseSource, config: BiomarkerTabulationConfig, ga_metrics: CacheAccessor, fluid_metrics: CacheAccessor, cst_metrics: CacheAccessor, gcc_metrics: CacheAccessor, filenames: list[str],) ‑> BiomarkerTabulationResult:Merge, derive and filter the four metric caches into a csv_report_df.
Arguments
datasource: The datasource (unused directly; the cache rows are already keyed by the datasource filenames).config: Selection config (biomarker_groups/biomarker_names).ga_metrics: Cache accessor for the backgroundga_calculationstep.fluid_metrics: Cache accessor for the backgroundfluid_calculationstep.cst_metrics: Cache accessor for the backgroundcst_calculationstep.gcc_metrics: Cache accessor for the backgroundgcc_calculationstep.filenames: The selected filenames; every one is guaranteed a row (as an all-NA row when a calculation skipped/failed the file), mirroring the v8 protocol's_fill_missing_metricsbackfill.
Returns
BiomarkerTabulationResult carrying the tabulated csv_report_df with
TECHNICAL column names plus the filename column.
Classes
Config
class Config(**data: Any):Config selecting which biomarker columns land in the CSV report.
The filter operates on the TECHNICAL (internal) column names; display
renaming happens downstream in the csv_report step. There is deliberately
no rename_columns field here.
Arguments
biomarker_groups: Biomarker group names to include (empty ⇒ all groups).biomarker_names: Individual technical column names to include (empty ⇒ none beyond the selected groups).
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Variables
- static
biomarker_groups : list[str]
- static
biomarker_names : list[str]
- static
model_config
Result
class Result(**data: Any):Container for the tabulated biomarker csv_report_df.
The DataFrame keeps TECHNICAL column names plus the filename column, so the
downstream csv_report step can merge it onto freshly-read source data and
apply display renaming.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be
validated to form a valid model.
self is explicitly positional-only to allow self as a field name.