Lifelines kaplan meier starter
Skill ma-compbio-lab/SkillFoundry/skills/clinical-biomedical-data-science/lifelines-kaplan-meier-starter
A framework for discovering, compiling, and validating reusable skills for scientific agents.From the repository description
npx -y skills add ma-compbio-lab/SkillFoundry --skill lifelines-kaplan-meier-starterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- runs commandsInstructs the agent to run 3 commands, including `slurm/envs/statistics/bin/python skills/clinical-biomedical-data-science/lifelines-kaplan-meier-starter/scripts/run_lifelines_kaplan_meier.py` and 2 more.
SKILL.md
1.2 KB, 307 tokens by cl100k_base, as published. Nobody here has run it
Lifelines Kaplan Meier Starter
Use this skill to run a deterministic Kaplan-Meier survival analysis over a toy cohort and summarize per-group survival curves.
What it does
- Loads a tiny cohort table with durations, events, and group labels.
- Fits one Kaplan-Meier curve per group with
lifelines. - Returns compact JSON with median survival times and survival probabilities at fixed time points.
- Optionally renders a PNG survival plot.
When to use it
- You need a local starter for survival-analysis workflows.
- You want a verified template for grouped time-to-event data in Python.
Example
slurm/envs/statistics/bin/python skills/clinical-biomedical-data-science/lifelines-kaplan-meier-starter/scripts/run_lifelines_kaplan_meier.py \
--input skills/clinical-biomedical-data-science/lifelines-kaplan-meier-starter/examples/toy_survival_cohort.tsv \
--summary-out scratch/lifelines/kaplan_meier_summary.json \
--png-out scratch/lifelines/kaplan_meier_plot.png
Verification
- Skill-local tests:
python3 -m unittest discover -s skills/clinical-biomedical-data-science/lifelines-kaplan-meier-starter/tests -p 'test_*.py' - Repository smoke:
python3 -m unittest tests.smoke.test_phase25_agent_and_clinical_skills -v
What ships with it: 7 files
7.5 KB alongside SKILL.md, 2 of them executable
assets/
- README.md101 B
examples/
- README.md105 B
- toy_survival_cohort.tsv97 B
scripts/
- run_lifelines_kaplan_meier.pyruns3.5 KB
tests/
- test_run_lifelines_kaplan_meier.pyruns2.3 KB
- metadata.yaml1.3 KB
- refs.md85 B