reader-workbench 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reader_workbench/__init__.py +22 -0
- reader_workbench/__main__.py +4 -0
- reader_workbench/_version.py +17 -0
- reader_workbench/api/__init__.py +74 -0
- reader_workbench/api/_record_reads.py +75 -0
- reader_workbench/api/artifacts.py +79 -0
- reader_workbench/api/facade.py +538 -0
- reader_workbench/api/models.py +285 -0
- reader_workbench/api/notebooks.py +63 -0
- reader_workbench/contracts/__init__.py +18 -0
- reader_workbench/contracts/builtins/__init__.py +36 -0
- reader_workbench/contracts/builtins/cytometry.py +140 -0
- reader_workbench/contracts/builtins/four_state_event_window.py +214 -0
- reader_workbench/contracts/builtins/generic.py +21 -0
- reader_workbench/contracts/builtins/logic.py +149 -0
- reader_workbench/contracts/builtins/plate_reader.py +47 -0
- reader_workbench/contracts/catalog.py +257 -0
- reader_workbench/contracts/model.py +109 -0
- reader_workbench/domains/__init__.py +1 -0
- reader_workbench/domains/cytometry/__init__.py +3 -0
- reader_workbench/domains/cytometry/analysis/__init__.py +29 -0
- reader_workbench/domains/cytometry/analysis/events.py +182 -0
- reader_workbench/domains/cytometry/analysis/gating.py +175 -0
- reader_workbench/domains/cytometry/analysis/workflow.py +248 -0
- reader_workbench/domains/cytometry/io/__init__.py +3 -0
- reader_workbench/domains/cytometry/io/fcs.py +135 -0
- reader_workbench/domains/cytometry/plots/__init__.py +5 -0
- reader_workbench/domains/cytometry/plots/diagnostic.py +155 -0
- reader_workbench/domains/logic/__init__.py +3 -0
- reader_workbench/domains/logic/crosstalk/__init__.py +3 -0
- reader_workbench/domains/logic/crosstalk/pairs.py +661 -0
- reader_workbench/domains/logic/four_state_vector/__init__.py +7 -0
- reader_workbench/domains/logic/four_state_vector/builder.py +321 -0
- reader_workbench/domains/logic/four_state_vector/collection/__init__.py +20 -0
- reader_workbench/domains/logic/four_state_vector/collection/checks.py +49 -0
- reader_workbench/domains/logic/four_state_vector/collection/constants.py +29 -0
- reader_workbench/domains/logic/four_state_vector/collection/model.py +19 -0
- reader_workbench/domains/logic/four_state_vector/collection/render.py +383 -0
- reader_workbench/domains/logic/four_state_vector/collection/sources.py +185 -0
- reader_workbench/domains/logic/four_state_vector/config.py +214 -0
- reader_workbench/domains/logic/four_state_vector/diagnostic.py +361 -0
- reader_workbench/domains/logic/four_state_vector/heatmap.py +86 -0
- reader_workbench/domains/logic/four_state_vector/math.py +191 -0
- reader_workbench/domains/logic/four_state_vector/reference.py +85 -0
- reader_workbench/domains/logic/four_state_vector/selection.py +228 -0
- reader_workbench/domains/logic/four_state_vector/treatment_semantics.py +51 -0
- reader_workbench/domains/logic/four_state_vector/validation.py +19 -0
- reader_workbench/domains/logic/logic_symmetry/__init__.py +3 -0
- reader_workbench/domains/logic/logic_symmetry/encodings.py +93 -0
- reader_workbench/domains/logic/logic_symmetry/extract_corners.py +192 -0
- reader_workbench/domains/logic/logic_symmetry/main.py +236 -0
- reader_workbench/domains/logic/logic_symmetry/metrics.py +96 -0
- reader_workbench/domains/logic/logic_symmetry/overlay.py +129 -0
- reader_workbench/domains/logic/logic_symmetry/prep.py +138 -0
- reader_workbench/domains/logic/logic_symmetry/render.py +356 -0
- reader_workbench/domains/logic/treatment_columns.py +42 -0
- reader_workbench/domains/plate_reader/__init__.py +1 -0
- reader_workbench/domains/plate_reader/analysis/__init__.py +14 -0
- reader_workbench/domains/plate_reader/analysis/fold_change.py +474 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/__init__.py +21 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/aggregation.py +191 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/contract_fields.py +50 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/contracts.py +320 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/design_dispositions.py +54 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/disposition_records.py +140 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/event_sensitivity.py +27 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/materialize.py +274 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/observation_resampling.py +97 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/reduction.py +62 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/seeds.py +15 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/sources.py +308 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/well_exclusion_validation.py +94 -0
- reader_workbench/domains/plate_reader/analysis/four_state_event_window/well_exclusions.py +54 -0
- reader_workbench/domains/plate_reader/analysis/timepoints.py +76 -0
- reader_workbench/domains/plate_reader/io/__init__.py +6 -0
- reader_workbench/domains/plate_reader/io/sample_map.py +65 -0
- reader_workbench/domains/plate_reader/io/synergy_h1/__init__.py +6 -0
- reader_workbench/domains/plate_reader/io/synergy_h1/_kinetic.py +141 -0
- reader_workbench/domains/plate_reader/io/synergy_h1/_parser.py +295 -0
- reader_workbench/domains/plate_reader/io/synergy_h1/_shared.py +195 -0
- reader_workbench/domains/plate_reader/io/synergy_h1/_snapshot.py +130 -0
- reader_workbench/domains/plate_reader/ordering.py +59 -0
- reader_workbench/domains/plate_reader/plots/__init__.py +15 -0
- reader_workbench/domains/plate_reader/plots/_data.py +29 -0
- reader_workbench/domains/plate_reader/plots/common.py +346 -0
- reader_workbench/domains/plate_reader/plots/distributions.py +324 -0
- reader_workbench/domains/plate_reader/plots/dual_reporter_triptych.py +525 -0
- reader_workbench/domains/plate_reader/plots/dual_reporter_triptych_render.py +195 -0
- reader_workbench/domains/plate_reader/plots/four_state_event_window/__init__.py +26 -0
- reader_workbench/domains/plate_reader/plots/four_state_event_window/diagnostic.py +295 -0
- reader_workbench/domains/plate_reader/plots/four_state_event_window/diagnostic_components.py +149 -0
- reader_workbench/domains/plate_reader/plots/four_state_event_window/diagnostic_render.py +308 -0
- reader_workbench/domains/plate_reader/plots/four_state_event_window/diagnostic_style.py +51 -0
- reader_workbench/domains/plate_reader/plots/four_state_event_window/schema.py +8 -0
- reader_workbench/domains/plate_reader/plots/four_state_event_window/summary.py +140 -0
- reader_workbench/domains/plate_reader/plots/grouping.py +53 -0
- reader_workbench/domains/plate_reader/plots/panels/__init__.py +12 -0
- reader_workbench/domains/plate_reader/plots/panels/snapshot.py +161 -0
- reader_workbench/domains/plate_reader/plots/panels/snapshot_data.py +91 -0
- reader_workbench/domains/plate_reader/plots/panels/time_series.py +296 -0
- reader_workbench/domains/plate_reader/plots/single_reporter_diagnostic.py +435 -0
- reader_workbench/domains/plate_reader/plots/single_reporter_diagnostic_render.py +300 -0
- reader_workbench/domains/plate_reader/plots/snapshot_barplot/__init__.py +315 -0
- reader_workbench/domains/plate_reader/plots/snapshot_barplot/planning.py +168 -0
- reader_workbench/domains/plate_reader/plots/snapshot_heatmap/__init__.py +205 -0
- reader_workbench/domains/plate_reader/plots/snapshot_heatmap/inputs.py +103 -0
- reader_workbench/domains/plate_reader/plots/time_series.py +317 -0
- reader_workbench/domains/plate_reader/plots/ts_and_snap/__init__.py +479 -0
- reader_workbench/domains/plate_reader/plots/ts_and_snap/planning.py +283 -0
- reader_workbench/domains/time_series/__init__.py +29 -0
- reader_workbench/domains/time_series/aggregation.py +60 -0
- reader_workbench/domains/time_series/contracts.py +368 -0
- reader_workbench/domains/time_series/reduction.py +395 -0
- reader_workbench/errors.py +55 -0
- reader_workbench/maintenance/__init__.py +6 -0
- reader_workbench/maintenance/docs.py +335 -0
- reader_workbench/maintenance/model.py +28 -0
- reader_workbench/maintenance/release.py +39 -0
- reader_workbench/maintenance/skills.py +124 -0
- reader_workbench/plotting/__init__.py +20 -0
- reader_workbench/plotting/mpl.py +56 -0
- reader_workbench/plotting/sinks.py +69 -0
- reader_workbench/plotting/style.py +175 -0
- reader_workbench/plotting/utils.py +27 -0
- reader_workbench/plugins/__init__.py +1 -0
- reader_workbench/plugins/catalog.py +33 -0
- reader_workbench/plugins/export/__init__.py +0 -0
- reader_workbench/plugins/export/_paths.py +21 -0
- reader_workbench/plugins/export/csv.py +41 -0
- reader_workbench/plugins/export/xlsx.py +44 -0
- reader_workbench/plugins/ingest/__init__.py +0 -0
- reader_workbench/plugins/ingest/_discovery.py +58 -0
- reader_workbench/plugins/ingest/discovery_policy.py +66 -0
- reader_workbench/plugins/ingest/flow_cytometer.py +139 -0
- reader_workbench/plugins/ingest/synergy_h1.py +234 -0
- reader_workbench/plugins/manifests/__init__.py +1 -0
- reader_workbench/plugins/manifests/export.py +29 -0
- reader_workbench/plugins/manifests/ingest.py +29 -0
- reader_workbench/plugins/manifests/plot.py +161 -0
- reader_workbench/plugins/manifests/transform.py +172 -0
- reader_workbench/plugins/manifests/validator.py +18 -0
- reader_workbench/plugins/plot/__init__.py +0 -0
- reader_workbench/plugins/plot/_shared.py +55 -0
- reader_workbench/plugins/plot/cytometry_diagnostic.py +54 -0
- reader_workbench/plugins/plot/distributions.py +58 -0
- reader_workbench/plugins/plot/dual_reporter_triptych.py +224 -0
- reader_workbench/plugins/plot/four_state_event_window_diagnostic.py +133 -0
- reader_workbench/plugins/plot/four_state_event_window_summary.py +53 -0
- reader_workbench/plugins/plot/four_state_vector_collection.py +45 -0
- reader_workbench/plugins/plot/four_state_vector_diagnostic.py +105 -0
- reader_workbench/plugins/plot/four_state_vector_heatmap.py +63 -0
- reader_workbench/plugins/plot/logic_symmetry.py +56 -0
- reader_workbench/plugins/plot/single_reporter_diagnostic.py +279 -0
- reader_workbench/plugins/plot/snapshot_barplot.py +65 -0
- reader_workbench/plugins/plot/snapshot_heatmap.py +104 -0
- reader_workbench/plugins/plot/time_series.py +114 -0
- reader_workbench/plugins/plot/ts_and_snap.py +210 -0
- reader_workbench/plugins/transform/__init__.py +0 -0
- reader_workbench/plugins/transform/_four_state_vector.py +204 -0
- reader_workbench/plugins/transform/_labeling.py +109 -0
- reader_workbench/plugins/transform/alias.py +70 -0
- reader_workbench/plugins/transform/assay_labels.py +62 -0
- reader_workbench/plugins/transform/blank.py +79 -0
- reader_workbench/plugins/transform/crosstalk_pairs.py +180 -0
- reader_workbench/plugins/transform/cytometry_gating.py +120 -0
- reader_workbench/plugins/transform/fold_change.py +79 -0
- reader_workbench/plugins/transform/four_state_event_window.py +93 -0
- reader_workbench/plugins/transform/four_state_vector.py +62 -0
- reader_workbench/plugins/transform/four_state_vector_collection.py +41 -0
- reader_workbench/plugins/transform/logic_symmetry.py +67 -0
- reader_workbench/plugins/transform/outlier_filter.py +60 -0
- reader_workbench/plugins/transform/overflow.py +197 -0
- reader_workbench/plugins/transform/ratio.py +237 -0
- reader_workbench/plugins/transform/sample_map.py +170 -0
- reader_workbench/plugins/transform/sample_metadata.py +94 -0
- reader_workbench/plugins/validator/__init__.py +1 -0
- reader_workbench/plugins/validator/to_tidy_plus_map.py +155 -0
- reader_workbench/protocols/__init__.py +80 -0
- reader_workbench/protocols/_builtins_plate_reader_growth.py +179 -0
- reader_workbench/protocols/_builtins_plate_reader_variants.py +274 -0
- reader_workbench/protocols/builtins.py +1656 -0
- reader_workbench/protocols/compiler.py +22 -0
- reader_workbench/protocols/compilers/__init__.py +1 -0
- reader_workbench/protocols/compilers/common.py +100 -0
- reader_workbench/protocols/compilers/cytometry.py +87 -0
- reader_workbench/protocols/compilers/generic.py +14 -0
- reader_workbench/protocols/compilers/logic.py +245 -0
- reader_workbench/protocols/compilers/plate_reader.py +937 -0
- reader_workbench/protocols/compilers/plate_reader_pipeline.py +197 -0
- reader_workbench/protocols/model.py +1486 -0
- reader_workbench/protocols/semantic_coverage.py +234 -0
- reader_workbench/runtime/__init__.py +12 -0
- reader_workbench/runtime/builtin.py +23 -0
- reader_workbench/runtime/model.py +42 -0
- reader_workbench/workbench/__init__.py +60 -0
- reader_workbench/workbench/assets/__init__.py +22 -0
- reader_workbench/workbench/assets/types.py +118 -0
- reader_workbench/workbench/audit/__init__.py +5 -0
- reader_workbench/workbench/audit/experiments.py +307 -0
- reader_workbench/workbench/audit/staging.py +187 -0
- reader_workbench/workbench/cli/__init__.py +51 -0
- reader_workbench/workbench/cli/_lazy.py +9 -0
- reader_workbench/workbench/cli/_records_view.py +150 -0
- reader_workbench/workbench/cli/_surface_execution.py +443 -0
- reader_workbench/workbench/cli/audit.py +95 -0
- reader_workbench/workbench/cli/automation.py +229 -0
- reader_workbench/workbench/cli/demo.py +46 -0
- reader_workbench/workbench/cli/dop.py +91 -0
- reader_workbench/workbench/cli/experiments.py +635 -0
- reader_workbench/workbench/cli/helpers.py +232 -0
- reader_workbench/workbench/cli/main.py +59 -0
- reader_workbench/workbench/cli/maintenance.py +82 -0
- reader_workbench/workbench/cli/notebooks.py +260 -0
- reader_workbench/workbench/cli/pagination.py +117 -0
- reader_workbench/workbench/cli/protocols.py +336 -0
- reader_workbench/workbench/cli/shared.py +309 -0
- reader_workbench/workbench/cli/surfaces.py +534 -0
- reader_workbench/workbench/cli/verification.py +128 -0
- reader_workbench/workbench/commands.py +10 -0
- reader_workbench/workbench/config/__init__.py +47 -0
- reader_workbench/workbench/config/identity.py +13 -0
- reader_workbench/workbench/config/load.py +405 -0
- reader_workbench/workbench/config/model.py +274 -0
- reader_workbench/workbench/context.py +26 -0
- reader_workbench/workbench/decl/__init__.py +31 -0
- reader_workbench/workbench/decl/build.py +190 -0
- reader_workbench/workbench/decl/model.py +81 -0
- reader_workbench/workbench/dop/__init__.py +12 -0
- reader_workbench/workbench/dop/builtins.py +261 -0
- reader_workbench/workbench/dop/model.py +209 -0
- reader_workbench/workbench/engine/__init__.py +42 -0
- reader_workbench/workbench/engine/_shared.py +76 -0
- reader_workbench/workbench/engine/contracts.py +283 -0
- reader_workbench/workbench/engine/execution.py +326 -0
- reader_workbench/workbench/engine/file_outputs.py +260 -0
- reader_workbench/workbench/engine/inputs.py +161 -0
- reader_workbench/workbench/engine/invocations.py +507 -0
- reader_workbench/workbench/engine/planning.py +72 -0
- reader_workbench/workbench/engine/runtime.py +464 -0
- reader_workbench/workbench/engine/setup.py +149 -0
- reader_workbench/workbench/engine/validation.py +684 -0
- reader_workbench/workbench/experiment/__init__.py +47 -0
- reader_workbench/workbench/experiment/model.py +381 -0
- reader_workbench/workbench/experiments.py +133 -0
- reader_workbench/workbench/graph/__init__.py +47 -0
- reader_workbench/workbench/graph/nodes.py +102 -0
- reader_workbench/workbench/graph/normalize.py +177 -0
- reader_workbench/workbench/graph/refs.py +148 -0
- reader_workbench/workbench/input_discovery.py +19 -0
- reader_workbench/workbench/inspection/__init__.py +3 -0
- reader_workbench/workbench/inspection/catalogs.py +128 -0
- reader_workbench/workbench/inspection/common.py +92 -0
- reader_workbench/workbench/inspection/dop.py +64 -0
- reader_workbench/workbench/inspection/experiments.py +449 -0
- reader_workbench/workbench/inspection/inventory.py +68 -0
- reader_workbench/workbench/inspection/protocols.py +368 -0
- reader_workbench/workbench/inspection/readiness.py +333 -0
- reader_workbench/workbench/inspection/reports.py +367 -0
- reader_workbench/workbench/inspection/results.py +166 -0
- reader_workbench/workbench/inspection/runtime.py +287 -0
- reader_workbench/workbench/inspection/semantics.py +192 -0
- reader_workbench/workbench/inspection/validation.py +30 -0
- reader_workbench/workbench/notebooks/__init__.py +17 -0
- reader_workbench/workbench/notebooks/_launch_registry.py +112 -0
- reader_workbench/workbench/notebooks/_launch_runtime.py +104 -0
- reader_workbench/workbench/notebooks/components/__init__.py +21 -0
- reader_workbench/workbench/notebooks/components/deliverables.py +403 -0
- reader_workbench/workbench/notebooks/components/overview.py +119 -0
- reader_workbench/workbench/notebooks/eda.marimo.py.txt +153 -0
- reader_workbench/workbench/notebooks/launch.py +274 -0
- reader_workbench/workbench/notebooks/presentation.py +136 -0
- reader_workbench/workbench/notebooks/scaffold.py +60 -0
- reader_workbench/workbench/ontology.py +78 -0
- reader_workbench/workbench/paths.py +44 -0
- reader_workbench/workbench/ports/__init__.py +31 -0
- reader_workbench/workbench/ports/model.py +168 -0
- reader_workbench/workbench/records/__init__.py +44 -0
- reader_workbench/workbench/records/epoch.py +329 -0
- reader_workbench/workbench/records/evidence.py +247 -0
- reader_workbench/workbench/records/identity.py +87 -0
- reader_workbench/workbench/records/locking.py +185 -0
- reader_workbench/workbench/records/model.py +711 -0
- reader_workbench/workbench/records/sources.py +73 -0
- reader_workbench/workbench/records/store.py +1022 -0
- reader_workbench/workbench/records/verification.py +998 -0
- reader_workbench/workbench/registry.py +333 -0
- reader_workbench/workbench/spec_overrides.py +215 -0
- reader_workbench-1.0.0.dist-info/METADATA +91 -0
- reader_workbench-1.0.0.dist-info/RECORD +293 -0
- reader_workbench-1.0.0.dist-info/WHEEL +5 -0
- reader_workbench-1.0.0.dist-info/entry_points.txt +2 -0
- reader_workbench-1.0.0.dist-info/licenses/LICENSE +21 -0
- reader_workbench-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from reader_workbench.workbench.decl.model import PluginStepDecl, RecordInputDecl, RecordOutputDecl, ResourceInputDecl
|
|
6
|
+
|
|
7
|
+
from .common import _deep_merge, _step
|
|
8
|
+
|
|
9
|
+
SYNERGY_H1_INGEST_RECIPE_ID = "plate_reader/synergy_h1"
|
|
10
|
+
DUAL_REPORTER_BASE_RECIPE_ID = "plate_reader/dual_reporter_screen_base"
|
|
11
|
+
SINGLE_REPORTER_BASE_RECIPE_ID = "plate_reader/single_reporter_screen_base"
|
|
12
|
+
GROWTH_BASE_RECIPE_ID = "plate_reader/growth_screen_base"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def compose_dual_reporter_pipeline(
|
|
16
|
+
*,
|
|
17
|
+
ingest_channels: list[str],
|
|
18
|
+
blank_config: dict[str, Any],
|
|
19
|
+
overflow_config: dict[str, Any],
|
|
20
|
+
) -> tuple[PluginStepDecl, ...]:
|
|
21
|
+
return (
|
|
22
|
+
_step(
|
|
23
|
+
id="ingest",
|
|
24
|
+
plugin="ingest/synergy_h1",
|
|
25
|
+
with_={"channels": ingest_channels},
|
|
26
|
+
source_recipe=SYNERGY_H1_INGEST_RECIPE_ID,
|
|
27
|
+
),
|
|
28
|
+
*_sample_map_and_preprocessing_steps(
|
|
29
|
+
blank_config=blank_config,
|
|
30
|
+
overflow_config=overflow_config,
|
|
31
|
+
source_recipe=DUAL_REPORTER_BASE_RECIPE_ID,
|
|
32
|
+
),
|
|
33
|
+
_step(
|
|
34
|
+
id="ratio_yfp_cfp",
|
|
35
|
+
plugin="transform/ratio",
|
|
36
|
+
reads={"df": RecordInputDecl(record_id="overflow/df")},
|
|
37
|
+
with_={"name": "YFP/CFP", "numerator": "YFP", "denominator": "CFP"},
|
|
38
|
+
source_recipe=DUAL_REPORTER_BASE_RECIPE_ID,
|
|
39
|
+
),
|
|
40
|
+
_step(
|
|
41
|
+
id="ratio_cfp_od600",
|
|
42
|
+
plugin="transform/ratio",
|
|
43
|
+
reads={"df": RecordInputDecl(record_id="ratio_yfp_cfp/df")},
|
|
44
|
+
with_={"name": "CFP/OD600", "numerator": "CFP", "denominator": "OD600"},
|
|
45
|
+
source_recipe=DUAL_REPORTER_BASE_RECIPE_ID,
|
|
46
|
+
),
|
|
47
|
+
_step(
|
|
48
|
+
id="ratio_yfp_od600",
|
|
49
|
+
plugin="transform/ratio",
|
|
50
|
+
reads={"df": RecordInputDecl(record_id="ratio_cfp_od600/df")},
|
|
51
|
+
with_={"name": "YFP/OD600", "numerator": "YFP", "denominator": "OD600"},
|
|
52
|
+
source_recipe=DUAL_REPORTER_BASE_RECIPE_ID,
|
|
53
|
+
),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def compose_single_reporter_pipeline(
|
|
58
|
+
*,
|
|
59
|
+
ingest_channels: list[str],
|
|
60
|
+
reporter_channel: str,
|
|
61
|
+
normalizer_channel: str,
|
|
62
|
+
blank_config: dict[str, Any],
|
|
63
|
+
overflow_config: dict[str, Any],
|
|
64
|
+
) -> tuple[PluginStepDecl, ...]:
|
|
65
|
+
ratio_name = f"{reporter_channel}/{normalizer_channel}"
|
|
66
|
+
recipe_arguments = {
|
|
67
|
+
"reporter_channel": reporter_channel,
|
|
68
|
+
"normalizer_channel": normalizer_channel,
|
|
69
|
+
}
|
|
70
|
+
return (
|
|
71
|
+
_step(
|
|
72
|
+
id="ingest",
|
|
73
|
+
plugin="ingest/synergy_h1",
|
|
74
|
+
with_={"channels": ingest_channels},
|
|
75
|
+
source_recipe=SYNERGY_H1_INGEST_RECIPE_ID,
|
|
76
|
+
),
|
|
77
|
+
*_sample_map_and_preprocessing_steps(
|
|
78
|
+
blank_config=blank_config,
|
|
79
|
+
overflow_config=overflow_config,
|
|
80
|
+
source_recipe=SINGLE_REPORTER_BASE_RECIPE_ID,
|
|
81
|
+
recipe_arguments=recipe_arguments,
|
|
82
|
+
),
|
|
83
|
+
_step(
|
|
84
|
+
id="ratio_reporter_normalizer",
|
|
85
|
+
plugin="transform/ratio",
|
|
86
|
+
reads={"df": RecordInputDecl(record_id="overflow/df")},
|
|
87
|
+
with_={
|
|
88
|
+
"name": ratio_name,
|
|
89
|
+
"numerator": reporter_channel,
|
|
90
|
+
"denominator": normalizer_channel,
|
|
91
|
+
},
|
|
92
|
+
source_recipe=SINGLE_REPORTER_BASE_RECIPE_ID,
|
|
93
|
+
source_recipe_with=recipe_arguments,
|
|
94
|
+
),
|
|
95
|
+
_step(
|
|
96
|
+
id="sample_measurements",
|
|
97
|
+
plugin="validator/to_tidy_plus_map",
|
|
98
|
+
reads={"df": RecordInputDecl(record_id="ratio_reporter_normalizer/df")},
|
|
99
|
+
with_={
|
|
100
|
+
"include_types": ["SAMPLE"],
|
|
101
|
+
"require_columns": ["treatment", "design_id"],
|
|
102
|
+
"require_non_null": True,
|
|
103
|
+
"trim_and_require_non_blank": ["treatment", "design_id"],
|
|
104
|
+
"require_finite": ["time", "value"],
|
|
105
|
+
},
|
|
106
|
+
writes={"df": RecordOutputDecl(record_id="sample_measurements/df")},
|
|
107
|
+
source_recipe=SINGLE_REPORTER_BASE_RECIPE_ID,
|
|
108
|
+
source_recipe_with=recipe_arguments,
|
|
109
|
+
),
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def compose_growth_pipeline(
|
|
114
|
+
*,
|
|
115
|
+
ingest_channels: list[str],
|
|
116
|
+
growth_channel: str,
|
|
117
|
+
blank_config: dict[str, Any],
|
|
118
|
+
overflow_config: dict[str, Any],
|
|
119
|
+
) -> tuple[PluginStepDecl, ...]:
|
|
120
|
+
"""Compose a plate-reader pipeline that preserves one growth channel."""
|
|
121
|
+
|
|
122
|
+
recipe_arguments = {"growth_channel": growth_channel}
|
|
123
|
+
return (
|
|
124
|
+
_step(
|
|
125
|
+
id="ingest",
|
|
126
|
+
plugin="ingest/synergy_h1",
|
|
127
|
+
with_={"channels": ingest_channels},
|
|
128
|
+
source_recipe=SYNERGY_H1_INGEST_RECIPE_ID,
|
|
129
|
+
),
|
|
130
|
+
*_sample_map_and_preprocessing_steps(
|
|
131
|
+
blank_config=blank_config,
|
|
132
|
+
overflow_config=overflow_config,
|
|
133
|
+
source_recipe=GROWTH_BASE_RECIPE_ID,
|
|
134
|
+
recipe_arguments=recipe_arguments,
|
|
135
|
+
),
|
|
136
|
+
_step(
|
|
137
|
+
id="sample_measurements",
|
|
138
|
+
plugin="validator/to_tidy_plus_map",
|
|
139
|
+
reads={"df": RecordInputDecl(record_id="overflow/df")},
|
|
140
|
+
with_={
|
|
141
|
+
"include_types": ["SAMPLE"],
|
|
142
|
+
"require_columns": ["treatment", "design_id"],
|
|
143
|
+
"require_non_null": True,
|
|
144
|
+
"trim_and_require_non_blank": ["treatment", "design_id"],
|
|
145
|
+
"require_finite": ["time", "value"],
|
|
146
|
+
"allow_instrument_overflow": ["value"],
|
|
147
|
+
},
|
|
148
|
+
writes={"df": RecordOutputDecl(record_id="sample_measurements/df")},
|
|
149
|
+
source_recipe=GROWTH_BASE_RECIPE_ID,
|
|
150
|
+
source_recipe_with=recipe_arguments,
|
|
151
|
+
),
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def _sample_map_and_preprocessing_steps(
|
|
156
|
+
*,
|
|
157
|
+
blank_config: dict[str, Any],
|
|
158
|
+
overflow_config: dict[str, Any],
|
|
159
|
+
source_recipe: str,
|
|
160
|
+
recipe_arguments: dict[str, Any] | None = None,
|
|
161
|
+
) -> tuple[PluginStepDecl, ...]:
|
|
162
|
+
source_recipe_with = dict(recipe_arguments or {})
|
|
163
|
+
return (
|
|
164
|
+
_step(
|
|
165
|
+
id="merge_map",
|
|
166
|
+
plugin="transform/sample_map",
|
|
167
|
+
reads={
|
|
168
|
+
"df": RecordInputDecl(record_id="ingest/df"),
|
|
169
|
+
"sample_map": ResourceInputDecl(resource_id="sample_map"),
|
|
170
|
+
},
|
|
171
|
+
source_recipe=source_recipe,
|
|
172
|
+
source_recipe_with=source_recipe_with,
|
|
173
|
+
),
|
|
174
|
+
_step(
|
|
175
|
+
id="labels",
|
|
176
|
+
plugin="transform/assay_labels",
|
|
177
|
+
reads={"df": RecordInputDecl(record_id="merge_map/df")},
|
|
178
|
+
source_recipe=source_recipe,
|
|
179
|
+
source_recipe_with=source_recipe_with,
|
|
180
|
+
),
|
|
181
|
+
_step(
|
|
182
|
+
id="blank",
|
|
183
|
+
plugin="transform/blank_correction",
|
|
184
|
+
reads={"df": RecordInputDecl(record_id="labels/df")},
|
|
185
|
+
with_=_deep_merge(blank_config),
|
|
186
|
+
source_recipe=source_recipe,
|
|
187
|
+
source_recipe_with=source_recipe_with,
|
|
188
|
+
),
|
|
189
|
+
_step(
|
|
190
|
+
id="overflow",
|
|
191
|
+
plugin="transform/overflow_handling",
|
|
192
|
+
reads={"df": RecordInputDecl(record_id="blank/df")},
|
|
193
|
+
with_=_deep_merge(overflow_config),
|
|
194
|
+
source_recipe=source_recipe,
|
|
195
|
+
source_recipe_with=source_recipe_with,
|
|
196
|
+
),
|
|
197
|
+
)
|