Pipeline triage
Diagnose a failed bioinformatics pipeline run and propose the fix. Use whenever a job, script, or workflow step has failed, errored, crashed, or produced no/empty output — SLURM/PBS job failures, non-zero exit codes, tool stderr, killed jobs, truncated or missing output files. Triggers on "the run died", "job failed", "OOM", "killed", "exit code", "this errored", "no output", "empty BAM/VCF", "segfault", "why did this crash", or a pasted log/stack trace from samtools, bcftools, GATK, bwa, STAR, salmon, Nextflow, Snakemake, or a SLURM/PBS scheduler. Reads logs and context, names the most likely root cause, and drafts the corrected command — it does NOT resubmit, delete, or run anything on its own.From its SKILL.md
npx -y skills add JacobAFW/bio-skills --skill pipeline-triageAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.8 KB, as published. Nobody here has run it
pipeline-triage
A failed run is a detective job, not a metrics job. No mature tool reads a SLURM log plus a samtools stderr plus an exit code and tells you why it died and what to change. That's this skill.
What it does
Given the evidence from a failed run, it:
- Gathers context (see Inputs).
- Walks the diagnostic ladder and stops at the first cause that fits.
- Returns a single most-likely root cause, the evidence for it, and a drafted fix (the corrected command / config change / resubmission flags).
- Lists secondary suspects only if the top call is genuinely ambiguous.
It proposes. It never resubmits, deletes, moves, or overwrites anything.
Scheduler-aware
First, detect the scheduler from the evidence and use its idioms — don't assume SLURM. The diagnostic logic below is identical across schedulers; only the signals and the drafted commands change.
| SLURM | PBS / Torque | SGE | LSF | |
|---|---|---|---|---|
| submit / resubmit | sbatch | qsub | qsub | bsub |
| inspect a job | sacct, seff | qstat -f, tracejob | qacct | bjobs -l, bhist |
| request memory | --mem | -l mem= / -l pmem= | -l h_vmem= | -M / -R rusage[mem=] |
| request walltime | --time | -l walltime= | -l h_rt= | -W |
| log file | slurm-<id>.out | <job>.o<id> / .e<id> | <job>.o<id> | <job>.out |
| OOM signal | oom_kill, exit 137 | PBS: job killed: mem ... exceeded, exit 137 | h_vmem exceeded | TERM_MEMLIMIT |
| walltime signal | TIMEOUT, exit 140 | walltime ... exceeded | h_rt exceeded | TERM_RUNLIMIT |
If the scheduler can't be told from the evidence, say so and ask, rather than defaulting to SLURM commands the user can't run.
Inputs (gather what's available, don't demand all of it)
- The error itself: stderr, scheduler log (SLURM
slurm-<id>.out/.err, PBS<job>.o<id>/.e<id>, etc.), exit code, and any post-mortem (seff/sacct,qstat -f/tracejob,bjobs -l) if present. - The command that was run, and the submission script (resources requested).
- File context for the inputs/outputs involved: do they exist, are they non-empty,
is the expected index present (
.bai,.fai,.tbi,.csi), are reference and reads on the same build/contig naming. - Tool + version, if recoverable.
If a critical piece is missing, name the one thing to paste — don't guess past it.
Diagnostic ladder
Stop at the first rung that explains the evidence.
- Resource kill. OOM (
oom_kill/Killed/exit 137, or PBS "mem ... exceeded", LSFTERM_MEMLIMIT) or walltime overrun (TIMEOUT/exit 140, PBS "walltime ... exceeded"). → Right-size the memory/walltime request in the detected scheduler's syntax, and suggest array chunking or a streaming flag if the input is large. - Missing / stale index or input. "could not load index", "fail to open",
absent
.fai/.bai/.tbi, zero-byte input, partial download. → Rebuild the index or re-stage the input; flag if the index is older than the file it indexes. - Reference / contig mismatch.
chr1vs1,chrMvsMT, hg19 vs hg38, "contig not found in header", "sequence not found", coordinate beyond contig length. → Identify the mismatched pair and draft the rename/liftover, not a blind rerun. (See the build-harmonisation pattern — this is the silent-killer class.) - Version / API drift. "unrecognized argument", "unexpected keyword", a flag that moved between tool versions, container tag vs lockfile drift. → Pin the version or translate the flag to the installed version.
- Format / content violation. Malformed FASTQ pairing, unsorted BAM where sorted is required, non-bgzipped VCF where bgzip is required, header/body sample-count mismatch. → Draft the preprocessing step (sort, bgzip+tabix, re-pair).
- Environment / scheduler. Module not loaded, conda env not activated,
$PATHon the non-interactive shell, quota/No space left on device, permissions. → Fix the env line in the submission script. - Only then: the genuinely novel error. Summarise what's known, state what single
probe (a
--debugrerun, aheadof the input) would disambiguate, and stop.
Output format
ROOT CAUSE: <one line>
EVIDENCE: <the lines in the log that prove it>
FIX: <the corrected command or config change — ready to copy>
RESUBMIT: <the exact resubmission, NOT auto-run — Jacob runs it>
IF WRONG: <the single next probe, if the top call doesn't hold>
Guardrails
- Propose, never execute. No
sbatch/qsub/bsub, norm, no overwrite. Hand over the command; the human runs it. (Matches Jacob's standing confirmation gates.) - One cause, not a checklist. Commit to the most-likely root cause. A wall of "could be any of these" is the failure mode this skill exists to avoid.
- Don't invent specifics. If the version, path, or contig name isn't in the evidence, say so and ask — never fabricate a flag or a filename.
- Cite the evidence. Every diagnosis points at the actual log line that supports it, so the human can sanity-check the call.