gptomics/bioskills/longitudinal-monitoring
Claude Code and agent skill by gptomics/bioskills
- community
Checking that the SKILL.md file is still in the repository.
Tracks ctDNA across serial liquid-biopsy timepoints for molecular residual disease (MRD) and treatment-response monitoring, treating MRD as a binary integrated detection call across the patient's full variant set (with a defined LoD95 and per-sample specificity) rather than a per-timepoint VAF threshold, and handling undetectable samples as left-censored at the per-sample limit of detection rather than true zeros. Covers tumor-informed bespoke vs tumor-naive design, landmark vs surveillance sampling, molecular-response definitions and their non-standardization, censoring-aware clearance kinetics, and the multiple-testing structure of repeated surveillance. Use when monitoring ctDNA during therapy, calling molecular relapse before imaging, or estimating clearance half-life from serial samples.
Install
npx vskill@latest install gptomics/bioskills/longitudinal-monitoringSKILL.md
Version Compatibility
Reference examples tested with: numpy 1.26+, pandas 2.2+, scipy 1.12+, matplotlib 3.8+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Notes specific to this skill: this skill is statistical, not tool-bound. The hard parts are interpretive (left-censoring, multiple testing, lead-time bias), not API calls. scipy.stats.linregress returns a named tuple whose .slope/.pvalue attributes are stable across recent versions; the censoring-aware fit below uses only linregress on the uncensored decay phase plus a manual interval check, so version drift is low-risk.
Longitudinal Monitoring
"Track ctDNA over this course of treatment" -> Integrate serial plasma measurements into a binary detected/not-detected trajectory plus censoring-aware burden kinetics for MRD and response monitoring.
- Python:
pandasfor the per-timepoint table,scipy.statsfor censoring-aware decay/trend,matplotlibfor log-scale trajectory plots
The Single Most Important Modern Insight -- MRD is a binary integrated detection call, and "undetectable" is left-censored, not zero
A tumor-informed MRD assay does not ask "is the VAF at locus X above a threshold?" It integrates signal across the patient's entire personal variant set (16 to 500+ loci) into ONE detected/not-detected call with a defined LoD95 (the tumor fraction detected 95% of the time at a given input) and a per-sample specificity. Signal invisible at any single 0.001%-VAF locus becomes significant when summed across hundreds of loci against a modeled error background; this is why bespoke assays reach 10^-4 to 10^-6 tumor fraction. The detected/not-detected call is the unit of analysis -- per-locus VAF is plumbing, not the readout. Re-deriving a per-timepoint "VAF < X" cutoff throws away the multi-locus integration that makes MRD work and inflates false positives from a single noisy locus.
The second half of the insight: an "undetectable" result is conditional on how many genome-equivalents were interrogated. VAF=0 is LEFT-CENSORED at the per-sample LoD, not a true zero. A 10 mL tube yields roughly 50 ng cfDNA, around 15,000 haploid genome-equivalents; at 0.01% tumor fraction that is roughly 1.5 expected tumor molecules, squarely in the Poisson-limited regime (lambda < 3) where detection is stochastic. "Undetectable" at a low-input draw may simply mean the assay could not have seen the burden it saw at a higher-input draw. Every undetectable must carry its per-sample LoD; plugging 0 into a log-fit or fold-change biases everything and log(0) breaks the fit outright.
Design Decision: tumor-informed vs tumor-naive, landmark vs surveillance
| Axis | Tumor-informed bespoke | Tumor-naive (fixed panel) | |
|---|---|---|---|
| Variant set | Patient-specific, designed from tumor/normal WES/WGS | Fixed gene panel, identical across patients | |
| Examples | Signatera (16 SNVs, Reinert 2019), RaDaR (up to ~48 amplicons), INVAR (hundreds-thousands of loci, Wan 2020) | Broad cfDNA panels, sWGS | |
| MRD sensitivity | Very high (10^-4 to 10^-6 TF); LoD scales with #loci x input | Lower for MRD; few loci per region | |
| Needs tumor tissue | Yes (design step, weeks of turnaround) | No (tissue-free, faster) | |
| CHIP confounding | Low (tracks known tumor somatic variants) | High (de novo calls include clonal hematopoiesis) | |
| Best use | Defined-burden MRD/surveillance after curative intent | No tissue available, or broad genotyping in metastatic disease |
| Scenario | Recommended | Why | |
|---|---|---|---|
| Post-curative-intent MRD / recurrence surveillance | Tumor-informed bespoke, binary call | Reaches ppm LoD by integrating across the personal variant set; CHIP-resistant | |
| No tissue available, metastatic response monitoring | Tumor-naive panel, track aggregated burden | Tissue-free and immediate; accept higher LoD and mandatory CHIP control | |
| Post-surgical landmark (single decisive timepoint) | One draw at ~2-10 weeks post-op | Avoids the surgical cfDNA surge; conventional Week 4 default | |
| Serial surveillance over months-years | Trend over >=2 consecutive draws, confirm before acting | Each draw is another false-positive opportunity (multiple testing) | |
| Defining "molecular response" | Use the assay's own validated cutoff; do not import "2-log" or "90%" blindly | Cutoffs are non-harmonized across assays (see below) |
Methodology evolves: verify the current best practice and the assay's validated definitions against the latest tool/vendor documentation before fixing any threshold in code.
ctDNA Kinetics Biology -- why timing and shedding gate interpretation
ctDNA has a plasma half-life of roughly 2 h (114 min, Diehl 2008); broader literature spans ~16 min to 2.5 h. This fast turnover is the entire reason serial monitoring works: plasma concentration tracks CURRENT tumor flux, not a weeks-old average, while imaging tumor volume lags. The same fast clearance makes landmark timing fragile. Surgery dumps a transient cfDNA surge into plasma (tissue trauma, wound healing, neutrophil extracellular traps) that dilutes tumor fraction and can transiently raise total cfDNA. Drawing at post-op day 1-3 reads this surge, not residual disease; the conventional landmark window is ~2-10 weeks (Week 4 a frequent default). A clearance fit that includes a post-op surge point mis-estimates the half-life.
Shedding is not uniform. "ctDNA-negative" does NOT equal "disease-free": some early lung adenocarcinomas and indolent/low-volume tumors shed below detectable thresholds, and brain metastases behind the blood-brain barrier shed poorly into plasma (CSF is the better CNS compartment). A patient can have radiographic progression with clean plasma. Negativity has high negative predictive value for relapse in shedding tumors but is never a guarantee -- imaging stays mandatory for low/non-shedders and sanctuary sites.
Molecular-Response Definitions -- and the non-standardization caveat
| Term | Representative operationalization | Caveat | |
|---|---|---|---|
| Molecular response (MR) | >= 90% drop (ctMoniTR-style) or >= 2-log/100x (immuno/heme heritage) from baseline | 2-log and 90% are different magnitudes; cutoff is study/assay-specific | |
| Molecular complete response (mCR) | ctDNA becomes undetectable | "Undetectable" is LoD-conditional, not zero | |
| ctDNA clearance | Sustained detectable -> undetectable | Depends on input/depth of the clearing draw; confirm with re-draw | |
| Molecular progression / relapse | Confirmed re-detection or rise-from-nadir | Require trend over >=2 draws (multiple testing) |
These definitions are NOT harmonized. "2-log reduction," "90% reduction," and "molecular complete response" are assay- and study-dependent, not interchangeable. The Friends of Cancer Research ctMoniTR project is the field's standardization attempt (pooling ctDNA-change data across NSCLC immunotherapy studies to validate ctDNA change as an intermediate endpoint), not a settled standard. The FDA ctDNA guidance for curative-intent solid-tumor drug development was issued as a draft in May 2022 and finalized in November 2024; it endorses ctDNA for patient selection, MRD-based enrichment, and as a measure of response, but does NOT yet endorse ctDNA change as a validated surrogate endpoint for DFS/EFS/OS. Code should accept the assay's own validated cutoff rather than baking one in.
Clinical Evidence and Lead Time
ctDNA MRD predicts relapse months before imaging across tumor types: breast median ~8 mo (Garcia-Murillas 2015), NSCLC median ~5.2 mo (Chaudhuri 2017), CRC mean ~8.7 mo (Reinert 2019); TRACERx phylogenetic ctDNA tracks clonal evolution and metastatic seeding (Abbosh 2017, 2023). The interventional landmark is DYNAMIC (Tie 2022): a ctDNA-guided strategy in stage II colon cancer reduced adjuvant chemotherapy use (15% vs 28%) without compromising 2-year recurrence-free survival, proving an MRD-negative call can justify de-escalation. Caveat -- lead-time bias: "ctDNA detects relapse N months before imaging" is a real analytic-sensitivity advantage, but measuring survival from molecular detection vs clinical detection merely moves the clock back and inflates apparent survival. Demonstrating clinical utility (that acting on the earlier signal improves outcomes) requires an interventional design like DYNAMIC, not earlier detection alone. Flag lead-time bias wherever lead time is reported.
Tumor-Fraction Trend with Baseline and Nadir
Goal: Summarize a serial trajectory into baseline, nadir, and baseline-referenced change, with below-LoD points marked as censored, not zero.
Approach: Sort by time, carry a per-sample LoD column, flag any point at-or-below its LoD as left-censored, and compute log-fold change from baseline only on the uncensored estimates (substituting the LoD bound, never 0, for censored points).
Mutation Tracking and Censoring-Aware Clearance Kinetics
Goal: Pivot per-mutation VAF over time and estimate a clearance half-life only over the genuine decay phase, treating below-LoD timepoints as censored.
Approach: Build a timepoint-by-mutation pivot, mark cleared loci as below-LoD (not missing-equals-zero), then fit ln(VAF) ~ time by OLS over the monotonic-decay phase only, excluding the surgical-surge point, any post-nadir rebound, and all censored points; half-life = ln(2)/(-slope).
Molecular-Relapse Calling
Goal: Call molecular relapse from confirmed re-detection or sustained rise-from-nadir, not a single excursion.
Approach: Find the nadir, then require detection (above per-sample LoD) on >=2 consecutive post-nadir draws, or a rise above an assay-defined margin above nadir confirmed on a re-draw; annotate every call with the draw's per-sample LoD so a low-LoD draw is not mistaken for new biology.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingliquid-biopsy/longitudinal-monitoring/SKILL.md
Popularity
- Repository stars
- 374
- Repository forks
- 56
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/gptomics/bioskills/longitudinal-monitoring)