Skip to content

seqyuan/annopi

Repository files navigation

annopi

Bioinformatics workflow orchestration framework

annopi 是一个基于 YAML 配置的生物信息学流程编排框架,通过 DAG 依赖关系自动调度任务执行。底层使用 annotask 作为并行任务执行引擎,支持本地和 SGE 集群两种运行模式。

Features

  • YAML 驱动 — 流程配置和项目配置完全通过 YAML 定义
  • DAG 调度 — 基于有向无环图的任务依赖管理和拓扑排序
  • 智能参数 — 自动检测多样本/比较组模式,批量生成命令
  • 断点续跑 — 基于 .sign 文件的任务完成标记,支持中断后恢复
  • 模块化任务 — 支持从 Git 仓库安装和复用任务模块
  • 双模式执行 — 同时支持本地执行和 SGE 集群提交

Installation

pip install annopi

开发安装:

git clone https://github.com/seqyuan/annopi.git
cd annopi
poetry install

依赖: 需要安装 annotask 作为任务执行引擎。

Quick Start

1. 准备配置文件

pipeline.yml — 定义任务和依赖关系:

name: scRNA_pipeline
version: 1.0.0

tasks:
  cellranger:
    params:
      sample_name: ${sample.sample_name}
      ref: ${config.Para.Para_ref}
    command: |
      cellranger count --id=${sample_name} --transcriptome=${ref}
    resources:
      cpu: 8
      mem: 32
      executor: qsubsge
    annotask:
      lines: 1
      threads: 3

  qc:
    params:
      input_dir: ./process/cellranger/${sample.sample_name}/outs
    command: |
      qc_script.py --input ${input_dir}
    resources:
      executor: local
    annotask:
      lines: 2
      threads: 5

dependencies:
  qc:
    - cellranger

project.yml — 定义样本和全局参数:

Para:
  Para_ref: /path/to/reference
  Para_species: human

sample:
  - sample_name: sample1
    sample_id: S001
  - sample_name: sample2
    sample_id: S002

2. 生成执行脚本

annopi conf -p pipeline.yml -c project.yml -o ./project_root

3. 执行流程

annopi run -p pipeline.yml -c project.yml -o ./project_root

4. 安装任务模块

annopi install github.com/user/scrna-tasks/cellranger@v1.2.3

Documentation

完整文档请参阅 annopi documentation

License

MIT

About

Bioinformatics workflow orchestration framework

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages