Skip to content
lijiaping edited this page Apr 25, 2019 · 14 revisions

SNAP is Not A Pipeline

基于模板的流程创建、测试、运行管理工具。

安装

asciicast

git clone ssh://[email protected]:10022/lijiaping/SNAP.git
cd SNAP
virtualenv .env
source .env/bin/activate
pip install -r requirements.txt

# 修正某些batchcompute版本无VpcId字段的问题
sed -i "142i 'VpcId': STRING," .env/lib/python2.7/site-packages/batchcompute/resources/cluster.py
sed -i "142s/^/        /" .env/lib/python2.7/site-packages/batchcompute/resources/cluster.py

建议将snap路径设置为alias方便使用:alias snap="/path/to/snap"

流程的组成与编写方法

一般结构

Pipeline
├── Filter (Module)
│   ├── cat (App)
│   │   ├── bin (scripts)
│   │   │   ├── xxx.pl
│   │   │   └── xxx.R
│   │   └── config.yaml
│   ├── dependencies.yaml
│   ├── ls (App)
│   │   └── config.yaml
│   └── wc (App)
│       └── config.yaml
├── Pack (Module)
│   ├── dependencies.yaml
│   └── gzip (App)
│       └── config.yaml

config.yaml定义了App的参数、输入输出文件,以及脚本模板,格式兼容聚道。build之后即为具体的一个个可以执行的脚本。

dependencies.yaml定义了App之间的依赖关系、默认参数和默认输入输出文件路径、脚本路径。每个dependencies.yaml对应着一个Module,即模块。若干个模块组成一个完整的流程。

parameters.conf定义了运行流程时所需的具体参数或文件,包括样品信息等。App填入该文件中的参数后,即可生成对应的脚本。

Docker提供了程序运行时所需要的环境。至少应包括App用到的软件本身及其语言环境。

使用方法及教程

app:与APP相关的子命令。

pipe:与流程相关的子命令。

bcs:与项目或阿里云配置相关的子命令。

task:与任务相关的子命令。

mapping:与文件映射相关的子命令。

cluster:与集群管理相关的子命令。

快速开始

quick-start: 阿里上快速开始执行项目的命令。

Clone this wiki locally