Selaa lähdekoodia

Alter: batch calculation

master
YaqingLiu 4 vuotta sitten
vanhempi
commit
db0e26b704
5 muutettua tiedostoa jossa 46 lisäystä ja 11 poistoa
  1. +33
    -0
      README.md
  2. +2
    -2
      defaults
  3. +2
    -3
      inputs
  4. +7
    -4
      tasks/MD5.wdl
  5. +2
    -2
      workflow.wdl

+ 33
- 0
README.md Näytä tiedosto

# 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"]
}
```

+ 2
- 2
defaults Näytä tiedosto

{ {
"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"
} }

+ 2
- 3
inputs Näytä tiedosto

{ {
"{{ 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 }}"
}

}

+ 7
- 4
tasks/MD5.wdl Näytä tiedosto

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"
} }
} }

+ 2
- 2
workflow.wdl Näytä tiedosto

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

Loading…
Peruuta
Tallenna