Pacsomatic

Operator toolkit for nf-core/pacsomatic matched tumor-normal workflows from BAM inputs.

How to use it

  1. Hit Copy SKILL.md — or use the Claude Code line below to get every file.
  2. Claude: ⋯ → Download .md, then Customize → Skills → Add → Upload skill.
    ChatGPT: make a Project and paste it into Instructions.
    Neither? Paste it at the top of a new chat — it works for that chat.
  3. Describe your job in plain words. The AI follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit K-Dense-AI/scientific-agent-skills/skills/pacsomatic#main ~/.claude/skills/pacsomatic

For one project only, change the path to .claude/skills/pacsomatic. This skill also uses config.yaml — copying SKILL.md alone won't be enough. See the folder on GitHub.

Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Show the full text151 lines
pacsomatic/SKILL.md151 lines4.9 KBpushed 55d agoRawView on GitHub

pacsomatic

Overview

This skill provides a reproducible execution workflow for nf-core/pacsomatic, centered on a single helper entrypoint that handles validation, artifact generation, and optional execution.

Primary entrypoint:

  • scripts/run_pacsomatic.py

The helper script:

  • validates required identifiers, files, reference mode, and runtime prerequisites
  • writes a pacsomatic-compatible samplesheet (patient,sample,status,bam,pbi)
  • generates a params YAML and launch script for reproducible reruns
  • supports dry-run validation and run/submit execution paths

Use this skill as the default path for pacsomatic operations. Do not bypass it with manually assembled nextflow run nf-core/pacsomatic commands unless the user explicitly asks for manual command construction.

When to Use This Skill

Invoke this skill when the user asks to:

  • run matched tumor-normal analysis from BAM files
  • generate or fix pacsomatic samplesheet and launch artifacts
  • execute locally or submit to schedulers (LSF/Slurm/PBS/SGE)
  • perform dry-run validation before execution
  • troubleshoot launch failures or summarize run outputs

Do not use this skill for:

  • deep biological interpretation beyond run-level sanity checks
  • editing pipeline internals unless explicitly requested

Typical trigger phrases:

  • "run nf-core/pacsomatic for this tumor-normal pair"
  • "prepare pacsomatic samplesheet and launch script"
  • "do a dry run first and tell me what is missing"
  • "submit pacsomatic to slurm/lsf and return the job id"
  • "why did pacsomatic submission fail"

Routing and Execution Rules

  1. Always collect required run inputs first.
  2. Always route through scripts/run_pacsomatic.py for validation and artifact generation.
  3. Default to --dry-run when the user asks for checks/validation only.
  4. Use --run only when the user asks to execute/submit.
  5. For scheduler modes, include executor-specific resource arguments and return detected job ID when available.
  6. If execution fails, report first failure point and next triage target (.nextflow.log, pipeline_info, failing task logs).

Inputs Required

Required:

  • tumor BAM path
  • normal BAM path
  • patient ID
  • tumor sample ID
  • normal sample ID
  • output directory
  • exactly one reference mode: --fasta or --genome

Optional:

  • profile, resources, scheduler account/queue
  • pipeline version (-r)
  • params file, resume/report/dag flags
  • --dry-run and/or --run

Workflow

  1. Validate identity and input constraints.
  2. Validate required local paths (BAM, optional PBI, optional FASTA).
  3. Resolve runtime and dependency checks.
  4. Build samplesheet and generated params YAML.
  5. Generate launch script for selected executor.
  6. If --dry-run and not --run, stop after artifact generation.
  7. If --run, execute locally or submit to scheduler.
  8. Return command/script path, validation status, and job ID (if detected).

Agent Response Contract

Every response after invocation should include:

  • exact command used or generated script path
  • confirmation that validation checks ran
  • run type (dry-run vs run)
  • scheduler job ID when available
  • one concrete next step for validation/triage

Quick Start

Dry run:

python scripts/run_pacsomatic.py \
  --tumor-bam /path/to/tumor.bam \
  --normal-bam /path/to/normal.bam \
  --patient-id P001 \
  --tumor-sample-id P001_T \
  --normal-sample-id P001_N \
  --outdir /path/to/output \
  --genome GRCh38 \
  --profile singularity,sanger \
  --dry-run

Scheduler execution example (Slurm):

python scripts/run_pacsomatic.py \
  --tumor-bam /path/to/tumor.bam \
  --normal-bam /path/to/normal.bam \
  --patient-id P001 \
  --tumor-sample-id P001_T \
  --normal-sample-id P001_N \
  --outdir /path/to/output \
  --genome GRCh38 \
  --profile singularity,sanger \
  --executor slurm \
  --queue compute \
  --project my_account \
  --cpus 16 \
  --memory-gb 64 \
  --walltime 48:00 \
  --run

Configuration

Use config.yaml as the baseline for profile/executor/runtime defaults. Override at invocation time when user requirements differ.

Testing

Run unit tests from skill root:

python -m unittest discover -s tests/pacsomatic -v

References

  • references/agent-playbook.md
  • references/config-and-output.md
  • references/pacsomatic_guide.md
  • scripts/run_pacsomatic.py
