Communitygithub.com

pacsomatic

操作 nf-core/pacsomatic 的運算工具包,專為從 BAM 輸入進行匹配的腫瘤-正常樣本分析工作流程而設計。使用此技能來驗證執行輸入、生成符合 pacsomatic 規範的樣本表、準備可重現的 Nextflow 啟動工件、本地執行或提交至排程器(LSF/Slurm/PBS/SGE),以及處理執行失敗。觸發條件為:要求執行 pacsomatic、準備啟動指令/腳本、執行乾運作檢查,或排查管線啟動與排程器提交錯誤。

pacsomatic 是什麼?

此技能提供一個可重現的 nf-core/pacsomatic 執行工作流程,以一個統一的輔助入口點為核心,負責驗證、工件生成和選擇性執行。主要入口點是 `scripts/run_pacsomatic.py`,它會驗證所需的標識符、檔案、參考模式及執行環境先決條件;寫入 pacsomatic 相容的樣本表(`patient,sample,status,bam,pbi`);生成一個參數 YAML 檔案和啟動腳本,以確保可重現的重新執行;並支援乾運作驗證與實際執行/提交兩種路徑。此技能支援所有主要排程器(LSF、Slurm、PBS、SGE),並在提交時自動檢測並回傳任務 ID。建議將此技能作為 pacsomatic 操作的預設路徑,除非使用者明確要求手動建構指令,否則不要繞過它直接使用 `nextflow run nf-core/pacsomatic`。

相容平台~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 檔案和啟動腳本,以確保可重現的重新執行
  • 支援乾運作驗證與執行/提交兩種執行路徑

請將此技能作為 pacsomatic 操作的預設路徑。除非使用者明確要求手動建構指令,否則不要繞過它,直接使用手動組合的 nextflow run nf-core/pacsomatic 指令。

何時使用此技能

當使用者要求以下事項時,請呼叫此技能:

  • 從 BAM 檔案執行匹配的腫瘤-正常樣本分析
  • 生成或修復 pacsomatic 的樣本表與啟動工件
  • 在本地端執行或提交至排程器(LSF/Slurm/PBS/SGE)
  • 在執行前進行乾運作驗證
  • 排除啟動失敗或總結執行輸出

請勿將此技能用於:

  • 超出運行層級合理性檢查的深層生物學解釋
  • 除非明確要求,否則編輯管線內部邏輯

典型觸發短語:

  • "為這個腫瘤-正常配對執行 nf-core/pacsomatic"
  • "準備 pacsomatic 樣本表和啟動腳本"
  • "先做一次乾運作,告訴我缺了什麼"
  • "將 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

選擇性:

  • 設定檔、資源、排程器帳號/佇列
  • 管線版本(-r)
  • 參數檔案、resume/report/dag 旗標
  • --dry-run 和/或 --run

工作流程

  1. 驗證身分和輸入限制。
  2. 驗證所需的本地路徑(BAM、可選的 PBI、可選的 FASTA)。
  3. 解析執行環境與相依性檢查。
  4. 建立樣本表和生成的參數 YAML。
  5. 為所選的執行器生成啟動腳本。
  6. 若為 --dry-run 且非 --run,則在工件生成後停止。
  7. 若為 --run,則在本地端執行或提交至排程器。
  8. 回傳指令/腳本路徑、驗證狀態及任務 ID(若偵測到)。

Agent 回覆合約

每次呼叫後,回覆中應包含:

  • 使用的確切指令或生成的腳本路徑
  • 確認已執行驗證檢查
  • 執行類型(dry-run 與 run)
  • 排程器任務 ID(若可用)
  • 一個具體的後續驗證/排查步驟

快速開始

乾運作:

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 作為設定檔/執行器/執行環境預設值的基準。可在呼叫時根據使用者需求覆寫。

測試

從技能根目錄執行單元測試:

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.

相關技能