-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Brandon Duane Walker
authored and
Brandon Duane Walker
committed
May 28, 2024
1 parent
8556c48
commit 3399086
Showing
17 changed files
with
343 additions
and
6,554 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,2 @@ | ||
*.pdb filter=lfs diff=lfs merge=lfs -text | ||
*.pdbqt filter=lfs diff=lfs merge=lfs -text |
29 changes: 29 additions & 0 deletions
29
utils/docking/autodock-vina/autodock-vina-run-tool/.bumpversion.cfg
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,29 @@ | ||
[bumpversion] | ||
current_version = 0.1.0 | ||
commit = False | ||
tag = False | ||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<dev>\d+))? | ||
serialize = | ||
{major}.{minor}.{patch}-{release}{dev} | ||
{major}.{minor}.{patch} | ||
|
||
[bumpversion:part:release] | ||
optional_value = _ | ||
first_value = dev | ||
values = | ||
dev | ||
_ | ||
|
||
[bumpversion:part:dev] | ||
|
||
[bumpversion:file:pyproject.toml] | ||
search = version = "{current_version}" | ||
replace = version = "{new_version}" | ||
|
||
[bumpversion:file:VERSION] | ||
|
||
[bumpversion:file:README.md] | ||
|
||
[bumpversion:file:plugin.json] | ||
|
||
[bumpversion:file:src/polus/mm/utils/autodock_vina_run/__init__.py] |
4 changes: 4 additions & 0 deletions
4
utils/docking/autodock-vina/autodock-vina-run-tool/.dockerignore
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,4 @@ | ||
.venv | ||
out | ||
tests | ||
__pycache__ |
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 @@ | ||
poetry.lock |
5 changes: 5 additions & 0 deletions
5
utils/docking/autodock-vina/autodock-vina-run-tool/CHANGELOG.md
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,5 @@ | ||
# CHANGELOG | ||
|
||
## 0.1.0 | ||
|
||
Initial release. |
18 changes: 18 additions & 0 deletions
18
utils/docking/autodock-vina/autodock-vina-run-tool/README.md
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,18 @@ | ||
# autodock_vina_run (0.1.0) | ||
|
||
Wrapper of the AutoDock Vina software. | ||
|
||
## Options | ||
|
||
This plugin takes 6 input arguments and 2 output argument: | ||
|
||
| Name | Description | I/O | Type | Default | | ||
|---------------|-------------------------|--------|--------|---------| | ||
| input_ligand_pdbqt_path | Path to the input PDBQT ligand, Type: string, File type: input, Accepted formats: pdbqt, Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_ligand.pdbqt | Input | File | File | | ||
| input_receptor_pdbqt_path | Path to the input PDBQT receptor, Type: string, File type: input, Accepted formats: pdbqt, Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_receptor.pdbqt | Input | File | File | | ||
| input_box_path | Path to the PDB containig the residues belonging to the binding site, Type: string, File type: input, Accepted formats: pdb, Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_box.pdb | Input | File | File | | ||
| output_pdbqt_path | Path to the output PDBQT file, Type: string, File type: output, Accepted formats: pdbqt, Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.pdbqt | Input | string | string | | ||
| output_log_path | Path to the log file, Type: string, File type: output, Accepted formats: log, Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.log | Input | string | string | | ||
| config | Advanced configuration options for biobb_vs AutoDockVinaRun. This should be passed as a string containing a dict. The possible options to include here are listed under 'properties' in the biobb_vs AutoDockVinaRun documentation: https://biobb-vs.readthedocs.io/en/latest/vina.html#module-vina.autodock_vina_run | Input | string | string | | ||
| output_pdbqt_path | Path to the output PDBQT file | Output | File | File | | ||
| output_log_path | Path to the log file | Output | File | File | |
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 @@ | ||
0.1.0 |
120 changes: 120 additions & 0 deletions
120
utils/docking/autodock-vina/autodock-vina-run-tool/autodock_vina_run.cwl
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,120 @@ | ||
#!/usr/bin/env cwl-runner | ||
cwlVersion: v1.0 | ||
|
||
class: CommandLineTool | ||
|
||
label: Wrapper of the AutoDock Vina software. | ||
|
||
doc: |- | ||
This class performs docking of the ligand to a set of grids describing the target protein via the AutoDock Vina software. | ||
|
||
baseCommand: autodock_vina_run | ||
|
||
hints: | ||
DockerRequirement: | ||
dockerPull: quay.io/biocontainers/biobb_vs:4.0.0--pyhdfd78af_2 | ||
|
||
inputs: | ||
input_ligand_pdbqt_path: | ||
label: Path to the input PDBQT ligand | ||
doc: |- | ||
Path to the input PDBQT ligand | ||
Type: string | ||
File type: input | ||
Accepted formats: pdbqt | ||
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_ligand.pdbqt | ||
type: File | ||
format: edam:format_1476 | ||
inputBinding: | ||
position: 1 | ||
prefix: --input_ligand_pdbqt_path | ||
|
||
input_receptor_pdbqt_path: | ||
label: Path to the input PDBQT receptor | ||
doc: |- | ||
Path to the input PDBQT receptor | ||
Type: string | ||
File type: input | ||
Accepted formats: pdbqt | ||
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_receptor.pdbqt | ||
type: File | ||
format: edam:format_1476 | ||
inputBinding: | ||
position: 2 | ||
prefix: --input_receptor_pdbqt_path | ||
|
||
input_box_path: | ||
label: Path to the PDB containig the residues belonging to the binding site | ||
doc: |- | ||
Path to the PDB containig the residues belonging to the binding site | ||
Type: string | ||
File type: input | ||
Accepted formats: pdb | ||
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_box.pdb | ||
type: File | ||
format: edam:format_1476 | ||
inputBinding: | ||
position: 3 | ||
prefix: --input_box_path | ||
|
||
output_pdbqt_path: | ||
label: Path to the output PDBQT file | ||
doc: |- | ||
Path to the output PDBQT file | ||
Type: string | ||
File type: output | ||
Accepted formats: pdbqt | ||
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.pdbqt | ||
type: string | ||
format: edam:format_1476 | ||
inputBinding: | ||
position: 4 | ||
prefix: --output_pdbqt_path | ||
default: system.pdbqt | ||
|
||
output_log_path: | ||
label: Path to the log file | ||
doc: |- | ||
Path to the log file | ||
Type: string | ||
File type: output | ||
Accepted formats: log | ||
Example file: https://github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.log | ||
type: string | ||
format: edam:format_2330 | ||
inputBinding: | ||
prefix: --output_log_path | ||
default: system.log | ||
|
||
config: | ||
label: Advanced configuration options for biobb_vs AutoDockVinaRun | ||
doc: |- | ||
Advanced configuration options for biobb_vs AutoDockVinaRun. This should be passed as a string containing a dict. The possible options to include here are listed under 'properties' in the biobb_vs AutoDockVinaRun documentation: https://biobb-vs.readthedocs.io/en/latest/vina.html#module-vina.autodock_vina_run | ||
type: string? | ||
inputBinding: | ||
prefix: --config | ||
|
||
outputs: | ||
output_pdbqt_path: | ||
label: Path to the output PDBQT file | ||
doc: |- | ||
Path to the output PDBQT file | ||
type: File | ||
outputBinding: | ||
glob: $(inputs.output_pdbqt_path) | ||
format: edam:format_1476 | ||
|
||
output_log_path: | ||
label: Path to the log file | ||
doc: |- | ||
Path to the log file | ||
type: File? | ||
outputBinding: | ||
glob: $(inputs.output_log_path) | ||
format: edam:format_2330 | ||
|
||
$namespaces: | ||
edam: https://edamontology.org/ | ||
|
||
$schemas: | ||
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl |
88 changes: 88 additions & 0 deletions
88
utils/docking/autodock-vina/autodock-vina-run-tool/ict.yml
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,88 @@ | ||
specVersion: "0.1.0" | ||
name: autodock_vina_run | ||
version: 0.1.0 | ||
container: autodock-vina-run-tool | ||
entrypoint: | ||
title: autodock_vina_run | ||
description: Wrapper of the AutoDock Vina software. | ||
author: Data Scientist | ||
contact: [email protected] | ||
repository: | ||
documentation: | ||
citation: | ||
|
||
inputs: | ||
- name: input_ligand_pdbqt_path | ||
required: true | ||
description: Path to the input PDBQT ligand, Type string, File type input, Accepted formats pdbqt, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_ligand.pdbqt | ||
type: File | ||
format: | ||
uri: edam:format_1476 | ||
- name: input_receptor_pdbqt_path | ||
required: true | ||
description: Path to the input PDBQT receptor, Type string, File type input, Accepted formats pdbqt, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_receptor.pdbqt | ||
type: File | ||
format: | ||
uri: edam:format_1476 | ||
- name: input_box_path | ||
required: true | ||
description: Path to the PDB containig the residues belonging to the binding site, Type string, File type input, Accepted formats pdb, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_box.pdb | ||
type: File | ||
format: | ||
uri: edam:format_1476 | ||
- name: output_pdbqt_path | ||
required: true | ||
description: Path to the output PDBQT file, Type string, File type output, Accepted formats pdbqt, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.pdbqt | ||
type: string | ||
defaultValue: system.pdbqt | ||
format: | ||
uri: edam:format_1476 | ||
- name: output_log_path | ||
required: true | ||
description: Path to the log file, Type string, File type output, Accepted formats log, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.log | ||
type: string | ||
defaultValue: system.log | ||
format: | ||
uri: edam:format_2330 | ||
- name: config | ||
required: true | ||
description: Advanced configuration options for biobb_vs AutoDockVinaRun. This should be passed as a string containing a dict. The possible options to include here are listed under 'properties' in the biobb_vs AutoDockVinaRun documentation https//biobb-vs.readthedocs.io/en/latest/vina.html#module-vina.autodock_vina_run | ||
type: string | ||
outputs: | ||
- name: output_pdbqt_path | ||
required: true | ||
description: Path to the output PDBQT file | ||
type: File | ||
format: | ||
uri: edam:format_1476 | ||
- name: output_log_path | ||
required: true | ||
description: Path to the log file | ||
type: File | ||
format: | ||
uri: edam:format_2330 | ||
ui: | ||
- key: inputs.input_ligand_pdbqt_path | ||
title: "input_ligand_pdbqt_path: " | ||
description: "Path to the input PDBQT ligand, Type string, File type input, Accepted formats pdbqt, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_ligand.pdbqt" | ||
type: File | ||
- key: inputs.input_receptor_pdbqt_path | ||
title: "input_receptor_pdbqt_path: " | ||
description: "Path to the input PDBQT receptor, Type string, File type input, Accepted formats pdbqt, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_receptor.pdbqt" | ||
type: File | ||
- key: inputs.input_box_path | ||
title: "input_box_path: " | ||
description: "Path to the PDB containig the residues belonging to the binding site, Type string, File type input, Accepted formats pdb, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/data/vina/vina_box.pdb" | ||
type: File | ||
- key: inputs.output_pdbqt_path | ||
title: "output_pdbqt_path: " | ||
description: "Path to the output PDBQT file, Type string, File type output, Accepted formats pdbqt, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.pdbqt" | ||
type: string | ||
- key: inputs.output_log_path | ||
title: "output_log_path: " | ||
description: "Path to the log file, Type string, File type output, Accepted formats log, Example file https//github.com/bioexcel/biobb_vs/raw/master/biobb_vs/test/reference/vina/ref_output_vina.log" | ||
type: string | ||
- key: inputs.config | ||
title: "config: " | ||
description: "Advanced configuration options for biobb_vs AutoDockVinaRun. This should be passed as a string containing a dict. The possible options to include here are listed under 'properties' in the biobb_vs AutoDockVinaRun documentation https//biobb-vs.readthedocs.io/en/latest/vina.html#module-vina.autodock_vina_run" | ||
type: string |
29 changes: 29 additions & 0 deletions
29
utils/docking/autodock-vina/autodock-vina-run-tool/pyproject.toml
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,29 @@ | ||
[tool.poetry] | ||
name = "polus-mm-utils-autodock-vina-run" | ||
version = "0.1.0" | ||
description = "Wrapper of the AutoDock Vina software." | ||
authors = ["Data Scientist <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9,<3.12" | ||
cwl-utils = "0.33" | ||
cwltool = "3.1.20240404144621" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
bump2version = "^1.0.1" | ||
pytest = "^7.4" | ||
pytest-sugar = "^0.9.6" | ||
pre-commit = "^3.2.1" | ||
black = "^23.3.0" | ||
mypy = "^1.1.1" | ||
ruff = "^0.0.270" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.pytest.ini_options] | ||
pythonpath = [ | ||
"." | ||
] |
1 change: 1 addition & 0 deletions
1
utils/docking/autodock-vina/autodock-vina-run-tool/tests/__init__.py
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 @@ | ||
"""Tests for autodock_vina_run.""" |
30 changes: 30 additions & 0 deletions
30
utils/docking/autodock-vina/autodock-vina-run-tool/tests/test_autodock_vina_run.py
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,30 @@ | ||
"""Tests for autodock_vina_run.""" | ||
import sys | ||
from pathlib import Path | ||
|
||
current_dir = Path(__file__).resolve().parent | ||
target_dir = current_dir.parent.parent.parent / "cwl_utils" | ||
sys.path.append(str(target_dir)) | ||
|
||
from cwl_utilities import call_cwltool # noqa: E402 | ||
from cwl_utilities import create_input_yaml # noqa: E402 | ||
from cwl_utilities import parse_cwl_arguments # noqa: E402 | ||
|
||
|
||
def test_autodock_vina_run() -> None: | ||
"""Test autodock_vina_run.""" | ||
cwl_file = Path("autodock_vina_run.cwl") | ||
input_to_props = parse_cwl_arguments(cwl_file) | ||
file_path_str = "vina_ligand.pdbqt" | ||
file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) | ||
input_to_props["input_ligand_pdbqt_path"]["path"] = file_path | ||
file_path_str = "vina_receptor.pdbqt" | ||
file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) | ||
input_to_props["input_receptor_pdbqt_path"]["path"] = file_path | ||
file_path_str = "vina_box.pdb" | ||
file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) | ||
input_to_props["input_box_path"]["path"] = file_path | ||
input_yaml_path = Path("autodock_vina_run.yml") | ||
create_input_yaml(input_to_props, input_yaml_path) | ||
call_cwltool(cwl_file, input_yaml_path) | ||
assert Path("system.pdbqt").exists() |
3 changes: 3 additions & 0 deletions
3
utils/docking/autodock-vina/autodock-vina-run-tool/tests/vina_box.pdb
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
utils/docking/autodock-vina/autodock-vina-run-tool/tests/vina_ligand.pdbqt
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
utils/docking/autodock-vina/autodock-vina-run-tool/tests/vina_receptor.pdbqt
Git LFS file not shown
Oops, something went wrong.