# README.md | |||||
> Author: Qingwang Chen | |||||
> | |||||
> Email: [qwch20@fudan.edu.cn](mailto:qwch20@fudan.edu.cn) | |||||
> | |||||
> Last Updates: 25/03/2021 | |||||
#### Requirements | |||||
- choppy | |||||
- Ali-Cloud | |||||
- Linux | |||||
``` | |||||
# 激活choppy环境 | |||||
$ source activate choppy (open-choppy-env) | |||||
# 第一次安装 | |||||
$ choppy install chenqingwang/rMATS | |||||
# 非第一次安装 | |||||
$ choppy install chenqingwang/rMATS -f | |||||
# 查询已安装APP | |||||
$ choppy apps | |||||
``` | |||||
#### Quick Start | |||||
``` | |||||
# 准备 samples.csv 文件 | |||||
$ choppy samples chenqingwang/rMATS-latest > samples.csv | |||||
# 准备无默认参数的samples.csv 文件 | |||||
choppy samples --no-default chenqingwang/rMATS-latest > samples.csv | |||||
# 提交任务 | |||||
$ choppy batch chenqingwang/rMATS-latest samples.csv -p Your_project_name -l Your_label | |||||
# 查询任务运行状况 | |||||
$ choppy query -L Your_label | grep "status" | |||||
# 查询失败任务 | |||||
$ choppy search -s Failed -p Your_project_name -u chenqingwang --short-format | |||||
# 结果文件地址 | |||||
$ oss://choppy-cromwell-result/test-choppy/Your_project_name/ | |||||
``` |
{ | |||||
"reference_gtf_file":"oss://pgx-reference-data/reference/rmats/Homo_sapiens.GRCh38.103.gtf", | |||||
"rmats_docker":"registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/rmats:4.1.1", | |||||
"rmats_cluster":"OnDemand bcs.a2.large img-ubuntu-vpc", | |||||
"disk_size":"200" | |||||
} |
{ | |||||
"{{ project_name }}.sample_id": "{{ sample_id }}", | |||||
"{{ project_name }}.b1_txt": "{{ b1_txt }}", | |||||
"{{ project_name }}.b2_txt": "{{ b2_txt }}", | |||||
"{{ project_name }}.reference_gtf_file": "{{ reference_gtf_file }}", | |||||
"{{ project_name }}.rmats_docker": "{{ rmats_docker }}", | |||||
"{{ project_name }}.rmats_cluster": "{{ rmats_cluster }}", | |||||
"{{ project_name }}.disk_size": "{{ disk_size }}" | |||||
} |
task rmats { | |||||
String sample_id | |||||
File b1_txt | |||||
File b2_txt | |||||
File reference_gtf_file | |||||
String docker | |||||
String cluster | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
mkdir -p ${sample_id} | |||||
python /usr/local/bin/rmats.py --b1 ${b1_txt} \ | |||||
--b2 ${b2_txt} \ | |||||
--gtf ${reference_gtf_file} \ | |||||
-t paired \ | |||||
--readLength 150 \ | |||||
--nthread 4 \ | |||||
--od ${sample_id}/output \ | |||||
--tmp ${sample_id}/tmp_output | |||||
>>> | |||||
runtime { | |||||
docker: docker | |||||
cluster: cluster | |||||
systemDisk: "cloud_ssd 40" | |||||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
Array[File] AS_txt = glob("${sample_id}/output/*.txt") | |||||
Array[File] tmp = glob("${sample_id}/output/tmp/*") | |||||
} | |||||
} | |||||
import "./tasks/rmats.wdl" as rmats | |||||
workflow {{ project_name }} { | |||||
String sample_id | |||||
File b1_txt | |||||
File b2_txt | |||||
File reference_gtf_file | |||||
String rmats_docker | |||||
String rmats_cluster | |||||
String disk_size | |||||
call rmats.rmats as rmats { | |||||
input: | |||||
b1_txt = b1_txt, | |||||
b2_txt = b2_txt, | |||||
reference_gtf_file = reference_gtf_file, | |||||
sample_id = sample_id, | |||||
bam_file = bam_file, | |||||
docker = rmats_docker, | |||||
cluster = rmats_cluster, | |||||
disk_size = disk_size | |||||
} | |||||
} |