Skip to content

Commit 4c2937e

Browse files
committed
add scoring_onionnet workflow
1 parent 4436f4b commit 4c2937e

12 files changed

+634
-54
lines changed

Diff for: cwl_adapters/autodock_vina.cwl

+221
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
2+
#!/usr/bin/env cwl-runner
3+
cwlVersion: v1.1 # See `loadContents: true` below!
4+
5+
class: CommandLineTool
6+
7+
label: Wrapper of the AutoDock Vina software.
8+
9+
doc: |-
10+
This class performs docking of the ligand to a set of grids describing the target protein via the AutoDock Vina software.
11+
12+
baseCommand: vina # NOTE: Only version >=1.2 supports --batch!
13+
arguments:
14+
# Need to parse box.pdb and pass in each number separately.
15+
# REMARK BOX CENTER: 0.102 0.019 -0.004 SIZE: 30.195 31.940 27.005
16+
# - "--dir" # Need to explicitly pass --dir . in --batch mode
17+
# - "."
18+
- "--center_x"
19+
- $(inputs.input_box_path.contents.split("\n")[0].split(" ").filter(function(s) {return !isNaN(parseFloat(s))})[0])
20+
- "--center_y"
21+
- $(inputs.input_box_path.contents.split("\n")[0].split(" ").filter(function(s) {return !isNaN(parseFloat(s))})[1])
22+
- "--center_z"
23+
- $(inputs.input_box_path.contents.split("\n")[0].split(" ").filter(function(s) {return !isNaN(parseFloat(s))})[2])
24+
- "--size_x"
25+
- $(inputs.input_box_path.contents.split("\n")[0].split(" ").filter(function(s) {return !isNaN(parseFloat(s))})[3])
26+
- "--size_y"
27+
- $(inputs.input_box_path.contents.split("\n")[0].split(" ").filter(function(s) {return !isNaN(parseFloat(s))})[4])
28+
- "--size_z"
29+
- $(inputs.input_box_path.contents.split("\n")[0].split(" ").filter(function(s) {return !isNaN(parseFloat(s))})[5])
30+
# NOTE: Cannot use a single javascript expression to create the entire arguments list because CWL treats it as a string:
31+
# "the `arguments` field is not valid because value is a str"
32+
# ${
33+
# var words = inputs.input_box_path.contents.split("\n")[0].split(" ");
34+
# var nums = words.filter(function(s) {return !isNaN(parseFloat(s))});
35+
# var args = {};
36+
# args.push("--dir"); // Need to explicitly pass --dir . in --batch mode
37+
# args.push(".");
38+
# args.push("--center_x");
39+
# args.push(nums[0]);
40+
# args.push("--center_y");
41+
# args.push(nums[1]);
42+
# args.push("--center_z");
43+
# args.push(nums[2]);
44+
# args.push("--size_x");
45+
# args.push(nums[3]);
46+
# args.push("--size_y");
47+
# args.push(nums[4]);
48+
# args.push("--size_z");
49+
# args.push(nums[5]);
50+
# return args;
51+
# }
52+
53+
hints:
54+
DockerRequirement:
55+
dockerPull: jakefennick/autodock_vina
56+
57+
requirements:
58+
InlineJavascriptRequirement: {}
59+
60+
inputs:
61+
input_ligand_pdbqt_path:
62+
label: Path to the input PDBQT ligand
63+
doc: |-
64+
Path to the input PDBQT ligand
65+
Type: string
66+
File type: input
67+
Accepted formats: pdbqt
68+
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_ligand.pdbqt
69+
type: File
70+
format:
71+
- edam:format_1476
72+
inputBinding:
73+
prefix: --ligand
74+
75+
input_receptor_pdbqt_path:
76+
label: Path to the input PDBQT receptor
77+
doc: |-
78+
Path to the input PDBQT receptor
79+
Type: string
80+
File type: input
81+
Accepted formats: pdbqt
82+
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_receptor.pdbqt
83+
type: File
84+
format:
85+
- edam:format_1476
86+
inputBinding:
87+
#position: 2
88+
prefix: --receptor
89+
90+
input_box_path:
91+
label: Path to the PDB containing the residues belonging to the binding site
92+
doc: |-
93+
Path to the PDB containing the residues belonging to the binding site
94+
Type: string
95+
File type: input
96+
Accepted formats: pdb
97+
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_box.pdb
98+
type: File
99+
format:
100+
- edam:format_1476
101+
# inputBinding:
102+
# position: 3
103+
# prefix: --input_box_path
104+
loadContents: true # requires cwlVersion: v1.1
105+
# See https://www.commonwl.org/v1.1/CommandLineTool.html#Changelog
106+
# Curiously, cwlVersion: v1.0 allows loadContents for outputs, but not inputs.
107+
108+
output_pdbqt_path:
109+
label: Path to the output PDBQT file
110+
doc: |-
111+
Path to the output PDBQT file
112+
Type: string
113+
File type: output
114+
Accepted formats: pdbqt
115+
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.pdbqt
116+
type: string
117+
format:
118+
- edam:format_1476
119+
inputBinding:
120+
prefix: --out
121+
default: system.pdbqt
122+
123+
output_log_path:
124+
label: Path to the log file
125+
doc: |-
126+
Path to the log file
127+
Type: string
128+
File type: output
129+
Accepted formats: log
130+
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.log
131+
type: string
132+
format:
133+
- edam:format_2330
134+
default: system.log
135+
136+
cpu:
137+
label: The number of CPUs to use
138+
doc: |-
139+
The number of CPUs to use
140+
Type: int
141+
type: int?
142+
format:
143+
- edam:format_2330
144+
inputBinding:
145+
prefix: --cpu
146+
default: 1
147+
148+
exhaustiveness:
149+
label: exhaustiveness of the global search (roughly proportional to time).
150+
doc: |-
151+
exhaustiveness of the global search (roughly proportional to time).
152+
Type: int
153+
type: int?
154+
format:
155+
- edam:format_2330
156+
inputBinding:
157+
prefix: --exhaustiveness
158+
default: 8
159+
160+
num_modes:
161+
label: maximum number of binding modes to generate
162+
doc: |-
163+
Tmaximum number of binding modes to generate
164+
Type: int
165+
type: int?
166+
format:
167+
- edam:format_2330
168+
inputBinding:
169+
prefix: --num_modes
170+
default: 9
171+
172+
min_rmsd:
173+
label: The minimum RMSD between output poses
174+
doc: |-
175+
The minimum RMSD between output poses
176+
Type: int
177+
type: int?
178+
format:
179+
- edam:format_2330
180+
inputBinding:
181+
prefix: --min_rmsd
182+
default: 1
183+
184+
energy_range:
185+
label: maximum energy difference between the best binding mode and the worst one displayed (kcal/mol).
186+
doc: |-
187+
maximum energy difference between the best binding mode and the worst one displayed (kcal/mol).
188+
Type: int
189+
type: int?
190+
format:
191+
- edam:format_2330
192+
inputBinding:
193+
prefix: --energy_range
194+
default: 3
195+
196+
outputs:
197+
output_pdbqt_path:
198+
label: Path to the output PDBQT file
199+
doc: |-
200+
Path to the output PDBQT file
201+
type: File
202+
outputBinding:
203+
glob: $(inputs.output_pdbqt_path)
204+
format: edam:format_1476
205+
206+
output_log_path:
207+
label: Path to the log file
208+
doc: |-
209+
Path to the log file
210+
type: File
211+
outputBinding:
212+
glob: $(inputs.output_log_path)
213+
format: edam:format_2330
214+
215+
stdout: $(inputs.output_log_path)
216+
217+
$namespaces:
218+
edam: https://edamontology.org/
219+
220+
$schemas:
221+
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl

