-
Notifications
You must be signed in to change notification settings - Fork 88
/
prepare_user_input2.cwl
115 lines (110 loc) · 3.18 KB
/
prepare_user_input2.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/usr/bin/env cwl-runner
label: "Prepare user input"
cwlVersion: v1.2
class: Workflow
doc: Prepare user input for NCBI-PGAP pipeline
requirements:
- class: MultipleInputFeatureRequirement
- class: InlineJavascriptRequirement
inputs:
submol:
type: File
fasta:
type: File
taxon_db:
type: File
ignore_all_errors:
type: boolean?
no_internet:
type: boolean?
outputs:
input_asn_type:
type: string
outputSource: file2string_input_asn_type/value
output_entries:
type: File?
outputSource: type_based_splitter/output_entries
output_seq_submit:
type: File?
outputSource: type_based_splitter/output_seq_submit
locus_tag_prefix:
type: string
outputSource: file2string_ltp/value
submol_block_json:
type: File
outputSource: yaml2json/output
taxid:
type: int
outputSource: file2int_taxid/value
steps:
yaml2json:
label: "yaml2json"
run: progs/yaml2json.cwl
in:
input: submol
out: [output]
pgapx_yaml_ctl:
label: "pgapx_yaml_ctl"
run: progs/pgapx_yaml_ctl.cwl
in:
input: yaml2json/output
input_fasta: fasta
taxon_db: taxon_db
ignore_all_errors: ignore_all_errors
no_internet: no_internet
out: [output_annotation, output_ltp, input_asn_type, taxid]
file2string_ltp:
run: progs/file2string.cwl
in:
input: pgapx_yaml_ctl/output_ltp
out: [value]
file2string_input_asn_type:
run: progs/file2string.cwl
in:
input: pgapx_yaml_ctl/input_asn_type
out: [value]
file2int_taxid:
run: progs/file2int.cwl
in:
input: pgapx_yaml_ctl/taxid
out: [value]
initial_cleanup:
run: progs/asn_cleanup.cwl
in:
inp_annotation: pgapx_yaml_ctl/output_annotation
outformat:
default: 'text'
out_annotation_name:
default: 'cleaned_input.asn'
out: [annotation]
type_based_splitter:
run:
class: ExpressionTool
inputs:
input:
type: File
input_asn_type:
type: string
outputs:
output_entries:
type: File?
output_seq_submit:
type: File?
expression: "${
if ( inputs.input_asn_type == 'seq-entry' ) {
return {
'output_entries': inputs.input,
'output_seq_submit': null
}
}
if ( inputs.input_asn_type == 'seq-submit' ) {
return {
'output_entries': null,
'output_seq_submit': inputs.input
}
}
}"
in:
input: initial_cleanup/annotation
input_asn_type: file2string_input_asn_type/value
out: [output_entries, output_seq_submit]