|
| 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 |
0 commit comments