1---
2name: pacsomatic
3description: Operator toolkit for nf-core/pacsomatic matched tumor-normal workflows from BAM inputs. Use this skill when the user needs to validate run inputs, generate pacsomatic-compliant samplesheets, prepare reproducible Nextflow launch artifacts, run locally or submit to schedulers (LSF/Slurm/PBS/SGE), and triage execution failures. Triggers on requests to run pacsomatic, prepare launch commands/scripts, perform dry-run checks, or troubleshoot pipeline startup and scheduler submission errors.
4license: MIT
5metadata:
6 version: "1.2"
7 skill-author: Beifang Niu
8 contributors: Haidong, Wenchao
9 upstream-pipeline: https://github.com/nf-core/pacsomatic
10---
11 
12# pacsomatic
13 
14## Overview
15 
16This skill provides a reproducible execution workflow for nf-core/pacsomatic, centered on a single helper entrypoint that handles validation, artifact generation, and optional execution.
17 
18Primary entrypoint:
19- `scripts/run_pacsomatic.py`
20 
21The helper script:
22- validates required identifiers, files, reference mode, and runtime prerequisites
23- writes a pacsomatic-compatible samplesheet (`patient,sample,status,bam,pbi`)
24- generates a params YAML and launch script for reproducible reruns
25- supports dry-run validation and run/submit execution paths
26 
27Use this skill as the default path for pacsomatic operations. Do not bypass it with manually assembled `nextflow run nf-core/pacsomatic` commands unless the user explicitly asks for manual command construction.
28 
29## When to Use This Skill
30 
31Invoke this skill when the user asks to:
32- run matched tumor-normal analysis from BAM files
33- generate or fix pacsomatic samplesheet and launch artifacts
34- execute locally or submit to schedulers (LSF/Slurm/PBS/SGE)
35- perform dry-run validation before execution
36- troubleshoot launch failures or summarize run outputs
37 
38Do not use this skill for:
39- deep biological interpretation beyond run-level sanity checks
40- editing pipeline internals unless explicitly requested
41 
42Typical trigger phrases:
43- "run nf-core/pacsomatic for this tumor-normal pair"
44- "prepare pacsomatic samplesheet and launch script"
45- "do a dry run first and tell me what is missing"
46- "submit pacsomatic to slurm/lsf and return the job id"
47- "why did pacsomatic submission fail"
48 
49## Routing and Execution Rules
50 
511. Always collect required run inputs first.
522. Always route through `scripts/run_pacsomatic.py` for validation and artifact generation.
533. Default to `--dry-run` when the user asks for checks/validation only.
544. Use `--run` only when the user asks to execute/submit.
555. For scheduler modes, include executor-specific resource arguments and return detected job ID when available.
566. If execution fails, report first failure point and next triage target (`.nextflow.log`, `pipeline_info`, failing task logs).
57 
58## Inputs Required
59 
60Required:
61- tumor BAM path
62- normal BAM path
63- patient ID
64- tumor sample ID
65- normal sample ID
66- output directory
67- exactly one reference mode: `--fasta` or `--genome`
68 
69Optional:
70- profile, resources, scheduler account/queue
71- pipeline version (`-r`)
72- params file, resume/report/dag flags
73- `--dry-run` and/or `--run`
74 
75## Workflow
76 
771. Validate identity and input constraints.
782. Validate required local paths (BAM, optional PBI, optional FASTA).
793. Resolve runtime and dependency checks.
804. Build samplesheet and generated params YAML.
815. Generate launch script for selected executor.
826. If `--dry-run` and not `--run`, stop after artifact generation.
837. If `--run`, execute locally or submit to scheduler.
848. Return command/script path, validation status, and job ID (if detected).
85 
86## Agent Response Contract
87 
88Every response after invocation should include:
89- exact command used or generated script path
90- confirmation that validation checks ran
91- run type (`dry-run` vs `run`)
92- scheduler job ID when available
93- one concrete next step for validation/triage
94 
95## Quick Start
96 
97Dry run:
98 
99```bash
100python scripts/run_pacsomatic.py \
101 --tumor-bam /path/to/tumor.bam \
102 --normal-bam /path/to/normal.bam \
103 --patient-id P001 \
104 --tumor-sample-id P001_T \
105 --normal-sample-id P001_N \
106 --outdir /path/to/output \
107 --genome GRCh38 \
108 --profile singularity,sanger \
109 --dry-run
110```
111 
112Scheduler execution example (Slurm):
113 
114```bash
115python scripts/run_pacsomatic.py \
116 --tumor-bam /path/to/tumor.bam \
117 --normal-bam /path/to/normal.bam \
118 --patient-id P001 \
119 --tumor-sample-id P001_T \
120 --normal-sample-id P001_N \
121 --outdir /path/to/output \
122 --genome GRCh38 \
123 --profile singularity,sanger \
124 --executor slurm \
125 --queue compute \
126 --project my_account \
127 --cpus 16 \
128 --memory-gb 64 \
129 --walltime 48:00 \
130 --run
131```
132 
133## Configuration
134 
135Use `config.yaml` as the baseline for profile/executor/runtime defaults. Override at invocation time when user requirements differ.
136 
137## Testing
138 
139Run unit tests from skill root:
140 
141```bash
142python -m unittest discover -s tests/pacsomatic -v
143```
144 
145## References
146 
147- `references/agent-playbook.md`
148- `references/config-and-output.md`
149- `references/pacsomatic_guide.md`
150- `scripts/run_pacsomatic.py`
151 

Discussion

Alternatives

Also in Launch planning