Diff for: cwl_adapters/convert_pdb.cwl

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
#!/usr/bin/env cwl-runner
2+
cwlVersion: v1.0
3+
4+
class: CommandLineTool
5+
6+
label: This class is a wrapper of the Open Babel tool.
7+
8+
doc: |-
9+
Small molecule format conversion for structures or trajectories. Open Babel is a chemical toolbox designed to speak the many languages of chemical data. It's an open, collaborative project allowing anyone to search, convert, analyze, or store data from molecular modeling, chemistry, solid-state materials, biochemistry, or related areas. Visit the official page.
10+
11+
baseCommand: obabel
12+
#Usage:
13+
#obabel[-i<input-type>] <infilename> [-o<output-type>] -O<outfilename> [Options]
14+
#...
15+
#Options, other than -i -o -O -m, must come after the input files.
16+
arguments: [$(inputs.input_path), "-h", "-o", "pdb", "-O", $(inputs.output_pdb_path)]
17+
# NOTE: These arguments must be given individually; they cannot be concatenated together.
18+
# (e.g. -xrhn) Otherwise, all but the first argument will be silently ignored!
19+
20+
# pdb format options
21+
# Read Options e.g. -as
22+
# s Output single bonds only
23+
# b Disable bonding entirely
24+
# c Ignore CONECT records
25+
26+
# Write Options, e.g. -xo
27+
# n Do not write duplicate CONECT records to indicate bond order
28+
# o Write origin in space group label (CRYST1 section)
29+
30+
hints:
31+
DockerRequirement:
32+
dockerPull: quay.io/biocontainers/biobb_chemistry:4.0.0--pyhdfd78af_1
33+
34+
requirements:
35+
InlineJavascriptRequirement: {}
36+
37+
inputs:
38+
first_molecule:
39+
label: Index of the first molecule (1-based)
40+
doc: |-
41+
Input Index of the first molecule (1-based)
42+
Type: string?
43+
type: string?
44+
format:
45+
- edam:format_2330 # 'Textual format'
46+
inputBinding:
47+
prefix: -f
48+
49+
last_molecule:
50+
label: Index of the last molecule (1-based)
51+
doc: |-
52+
Input Index of the last molecule (1-based)
53+
Type: string?
54+
type: string?
55+
format:
56+
- edam:format_2330 # 'Textual format'
57+
inputBinding:
58+
prefix: -l
59+
60+
input_path:
61+
label: Path to the input file
62+
doc: |-
63+
Path to the input file
64+
Type: string
65+
File type: input
66+
Accepted formats: dat, ent, fa, fasta, gro, inp, log, mcif, mdl, mmcif, mol, mol2, pdb, pdbqt, png, sdf, smi, smiles, txt, xml, xtc
67+
Example file: https://github.com/bioexcel/biobb_chemistry/raw/master/biobb_chemistry/test/data/babel/babel.smi
68+
type: File
69+
format:
70+
- edam:format_1637
71+
- edam:format_1476
72+
- edam:format_1929
73+
- edam:format_1929
74+
- edam:format_2033
75+
- edam:format_3878
76+
- edam:format_2030
77+
- edam:format_1477
78+
- edam:format_3815
79+
- edam:format_1477
80+
- edam:format_3815
81+
- edam:format_3816
82+
- edam:format_1476
83+
- edam:format_1476
84+
- edam:format_3603
85+
- edam:format_3814
86+
- edam:format_1196
87+
- edam:format_1196
88+
- edam:format_2033
89+
- edam:format_2332
90+
- edam:format_3875
91+
92+
output_pdb_path:
93+
label: Path to the output file
94+
doc: |-
95+
Path to the output file
96+
Type: string
97+
File type: output
98+
Accepted formats: pdb
99+
type: string
100+
format:
101+
- edam:format_1476 # pdb
102+
default: system.pdb
103+
104+
arg1:
105+
label: Additional arguments
106+
doc: |-
107+
Additional arguments
108+
Type: string?
109+
type: string?
110+
format:
111+
- edam:format_2330 # 'Textual format'
112+
inputBinding:
113+
position: 1
114+
115+
outputs:
116+
output_pdb_path:
117+
label: Path to the output file
118+
doc: |-
119+
Path to the output file
120+
type: File
121+
outputBinding:
122+
glob: $(inputs.output_pdb_path)
123+
format: edam:format_1476 # pdb
124+
125+
$namespaces:
126+
edam: https://edamontology.org/
127+
128+
$schemas:
129+
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl

Diff for: cwl_adapters/onionnet_featurize.cwl

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class: CommandLineTool
55

66
label: Generate the features for the protein-ligand complexes using OnionNet V1
77

8-
baseCommand: ["python", "/onionnet/generate_features.py"]
8+
baseCommand: ["conda", "run", "-n", "py37", "python", "/onionnet/generate_features.py"]
99
arguments: ["-inp", "input.dat"]
1010

1111
hints:

Diff for: cwl_adapters/onionnet_score.cwl

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class: CommandLineTool
55

66
label: OnionNet (version1) for rescoring of docking poses
77

8-
baseCommand: ["python", "/onionnet/predict.py"]
8+
baseCommand: ["conda", "run", "-n", "py37", "python", "/onionnet/predict.py"]
99

1010
hints:
1111
DockerRequirement:

0 commit comments

Comments
 (0)