# README.md | |||||
> Author: Yaqing Liu | |||||
> | |||||
> Email: [yaqing.liu@outlook.com](mailto:yaqing.liu@outlook.com) | |||||
> | |||||
> Last Updates: 08/04/2021 | |||||
This app will generate the MD5 | |||||
#### Requirements | |||||
- choppy | |||||
- Ali-Cloud | |||||
- Linux | |||||
#### Usage | |||||
```Shell | |||||
# Install | |||||
choppy install YaqingLiu/MD5 | |||||
# Prepare the input file: samples.json | |||||
# Submit your task | |||||
choppy batch YaqingLiu/MD5-latest samples.json -p project_name | |||||
``` | |||||
#### Input | |||||
```Json | |||||
{ | |||||
"sample_id": "sample_id", | |||||
"files": ["A", "B", "C", ..., "Z"] | |||||
} | |||||
``` |
{ | { | ||||
"docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/r-base:4.0.2", | "docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/r-base:4.0.2", | ||||
"disk_size": "200", | |||||
"cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc" | |||||
"disk_size": "100", | |||||
"cluster_config": "OnDemand bcs.ps.g.large img-ubuntu-vpc" | |||||
} | } |
{ | { | ||||
"{{ project_name }}.INPUT": {{ INPUT | tojson }}, | |||||
"{{ project_name }}.docker": "{{ docker }}", | "{{ project_name }}.docker": "{{ docker }}", | ||||
"{{ project_name }}.file": "{{ file }}", | |||||
"{{ project_name }}.disk_size": "{{ disk_size }}", | "{{ project_name }}.disk_size": "{{ disk_size }}", | ||||
"{{ project_name }}.cluster_config": "{{ cluster_config }}" | "{{ project_name }}.cluster_config": "{{ cluster_config }}" | ||||
} | |||||
} |
task MD5 { | task MD5 { | ||||
File file | |||||
String name = basename(file) | |||||
Array[File] INPUT | |||||
String docker | String docker | ||||
String cluster_config | String cluster_config | ||||
String disk_size | String disk_size | ||||
command <<< | command <<< | ||||
md5sum ${file} > ${name}.md5 | |||||
for file in ${sep=" " INPUT} | |||||
do | |||||
md5sum ${file} > ${file}.md5 | |||||
done | |||||
cat `ls | grep .md5$` > OUTPUT.md5 | |||||
>>> | >>> | ||||
runtime { | runtime { | ||||
} | } | ||||
output { | output { | ||||
File MD5 = "${name}.md5" | |||||
File MD5 = "OUTPUT.md5" | |||||
} | } | ||||
} | } |
import "./tasks/MD5.wdl" as MD5 | import "./tasks/MD5.wdl" as MD5 | ||||
workflow {{ project_name }} { | workflow {{ project_name }} { | ||||
File file | |||||
Array[File] INPUT | |||||
String docker | String docker | ||||
String cluster_config | String cluster_config | ||||
String disk_size | String disk_size | ||||
call MD5.MD5 as MD5 { | call MD5.MD5 as MD5 { | ||||
input: | input: | ||||
file = file, | |||||
INPUT = INPUT, | |||||
docker = docker, | docker = docker, | ||||
disk_size = disk_size, | disk_size = disk_size, | ||||
cluster_config=cluster_config | cluster_config=cluster_config |