forked from PolusAI/mm-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DiffDock cwl and yml files as well as docker images and python sc…
…ripts
- Loading branch information
Brandon Duane Walker
authored and
Brandon Duane Walker
committed
Sep 19, 2023
1 parent
702d200
commit 378e9df
Showing
25 changed files
with
1,460 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
#!/usr/bin/env cwl-runner | ||
cwlVersion: v1.0 | ||
|
||
class: CommandLineTool | ||
|
||
label: DiffDock Diffusion based protein ligand docking | ||
|
||
doc: |- | ||
DiffDock Diffusion based protein ligand docking | ||
|
||
baseCommand: ["bash", "diffdock_cmds.sh"] | ||
|
||
hints: | ||
DockerRequirement: | ||
dockerPull: mrbrandonwalker/diffdock_cpu | ||
|
||
requirements: | ||
InlineJavascriptRequirement: {} | ||
InitialWorkDirRequirement: | ||
listing: | | ||
${ | ||
var lst = []; | ||
lst.push(inputs.protein_path); | ||
lst.push(inputs.ligand_path); | ||
lst.push(inputs.script_path); | ||
return lst; | ||
} | ||
|
||
inputs: | ||
|
||
script_path: | ||
type: File | ||
|
||
protein_path: | ||
type: File | ||
|
||
ligand_path: | ||
type: File | ||
|
||
protein_ligand_inputs: | ||
label: csv file of protein and ligand file paths | ||
type: File | ||
inputBinding: | ||
prefix: --protein_ligand_csv | ||
|
||
inference_steps: | ||
label: number of reverse diffusion steps | ||
type: int? | ||
inputBinding: | ||
prefix: --inference_steps | ||
default: 20 | ||
|
||
samples_per_complex: | ||
label: Number of sample poses to generate per complex | ||
type: int? | ||
inputBinding: | ||
prefix: --samples_per_complex | ||
default: 40 | ||
|
||
batch_size: | ||
label: input batch size for neural net | ||
type: int? | ||
inputBinding: | ||
prefix: --batch_size | ||
default: 10 | ||
|
||
out_dir: | ||
label: where output from diffdock is saved | ||
type: string? | ||
inputBinding: | ||
prefix: --out_dir | ||
default: results/ | ||
|
||
model_dir: | ||
label: directory of DiffDock score model from paper | ||
type: string? | ||
inputBinding: | ||
prefix: --model_dir | ||
default: /DiffDock/workdir/paper_score_model/ | ||
|
||
confidence_model_dir: | ||
label: directory of DiffDock confidence model from paper | ||
type: string? | ||
inputBinding: | ||
prefix: --confidence_model_dir | ||
default: /DiffDock/workdir/paper_confidence_model | ||
|
||
output_files: | ||
type: string? | ||
|
||
execution_time: | ||
type: string? | ||
|
||
outputs: | ||
|
||
output_files: | ||
type: Directory? | ||
outputBinding: | ||
glob: $(inputs.out_dir) | ||
|
||
stdout: | ||
type: File | ||
outputBinding: | ||
glob: stdout | ||
|
||
stderr: | ||
type: File | ||
outputBinding: | ||
glob: stderr | ||
|
||
execution_time: | ||
label: Time to run DiffDock | ||
doc: |- | ||
Time to run DiffDock | ||
type: float | ||
outputBinding: | ||
glob: stderr | ||
loadContents: true | ||
outputEval: | | ||
${ | ||
// the time command outputs to stderr and not to stdout | ||
// example output below, parse the float value of seconds (first item in line) | ||
// 345.6 | ||
const lines = self[0].contents.split("\n"); | ||
for (var i = 0; i < lines.length; i++) { | ||
const indices = lines[i].split(" "); | ||
if (indices.length == 1) { | ||
if (indices[0] != '') { | ||
const datum = parseFloat(indices[0]); | ||
return datum; | ||
} | ||
} | ||
} | ||
} | ||
|
||
stdout: stdout | ||
|
||
stderr: stderr | ||
|
||
$namespaces: | ||
edam: https://edamontology.org/ | ||
|
||
$schemas: | ||
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
#!/usr/bin/env cwl-runner | ||
cwlVersion: v1.0 | ||
|
||
class: CommandLineTool | ||
|
||
label: DiffDock Diffusion based protein ligand docking | ||
|
||
doc: |- | ||
DiffDock Diffusion based protein ligand docking | ||
|
||
baseCommand: ["bash", "diffdock_cmds.sh"] | ||
|
||
hints: | ||
cwltool:CUDARequirement: | ||
cudaVersionMin: "11.7" | ||
cudaComputeCapabilityMin: "3.0" | ||
cudaDeviceCountMin: 0 | ||
DockerRequirement: | ||
dockerPull: mrbrandonwalker/diffdock_gpu | ||
|
||
requirements: | ||
InlineJavascriptRequirement: {} | ||
InitialWorkDirRequirement: | ||
listing: | | ||
${ | ||
var lst = []; | ||
lst.push(inputs.protein_path); | ||
lst.push(inputs.ligand_path); | ||
lst.push(inputs.script_path); | ||
return lst; | ||
} | ||
|
||
inputs: | ||
|
||
script_path: | ||
type: File | ||
|
||
protein_path: | ||
type: File | ||
|
||
ligand_path: | ||
type: File | ||
|
||
protein_ligand_inputs: | ||
label: csv file of protein and ligand file paths | ||
type: File | ||
inputBinding: | ||
prefix: --protein_ligand_csv | ||
|
||
inference_steps: | ||
label: number of reverse diffusion steps | ||
type: int? | ||
inputBinding: | ||
prefix: --inference_steps | ||
default: 20 | ||
|
||
samples_per_complex: | ||
label: Number of sample poses to generate per complex | ||
type: int? | ||
inputBinding: | ||
prefix: --samples_per_complex | ||
default: 40 | ||
|
||
batch_size: | ||
label: input batch size for neural net | ||
type: int? | ||
inputBinding: | ||
prefix: --batch_size | ||
default: 10 | ||
|
||
out_dir: | ||
label: where output from diffdock is saved | ||
type: string? | ||
inputBinding: | ||
prefix: --out_dir | ||
default: results/ | ||
|
||
model_dir: | ||
label: directory of DiffDock score model from paper | ||
type: string? | ||
inputBinding: | ||
prefix: --model_dir | ||
default: /DiffDock/workdir/paper_score_model/ | ||
|
||
confidence_model_dir: | ||
label: directory of DiffDock confidence model from paper | ||
type: string? | ||
inputBinding: | ||
prefix: --confidence_model_dir | ||
default: /DiffDock/workdir/paper_confidence_model | ||
|
||
output_files: | ||
type: string? | ||
|
||
execution_time: | ||
type: string? | ||
|
||
outputs: | ||
|
||
output_files: | ||
type: Directory? | ||
outputBinding: | ||
glob: $(inputs.out_dir) | ||
|
||
stdout: | ||
type: File | ||
outputBinding: | ||
glob: stdout | ||
|
||
stderr: | ||
type: File | ||
outputBinding: | ||
glob: stderr | ||
|
||
execution_time: | ||
label: Time to run DiffDock | ||
doc: |- | ||
Time to run DiffDock | ||
type: float | ||
outputBinding: | ||
glob: stderr | ||
loadContents: true | ||
outputEval: | | ||
${ | ||
// the time command outputs to stderr and not to stdout | ||
// example output below, parse the float value of seconds (first item in line) | ||
// 345.6 | ||
const lines = self[0].contents.split("\n"); | ||
for (var i = 0; i < lines.length; i++) { | ||
const indices = lines[i].split(" "); | ||
if (indices.length == 1) { | ||
if (indices[0] != '') { | ||
const datum = parseFloat(indices[0]); | ||
return datum; | ||
} | ||
} | ||
} | ||
} | ||
|
||
stdout: stdout | ||
|
||
stderr: stderr | ||
|
||
$namespaces: | ||
edam: https://edamontology.org/ | ||
cwltool: http://commonwl.org/cwltool# | ||
|
||
$schemas: | ||
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env cwl-runner | ||
cwlVersion: v1.0 | ||
|
||
class: CommandLineTool | ||
|
||
label: DiffDock Diffusion pose ranking | ||
|
||
doc: |- | ||
DiffDock Diffusion pose ranking | ||
|
||
baseCommand: ["python", "/rank_diffdock_poses.py"] | ||
|
||
hints: | ||
DockerRequirement: | ||
dockerPull: mrbrandonwalker/rank_diffdock_poses | ||
|
||
requirements: | ||
InlineJavascriptRequirement: {} | ||
InitialWorkDirRequirement: | ||
listing: | ||
- entry: $(inputs.output_files_path) | ||
writable: true # toil requires this to copy/access the files in folder | ||
|
||
inputs: | ||
|
||
output_files_path: | ||
type: Directory | ||
|
||
top_n_confident: | ||
type: float | ||
inputBinding: | ||
prefix: --top_n_confident | ||
default: 10 | ||
|
||
top_percent_confidence: | ||
type: float | ||
inputBinding: | ||
prefix: --top_percent_confidence | ||
default: 33 | ||
|
||
output_poses: | ||
type: string? | ||
|
||
|
||
outputs: | ||
|
||
output_poses: | ||
type: | ||
type: array | ||
items: File | ||
outputBinding: | ||
glob: "*ranked*.sdf" | ||
format: edam:format_3814 | ||
|
||
stdout: | ||
type: File | ||
outputBinding: | ||
glob: stdout | ||
|
||
stdout: stdout | ||
|
||
$namespaces: | ||
edam: https://edamontology.org/ | ||
|
||
$schemas: | ||
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl |
Oops, something went wrong.