Quellcode durchsuchen

cat multiple files to one file

master
junshang vor 3 Jahren
Ursprung
Commit
c65e847190
4 geänderte Dateien mit 32 neuen und 16 gelöschten Zeilen
  1. +19
    -2
      README.md
  2. +2
    -3
      inputs
  3. +7
    -5
      tasks/catreads.wdl
  4. +4
    -6
      workflow.wdl

+ 19
- 2
README.md Datei anzeigen

@@ -1,6 +1,6 @@
> Author: Jun Shang
> Email: shangjunv@163.com
> Last Updates: 22/10/2020
> Last Updates: 10/05/2022

#### Requirements

@@ -16,5 +16,22 @@ $ choppy apps
#### 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 Datei anzeigen

@@ -1,7 +1,6 @@
{
"{{ 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 }}.cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc"
}

+ 7
- 5
tasks/catreads.wdl Datei anzeigen

@@ -1,12 +1,14 @@
task catreads {
File fq1
File fq2
String fq3
Array[File] fq
String sample_name
String disk_size
String cluster_config

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

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

runtime {
@@ -16,6 +18,6 @@ task catreads {
}

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

+ 4
- 6
workflow.wdl Datei anzeigen

@@ -2,16 +2,14 @@ import "./tasks/catreads.wdl" as catreads

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

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

Laden…
Abbrechen
Speichern