Communitygithub.com

pacsomatic

用于 nf-core/pacsomatic 配对肿瘤-正常样本工作流的操作工具集,支持 BAM 输入,涵盖验证、样本表生成、启动脚本准备、本地或调度器(LSF/Slurm/PBS/SGE)执行以及故障排查。

pacsomatic 是什么?

该技能为 nf-core/pacsomatic 工作流提供了一个可复现的执行流程,其核心是一个统一入口脚本 `scripts/run_pacsomatic.py`,用于处理验证、工件生成和可选执行。当用户需要从 BAM 文件运行配对肿瘤-正常分析、生成或修复 pacsomatic 样本表和启动工件、在本地或调度器(LSF/Slurm/PBS/SGE)上执行、进行 dry-run 验证或排查启动失败与调度器提交错误时,应调用此技能。它通过验证所需标识符、文件路径和参考模式,生成兼容的样本表(`patient,sample,status,bam,pbi`)以及参数 YAML 和启动脚本,支持 `--dry-run` 和 `--run` 模式,并返回验证状态和调度器作业 ID,确保操作的可追溯性和错误处理的标准化。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/pacsomatic

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

pacsomatic 是做什么的?

概述

本技能为 nf-core/pacsomatic 提供了一个可复现的执行工作流,核心是一个单一辅助入口点,用于处理验证、工件生成和可选执行。

主要入口点:

  • scripts/run_pacsomatic.py

辅助脚本的功能:

  • 验证所需的标识符、文件、参考模式和运行时前提条件
  • 写入与 pacsomatic 兼容的样本表(patient,sample,status,bam,pbi)
  • 生成参数 YAML 和启动脚本以实现可复现的重新运行
  • 支持 dry-run 验证和运行/提交执行路径

将此技能作为 pacsomatic 操作的默认路径。除非用户明确要求手动构建命令,否则不要通过手动拼接 nextflow run nf-core/pacsomatic 命令来绕过它。

何时使用此技能

当用户要求执行以下操作时调用此技能:

  • 从 BAM 文件运行配对肿瘤-正常分析
  • 生成或修复 pacsomatic 样本表和启动工件
  • 在本地执行或提交到调度器(LSF/Slurm/PBS/SGE)
  • 在执行前进行 dry-run 验证
  • 排查启动失败或总结运行输出

以下情况不使用此技能:

  • 超出运行级健全性检查的深度生物学解释
  • 除非明确要求,否则编辑管道内部逻辑

典型触发短语:

  • "运行 nf-core/pacsomatic 分析这对肿瘤-正常样本"
  • "准备 pacsomatic 样本表和启动脚本"
  • "先做一次 dry run,告诉我缺少什么"
  • "将 pacsomatic 提交到 slurm/lsf 并返回作业 ID"
  • "为什么 pacsomatic 提交失败了"

路由与执行规则

  1. 始终先收集所需的运行输入。
  2. 始终通过 scripts/run_pacsomatic.py 进行验证和工件生成。
  3. 当用户仅要求检查/验证时,默认使用 --dry-run。
  4. 仅当用户要求执行/提交时使用 --run。
  5. 对于调度器模式,包含执行器特定的资源参数,并在可用时返回检测到的作业 ID。
  6. 如果执行失败,报告第一个失败点以及下一步排查目标(.nextflow.log、pipeline_info、失败的任务日志)。

所需输入

必需:

  • 肿瘤 BAM 路径
  • 正常 BAM 路径
  • 患者 ID
  • 肿瘤样本 ID
  • 正常样本 ID
  • 输出目录
  • 恰好一种参考模式:--fasta 或 --genome

可选:

  • profile、资源、调度器账户/队列
  • 管道版本(-r)
  • 参数文件、resume/report/dag 标志
  • --dry-run 和/或 --run

工作流

  1. 验证标识符和输入约束。
  2. 验证所需的本地路径(BAM、可选的 PBI、可选的 FASTA)。
  3. 解析运行时和依赖检查。
  4. 构建样本表和生成的参数 YAML。
  5. 为所选执行器生成启动脚本。
  6. 如果指定了 --dry-run 而未指定 --run,则在工件生成后停止。
  7. 如果指定了 --run,则在本地执行或提交到调度器。
  8. 返回命令/脚本路径、验证状态和作业 ID(如果检测到)。

代理响应契约

每次调用后的响应必须包括:

  • 使用的确切命令或生成的脚本路径
  • 确认验证检查已运行
  • 运行类型(dry-run 或 run)
  • 调度器作业 ID(如果可用)
  • 一个具体的下一步验证/排查操作

快速开始

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

