ソースを参照

Alter: batch calculation

master
YaqingLiu 4年前
コミット
db0e26b704
5個のファイルの変更46行の追加11行の削除
  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 ファイルの表示

@@ -0,0 +1,33 @@
# 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 ファイルの表示

@@ -1,5 +1,5 @@
{
"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 ファイルの表示

@@ -1,7 +1,6 @@
{
"{{ project_name }}.INPUT": {{ INPUT | tojson }},
"{{ project_name }}.docker": "{{ docker }}",
"{{ project_name }}.file": "{{ file }}",
"{{ project_name }}.disk_size": "{{ disk_size }}",
"{{ project_name }}.cluster_config": "{{ cluster_config }}"
}

}

+ 7
- 4
tasks/MD5.wdl ファイルの表示

@@ -1,13 +1,16 @@
task MD5 {

File file
String name = basename(file)
Array[File] INPUT
String docker
String cluster_config
String disk_size

command <<<
md5sum ${file} > ${name}.md5
for file in ${sep=" " INPUT}
do
md5sum ${file} > ${file}.md5
done
cat `ls | grep .md5$` > OUTPUT.md5
>>>

runtime {
@@ -18,6 +21,6 @@ task MD5 {
}

output {
File MD5 = "${name}.md5"
File MD5 = "OUTPUT.md5"
}
}

+ 2
- 2
workflow.wdl ファイルの表示

@@ -1,14 +1,14 @@
import "./tasks/MD5.wdl" as MD5

workflow {{ project_name }} {
File file
Array[File] INPUT
String docker
String cluster_config
String disk_size

call MD5.MD5 as MD5 {
input:
file = file,
INPUT = INPUT,
docker = docker,
disk_size = disk_size,
cluster_config=cluster_config

読み込み中…
キャンセル
保存