AGENT SKILL

pacsomatic

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.

License 许可
MIT
最近更新
2026-11-11
Stars
★ 1.6k
Forks
468

01 前言 Front Matter

name
pacsomatic
license
MIT
metadata
{ "tags": "tumor-normal, somatic variants, nf-core, long-read sequencing, cancer genomics", "version": "1.2", "category": "life-sciences", "maintainer": "Kalaris Labs", "contributor": "Beifang Niu", "contributors": "Haidong, Wenchao", "upstream-pipeline": "https://github.com/nf-core/pacsomatic" }
description
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.

02 资源文件 6

03 SKILL.md 正文

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

Agent operating procedure

  1. Check the environment. Confirm tool versions, the reference genome/annotation build and the input formats (FASTQ, BAM, VCF, h5ad).
  2. Pin down the inputs. Confirm formats, identifiers and parameters from the data or the user. Ask rather than guess any value that changes the result.
  3. Run a small version first. Run the pipeline on a small subset (one sample, one chromosome, a few thousand cells) first.
  4. Execute the full task using the instructions and references above.
  5. Validate the result. Check QC metrics, sample identities, genome build consistency and batch effects before interpreting results.
  6. Report. State what was run (versions, commands, parameters), what was checked, and what is still uncertain.
If this happens Do this
Genome builds or identifiers do not match between inputs Stop and harmonize (liftover, ID mapping) before continuing.
A function, flag or endpoint in these instructions is missing in the installed version Check the installed version's own documentation (help(), --help, official docs), adapt, and tell the user. Never invent an API.
A required input, identifier or parameter is ambiguous Ask the user, or state the assumption explicitly before running.

Integrity rules

  • Never fabricate results, parameters, identifiers, citations or statistics. If something cannot be run or verified, say so plainly.
  • Do not interpret biological significance beyond what the statistics support; report multiple-testing correction.
  • Treat version-specific details here as possibly outdated: confirm them against the official documentation for the installed version.
  • Ask before actions that cost money, consume shared GPUs or cloud quota, touch personal or patient data, or cannot be undone.

Related skills

  • nextflow: Build, run, and debug Nextflow data pipelines and nf-core workflows end to end.

04 同仓库更多 Skills

hashgraph-online
hashgraph-online/awesome-codex-plugins

deja-search

deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

deja-reflect

End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

revid

Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.

后端与接口图像与多媒体
★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

review-study

Review a QuestionPunk survey before launch for wording, answer choices, branching, and missing settings. Use for check my survey or review this draft before publishing.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

manage-study

Find QuestionPunk studies, check status, publish an explicitly requested draft, or retrieve its participant link. Use for find my survey, publish this study, or how many people responded.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

create-study

Create a saved QuestionPunk survey draft from a research brief or edit specified questions. Use for requests such as make a customer feedback survey or shorten my onboarding study.

★ 1.6k