调度器执行示例(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

配置

使用 config.yaml 作为 profile/executor/runtime 默认值的基线。当用户需求不同时,可在调用时覆盖。

测试

从技能根目录运行单元测试:

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

参考资料

  • references/agent-playbook.md
  • references/config-and-output.md
  • references/pacsomatic_guide.md
  • scripts/run_pacsomatic.py

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

adaptyv

How to use the Adaptyv Bio Foundry API and Python SDK for protein experiment design, submission, and results retrieval. Use this skill whenever the user mentions Adaptyv, Foundry API, protein binding assays, protein screening experiments, BLI/SPR assays, thermostability assays, or wants to submit protein sequences for experimental characterization. Also trigger when code imports `adaptyv`, `adaptyv_sdk`, or `FoundryClient`, or references `foundry-api-public.adaptyvbio.com`.

aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

alphagenome

Look up precomputed AlphaGenome Atlas effects for any GRCh38 single-nucleotide variant (AVI score with Phred and 18 SHAP feature attributions, plus raw and quantile scores for RNA-seq, DNase, ATAC, ChIP-TF, ChIP-histone, CAGE, PRO-cap, splicing, polyadenylation and contact-map tracks), score variants or scan windows on demand with the AlphaGenome model for human and mouse (variant scoring, in silico mutagenesis, REF-versus-ALT track prediction), and build Atlas website deep links. Use when the user mentions AlphaGenome, AlphaGenome Atlas, AVI or AlphaGenome Variant Impact, DeepMind variant effect prediction, or wants to prioritise or mechanistically interpret non-coding, regulatory, splicing, enhancer, promoter, or chromatin-accessibility effects of SNVs from a VCF, credible set, or region. Research use only; not a clinical tool.

analytical-method-validation

Plan, execute, and document validation, verification, and transfer of analytical procedures under the governing framework - ICH Q2(R2) and Q14, USP <1220>/<1225>/<1226>, ICH M10 bioanalytical, CLSI EP, or ISO/IEC 17025. Use for HPLC, LC-MS/MS, GC, CE, ICP-MS, dissolution, qNMR, qPCR, NIR, and ligand binding or cell-based assays whenever the question is whether a procedure is fit for its intended purpose. Triggers include

anndata

Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.

arbor

Autonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g.

arboreto

Infer gene regulatory networks (GRNs) from gene expression data using scalable algorithms (GRNBoost2, GENIE3). Use when analyzing transcriptomics data (bulk RNA-seq, single-cell RNA-seq) to identify transcription factor-target gene relationships and regulatory interactions. Supports distributed computation for large-scale datasets.

astropy

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

autoskill

Observe the user

benchling-integration

Benchling Python SDK and REST API integration for registry entities, inventory, ELN entries, workflows, Benchling Apps, and Data Warehouse queries. Use when automating lab data with benchling-sdk or the v2 API.

bgpt-paper-search

Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.

bids

>

biopython

Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.

bioservices

Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.

bulk-rnaseq

End-to-end bulk RNA-seq orchestrator — takes raw FASTQ reads through QC and trimming (FastQC, fastp/Trim Galore), alignment and quantification (STAR, Salmon, featureCounts), assembles a gene-level counts matrix, then hands off to differential expression (pydeseq2), pathway/GSEA enrichment (pathway-enrichment), and publication figures (scientific-visualization). Use whenever the user has bulk RNA-seq reads or quant output and wants a complete, reproducible differential-expression workflow — e.g.

cellxgene-census

Query the CZ CELLxGENE Census programmatically for versioned public single-cell and spatial transcriptomics data. Use when you need population-scale cell metadata, gene expression slices, Census summary counts, source H5AD URIs/downloads, embeddings, spatial Census data, or reference atlas comparisons across organisms, tissues, diseases, assays, and cell types. For analyzing your own local single-cell data use scanpy, anndata, or scvi-tools.

cirq

Google quantum computing framework. Use when targeting Google Quantum AI hardware, designing noise-aware circuits, or running quantum characterization experiments. Best for Google hardware, noise modeling, and low-level circuit design. For IBM hardware use qiskit; for quantum ML with autodiff use pennylane; for physics simulations use qutip.

citation-management

Comprehensive citation management for academic research. Search OpenAlex, PubMed, and Google Scholar for papers, extract accurate metadata, validate citations, and generate properly formatted BibTeX entries. This skill should be used when you need to find papers, verify citation information, convert DOIs to BibTeX, or ensure reference accuracy in scientific writing.

clinical-decision-support

Prepare and validate research-only clinical decision-support evaluation, evidence-profile, cohort, survival, biomarker/model, privacy, and governance artifacts. Use for aggregate or synthetic research documentation and traceability—not patient care or live clinical operation.

clinical-reports

Create safety-bounded draft structures and run local deterministic checks for clinical case, diagnostic, trial, safety, and aggregate research reports. Use only with synthetic, de-identified, or aggregate inputs and verified source-fact manifests; every output requires qualified review.

相关技能