-
Notifications
You must be signed in to change notification settings - Fork 90
/
pgap.cwl
executable file
·209 lines (203 loc) · 5.85 KB
/
pgap.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#!/usr/bin/env cwl-runner
class: Workflow
cwlVersion: v1.2
doc: |
PGAP pipeline for external usage, powered via containers,
simple user input: (FASTA + yaml only, no template)
label: 'PGAP Pipeline, simple user input, PGAPX-134'
requirements:
- class: InlineJavascriptRequirement
- class: StepInputExpressionRequirement
- class: SubworkflowFeatureRequirement
- class: MultipleInputFeatureRequirement
- class: LoadListingRequirement
loadListing: deep_listing
- class: NetworkAccess
networkAccess: true
inputs:
supplemental_data:
type: Directory
default:
class: Directory
location: input
blast_hits_cache_data:
type: Directory?
fasta: File
report_usage: boolean
submol: File
ignore_all_errors:
type: boolean?
no_internet:
type: boolean?
make_uuid:
type: boolean?
default: true
uuid_in:
type: File?
xpath_fail_initial_asndisc:
type: string?
xpath_fail_initial_asnvalidate:
type: string?
xpath_fail_final_asndisc:
type: string?
xpath_fail_final_asnvalidate:
type: string?
outputs:
calls:
outputSource: vecscreen/calls
type: File
gbk:
outputSource: standard_pgap/gbk
type: File
gff:
outputSource: standard_pgap/gff
type: File
gff_enhanced:
outputSource: Generate_Annotation_Reports_gff_enhanced/output
type: File
sqn:
outputSource: standard_pgap/sqn
type: File
input_fasta:
outputSource: fasta
type: File
input_submol:
outputSource: submol
type: File
nucleotide_fasta:
outputSource: standard_pgap/nucleotide_fasta
type: File?
protein_fasta:
outputSource: standard_pgap/protein_fasta
type: File?
cds_nucleotide_fasta:
outputSource: standard_pgap/cds_nucleotide_fasta
type: File?
cds_protein_fasta:
outputSource: standard_pgap/cds_protein_fasta
type: File?
initial_asndisc_error_diag:
type: File?
outputSource: standard_pgap/initial_asndisc_error_diag
initial_asnval_error_diag:
type: File?
outputSource: standard_pgap/initial_asnval_error_diag
final_asndisc_error_diag:
type: File?
outputSource: standard_pgap/final_asndisc_error_diag
final_asnval_error_diag:
type: File?
outputSource: standard_pgap/final_asnval_error_diag
checkm_raw:
type: File
outputSource: standard_pgap/checkm_raw
fastaval_errors:
type: File
outputSource: fastaval/out
steps:
passdata:
in:
data: supplemental_data
run:
class: ExpressionTool
requirements:
InlineJavascriptRequirement: {}
inputs:
data:
type: Directory
expression: |
${
var r = {};
var l = inputs.data.listing;
var n = l.length;
for (var i = 0; i < n; i++) {
if (l[i].basename == 'contam_in_prok_blastdb_dir') {
r['contam_in_prok_blastdb_dir'] = l[i];
}
if (l[i].basename == 'adaptor_fasta.fna') {
r['adaptor_fasta'] = l[i];
}
if (l[i].basename == 'uniColl_path') {
var ul = l[i].listing;
var un = ul.length;
for (var j = 0; j < un; j++) {
if (ul[j].basename == 'taxonomy.sqlite3') {
r['taxon_db'] = ul[j];
}
}
}
}
return r;
}
outputs:
taxon_db:
type: File
adaptor_fasta:
type: File
contam_in_prok_blastdb_dir:
type: Directory
out:
- taxon_db
- adaptor_fasta
- contam_in_prok_blastdb_dir
prepare_input_template:
run: prepare_user_input2.cwl
label: Prepare user input
in:
fasta: fasta
submol: submol
taxon_db: passdata/taxon_db
ignore_all_errors: ignore_all_errors
no_internet: no_internet
out: [output_seq_submit, output_entries, locus_tag_prefix, submol_block_json, taxid]
fastaval:
run: progs/fastaval.cwl
in:
in: fasta
check_min_seqlen:
default: 200
check_internal_ns:
default: true
ignore_all_errors: ignore_all_errors
out: [success, out]
vecscreen:
run: vecscreen/vecscreen.cwl
in:
contig_fasta: fasta
adaptor_fasta: passdata/adaptor_fasta
contam_in_prok_blastdb_dir: passdata/contam_in_prok_blastdb_dir
ignore_all_errors: ignore_all_errors
out: [success, calls]
standard_pgap:
label: PGAP Pipeline
in:
go:
- fastaval/success
- vecscreen/success
entries: prepare_input_template/output_entries
seq_submit: prepare_input_template/output_seq_submit
supplemental_data: supplemental_data
gc_assm_name:
source: "#fasta"
valueFrom: $(inputs.gc_assm_name.basename)
locus_tag_prefix: prepare_input_template/locus_tag_prefix
report_usage: report_usage
taxid: prepare_input_template/taxid
submol_block_json: prepare_input_template/submol_block_json
ignore_all_errors: ignore_all_errors
no_internet: no_internet
make_uuid: make_uuid
uuid_in: uuid_in
blast_hits_cache_data: blast_hits_cache_data
xpath_fail_initial_asndisc: xpath_fail_initial_asndisc
xpath_fail_initial_asnvalidate: xpath_fail_initial_asnvalidate
xpath_fail_final_asndisc: xpath_fail_final_asndisc
xpath_fail_final_asnvalidate: xpath_fail_final_asnvalidate
out: [gbent, gbk, gff, nucleotide_fasta, protein_fasta, cds_nucleotide_fasta, cds_protein_fasta, sqn, initial_asndisc_error_diag, initial_asnval_error_diag, final_asndisc_error_diag, final_asnval_error_diag, checkm_raw, checkm_results]
run: wf_common.cwl
Generate_Annotation_Reports_gff_enhanced:
run: progs/produce_enhanced_gff.cwl
in:
gff: standard_pgap/gff
fasta: fasta
out: [output]