Skip to content

Commit 5169324

Browse files
authored
Fix and expand CWL wrapper (#230 #221)
* add verbose option * refactor input bindings * add plasmid parameter * add locus parameter * add debug parameter * refactor JS globs * fix output of genome sequences
1 parent acd4bb3 commit 5169324

File tree

1 file changed

+42
-27
lines changed

1 file changed

+42
-27
lines changed

bakta.cwl

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,35 +38,39 @@ inputs:
3838
id: db
3939
inputBinding: {prefix: --db}
4040
type: Directory
41+
- doc: Minimum contig size (default = 1; 200 in compliant mode)
42+
id: min_contig_length
43+
inputBinding: {prefix: --min-contig-length}
44+
type: int?
45+
- doc: Prefix for output files
46+
id: prefix
47+
inputBinding: {prefix: --prefix}
48+
type: string?
4149
- doc: Output directory (default = current working directory)
4250
id: output
4351
inputBinding: {prefix: --output}
4452
type: Directory?
45-
- doc: Output files prefix
46-
id: prefix
47-
inputBinding: {prefix: --prefix}
48-
type: string?
49-
- doc: Force overwrite output
53+
- doc: Force overwriting existing output folder (except for current working directory)
5054
id: force
5155
inputBinding: {prefix: --force}
5256
default: true
5357
type: boolean?
54-
- doc: Min contig length
55-
id: min_contig_length
56-
inputBinding: {prefix: --min-contig-length}
57-
type: int?
58-
- doc: Genus
58+
- doc: Genus name
5959
id: genus
6060
inputBinding: {prefix: --genus}
6161
type: string?
62-
- doc: Species
62+
- doc: Species name
6363
id: species
6464
inputBinding: {prefix: --species}
6565
type: string?
66-
- doc: Strain
66+
- doc: Strain name
6767
id: strain
6868
inputBinding: {prefix: --strain}
6969
type: string?
70+
- doc: Plasmid name
71+
id: plasmid
72+
inputBinding: {prefix: --plasmid}
73+
type: string?
7074
- doc: All sequences are complete replicons (chromosome/plasmid[s])
7175
id: complete
7276
inputBinding: {prefix: --complete}
@@ -79,14 +83,18 @@ inputs:
7983
id: translation_table
8084
inputBinding: {prefix: --translation-table}
8185
type: int?
82-
- doc: Locus tag
83-
id: locus_tag
84-
inputBinding: {prefix: --locus-tag}
85-
type: string?
8686
- doc: Gram type (default = ?)
8787
id: gram
8888
inputBinding: {prefix: --gram}
8989
type: string?
90+
- doc: Locus prefix (default = contig)
91+
id: locus
92+
inputBinding: {prefix: --locus}
93+
type: string?
94+
- doc: Locus tag prefix (default = autogenerated)
95+
id: locus_tag
96+
inputBinding: {prefix: --locus-tag}
97+
type: string?
9098
- doc: Keep original contig headers
9199
id: keep_contig_headers
92100
inputBinding: {prefix: --keep-contig-headers}
@@ -155,14 +163,23 @@ inputs:
155163
id: skip_plot
156164
inputBinding: {prefix: --skip-plot}
157165
type: boolean?
158-
- doc: Directory for temporary files (default = system dependent auto detection)
159-
id: tmp_dir
160-
inputBinding: {prefix: --tmp-dir}
161-
type: Directory?
166+
- doc: Print verbose information
167+
id: verbose
168+
inputBinding: {prefix: --verbose}
169+
default: true
170+
type: boolean?
171+
- doc: Run Bakta in debug mode
172+
id: debug
173+
inputBinding: {prefix: --debug}
174+
type: boolean?
162175
- doc: Threads
163176
id: threads
164177
inputBinding: {prefix: --threads}
165178
type: int?
179+
- doc: Directory for temporary files (default = system dependent auto detection)
180+
id: tmp_dir
181+
inputBinding: {prefix: --tmp-dir}
182+
type: Directory?
166183

167184
outputs:
168185
- doc: Hypothetical CDS AA sequences as Fasta
@@ -182,11 +199,10 @@ outputs:
182199
outputBinding:
183200
glob: ${
184201
if (inputs.prefix !== null) {
185-
var out = inputs.prefix+'.tsv';
202+
return inputs.prefix + '.tsv';
186203
} else{
187-
var out = inputs.fasta_file.basename.replace(/\.[^/.]+$/, "")+'.tsv';
204+
return inputs.fasta_file.basename.replace(/\.[^/.]+$/, '') + '.tsv';
188205
}
189-
return out
190206
}
191207
- doc: Annotation summary as txt
192208
id: summary_txt
@@ -219,7 +235,7 @@ outputs:
219235
format: edam:format_2200
220236
outputBinding: {glob: '*.fna'}
221237
- doc: Gene DNA sequences as Fasta
222-
id: sequences_fna
238+
id: sequences_ffn
223239
type: File
224240
format: edam:format_2200
225241
outputBinding: {glob: '*.ffn'}
@@ -230,11 +246,10 @@ outputs:
230246
outputBinding:
231247
glob: ${
232248
if (inputs.prefix !== null) {
233-
var out = inputs.prefix+'.faa';
249+
return inputs.prefix + '.faa';
234250
} else{
235-
var out = inputs.fasta_file.basename.replace(/\.[^/.]+$/, "")+'.faa';
251+
return inputs.fasta_file.basename.replace(/\.[^/.]+$/, '') + '.faa';
236252
}
237-
return out
238253
}
239254
- doc: Circular genome plot as PNG
240255
id: plot_png

0 commit comments

Comments
 (0)