This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
/
split_bam_workflow.cwl
76 lines (67 loc) · 1.66 KB
/
split_bam_workflow.cwl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
cwlVersion: v1.0
class: Workflow
requirements:
- class: InlineJavascriptRequirement
- class: StepInputExpressionRequirement
- class: MultipleInputFeatureRequirement
inputs:
threads: int?
bam_file: File
job_uuid: string
outputs:
bam_list:
type: File[]
outputSource: run_inputs_decider/bam_files
steps:
run_namesort_bam:
run: ../../tools/samtools_namesort_bam.cwl
in:
threads: threads
output_filename:
source: job_uuid
valueFrom: $(self + '.namesort.bam')
tmp_prefix: job_uuid
bam_file: bam_file
out: [ output ]
run_get_pe:
run: ../../tools/samtools_filter_bam.cwl
in:
threads: threads
bam_file: run_namesort_bam/output
output_filename:
source: job_uuid
valueFrom: $(self + '.paired.bam')
exclude_flag:
default: 4
include_flag:
default: 1
out: [ output ]
run_pe_check:
run: ../../tools/samtools_view_head_check.cwl
in:
bam_file: run_get_pe/output
out: [ counts ]
run_get_se:
run: ../../tools/samtools_filter_bam.cwl
in:
threads: threads
bam_file: run_namesort_bam/output
output_filename:
source: job_uuid
valueFrom: $(self + '.unpaired.bam')
exclude_flag:
default: 5
out: [ output ]
run_se_check:
run: ../../tools/samtools_view_head_check.cwl
in:
bam_file: run_get_se/output
out: [ counts ]
run_inputs_decider:
run: ../../tools/bam_inputs_decider.cwl
in:
pe_bam_file: run_get_pe/output
pe_counts: run_pe_check/counts
se_bam_file: run_get_se/output
se_counts: run_se_check/counts
out: [ bam_files ]