Browse Source

cat multiple files to one file

master
junshang 3 years ago
parent
commit
c65e847190
4 changed files with 32 additions and 16 deletions
  1. +19
    -2
      README.md
  2. +2
    -3
      inputs
  3. +7
    -5
      tasks/catreads.wdl
  4. +4
    -6
      workflow.wdl

+ 19
- 2
README.md View File

> Author: Jun Shang > Author: Jun Shang
> Email: shangjunv@163.com > Email: shangjunv@163.com
> Last Updates: 22/10/2020
> Last Updates: 10/05/2022


#### Requirements #### Requirements


#### quick start #### quick start


``` ```
$ choppy batch junshang/catreads-latest sample.csv --project-name Your_project_name
$ choppy batch junshang/catreads-latest sample.json --project-name Your_project_name
```

#### Input File

Input file `samples.json` should be in the form of json.
For example:

```json
{
"fq": [
"oss://choppy-cromwell-result/test-choppy/..._lane1_1.fq.gz",
"oss://choppy-cromwell-result/test-choppy/..._lane2_1.fq.gz",
"oss://choppy-cromwell-result/test-choppy/..._lane3_1.fq.gz"
],
"panel_id": "test_1.fq.gz",
"sample_id": "test_1.fq.gz"
}
``` ```

+ 2
- 3
inputs View File

{ {
"{{ project_name }}.fq1": "{{ fq1 }}",
"{{ project_name }}.fq2": "{{ fq2 }}",
"{{ project_name }}.fq3": "{{ fq3 }}",
"{{ project_name }}.fq": "{{ fq | tojson }}",
"{{ project_name }}.sample_name": "{{ sample_name }}",
"{{ project_name }}.disk_size": "{{ disk_size }}", "{{ project_name }}.disk_size": "{{ disk_size }}",
"{{ project_name }}.cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc" "{{ project_name }}.cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc"
} }

+ 7
- 5
tasks/catreads.wdl View File

task catreads { task catreads {
File fq1
File fq2
String fq3
Array[File] fq
String sample_name
String disk_size String disk_size
String cluster_config String cluster_config


command <<< command <<<
cat ${fq1} ${fq2} > ${fq3}
set -o pipefail
set -e

cat ${sep=" " fq} > ${sample_name}
>>> >>>


runtime { runtime {
} }


output { output {
File merge_fq = "${fq3}"
File merge_fq = "${sample_name}"
} }
} }

+ 4
- 6
workflow.wdl View File



workflow {{ project_name }} { workflow {{ project_name }} {
String disk_size String disk_size
File fq1
File fq2
String fq3
String cluster_config String cluster_config
Array[File] fq
String sample_name


call catreads.catreads as catreads { call catreads.catreads as catreads {
input: input:
fq1=fq1,
fq2=fq2,
fq3=fq3,
fq=fq,
sample_name=sample_name,
disk_size=disk_size, disk_size=disk_size,
cluster_config=cluster_config cluster_config=cluster_config
} }

Loading…
Cancel
Save