FYRON / OPEN-SOURCE
Give research code a fireplace.
Install Fyron, explore the docs, and connect FHIR extraction, Curate screening, BOA handling, analysis, plotting, reporting, and provenance in one inspectable toolkit.
uv add fyron
Fyron is built for clinical teams who need code that can be read, reviewed, rerun, and defended. Most helpers accept familiar Python objects such as DataFrames, arrays, file paths, or explicit settings. They return structured tables, dictionaries, model objects, figures, or manifests that another person can inspect.
How To Use These Docs
| If you are... | Start with |
|---|---|
| trying Fyron for the first time | Getting Started |
| designing a clinical analysis pipeline | Workflow Guide |
| preparing a clinical AI study | Clinical AI Study Workflow |
| looking for runnable examples | Example Gallery |
| evaluating research trust and citation | Using Fyron In Research |
| running repeatable terminal jobs | Unified CLI |
| choosing the right module | Modules Overview |
| reviewing image folders | Fyron Curate |
| working with a live FHIR endpoint | FHIR REST |
| downloading imaging cohorts | DICOMDownloader |
| extracting BOA body-composition features | BOA Extraction |
| checking function arguments quickly | Function Reference |
Each module page explains what the module is for, when to use it, key parameters, return values, common pitfalls, and related modules. The function reference is intentionally dense and optimized for lookup while coding.
What Fyron Helps You Do
Acquire clinical dataFHIR REST/SQL, DICOMweb, documents, and local imaging inputs.
Define cohortsRule-based phenotypes, survival columns, cohort joins, and schema checks.
Prepare featuresMissingness, imputation, categorical encoding, leakage checks, and split balance.
Validate imagesNIfTI/DICOM QC, mask alignment, segmentation metrics, synthetic export, and DICOM SEG.
Extract BOA signalsBody composition, total segmentation features, radiomics, collages, and experimental aortic burden.
Analyze scientificallyDescriptive tables, statistical tests, effect sizes, bootstrapping, survival, and ML.
Validate modelsThresholds, calibration, subgroups, decision curves, survival validation, and external checks.
Publish clearlyKaplan-Meier, ROC/PR, calibration, boxplots, density, cohort flow, segmentation QC, and paper figures.
Try examplesSynthetic workflows for FHIR, BOA, plotting, statistics, DICOM SEG, and provenance.
Review image cohortsStart Curate locally, drop folders, reject images, and export clean accepted sets.
Run the CLIRepeatable extraction, imaging, BOA, DICOM SEG, and audit jobs from the terminal.
Choose colorsScientific palettes, paper styles, colorblind-safe defaults, and grayscale checks.
The Scientific Workflow
| Stage | Fyron modules | Output |
|---|---|---|
| Connect | fhir, dicom, documents, core | raw resources, files, tables |
| Structure | cohort, phenotyping, preprocessing | patient-level analysis tables |
| Extract | imaging, boa_extraction, boa_radiomics | imaging-derived feature tables |
| Analyze | descriptive, statistics, survival, ml, feature_selection | estimates, models, summaries |
| Validate | validation, explainability, imaging.segmentation | calibration, subgroup, segmentation, and external checks |
| Publish | plotting, reporting, audit, cli | figures, tables, manifests, repeatable runs |
A Minimal Clinical Pipeline
from fyron import FHIRRestClient, audit, ml, phenotyping, plotting, preprocessing, validation
from fyron.cohort import build_survival_columns, validate_cohort_table
client = FHIRRestClient("https://hapi.fhir.org/baseR4")
patients = client.search_df("Patient", params={"_count": 50}, max_pages=1)
cohort = build_survival_columns(
cohort,
start_col="diagnosis_date",
end_col="last_followup_or_event_date",
event_col="event",
)
validate_cohort_table(cohort, required_columns=["patient_id", "time", "event"])
case_flag = phenotyping.define_code_phenotype(
conditions,
code_col="code",
codes=["C34"],
patient_col="patient_id",
phenotype_name="lung_cancer",
)
imputer = preprocessing.fit_imputer(cohort, add_missing_indicators=True)
cohort_ready = preprocessing.apply_imputer(cohort, imputer)
km = plotting.plot_kaplan_meier(
cohort_ready,
duration_col="time",
event_col="event",
group_col="risk_group",
)
result = ml.run_classification_pipeline(
X,
y,
model="random_forest",
n_estimators=300,
random_state=42,
plot=True,
)
calibration, calibration_bins = validation.calibration_summary(y, result["y_prob"])
manifest = audit.create_provenance_manifest(
title="Minimal Fyron clinical pipeline",
parameters={"model": "random_forest", "random_state": 42},
)Start Here
- New to Fyron: read About Fyron, then Getting Started.
- Building a study: start with Workflow Guide and Modules Overview.
- Evaluating Fyron for research: read Using Fyron In Research, then try one synthetic workflow from the Example Gallery.
- Looking for a runnable demo: open the Example Gallery.
- Running repeatable jobs: use Unified CLI.
- Preparing image folders for review: start with Fyron Curate.
- Choosing palettes and styles: use Colors And Styles.
- Looking for a function quickly: open Function Reference or the Complete Function Reference.