diff --git a/utils/extract-model-pdbqt-plugin/tests/test_extract_model_pdbqt.py b/utils/extract-model-pdbqt-plugin/tests/test_extract_model_pdbqt.py deleted file mode 100644 index 35d46ab2..00000000 --- a/utils/extract-model-pdbqt-plugin/tests/test_extract_model_pdbqt.py +++ /dev/null @@ -1,24 +0,0 @@ -"""Tests for extract_model_pdbqt.""" -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_extract_model_pdbqt() -> None: - """Test extract_model_pdbqt.""" - cwl_file = Path("extract_model_pdbqt.cwl") - input_to_props = parse_cwl_arguments(cwl_file) - file_path_str = "models.pdbqt" - file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) - input_to_props["input_pdbqt_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() diff --git a/utils/extract-model-pdbqt-plugin/.bumpversion.cfg b/utils/pre-process/structure-change/extract-model-pdbqt-tool/.bumpversion.cfg similarity index 100% rename from utils/extract-model-pdbqt-plugin/.bumpversion.cfg rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/.bumpversion.cfg diff --git a/utils/extract-model-pdbqt-plugin/.dockerignore b/utils/pre-process/structure-change/extract-model-pdbqt-tool/.dockerignore similarity index 100% rename from utils/extract-model-pdbqt-plugin/.dockerignore rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/.dockerignore diff --git a/utils/extract-model-pdbqt-plugin/.gitignore b/utils/pre-process/structure-change/extract-model-pdbqt-tool/.gitignore similarity index 100% rename from utils/extract-model-pdbqt-plugin/.gitignore rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/.gitignore diff --git a/utils/extract-model-pdbqt-plugin/CHANGELOG.md b/utils/pre-process/structure-change/extract-model-pdbqt-tool/CHANGELOG.md similarity index 100% rename from utils/extract-model-pdbqt-plugin/CHANGELOG.md rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/CHANGELOG.md diff --git a/utils/extract-model-pdbqt-plugin/README.md b/utils/pre-process/structure-change/extract-model-pdbqt-tool/README.md similarity index 100% rename from utils/extract-model-pdbqt-plugin/README.md rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/README.md diff --git a/utils/extract-model-pdbqt-plugin/VERSION b/utils/pre-process/structure-change/extract-model-pdbqt-tool/VERSION similarity index 100% rename from utils/extract-model-pdbqt-plugin/VERSION rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/VERSION diff --git a/utils/extract-model-pdbqt-plugin/extract_model_pdbqt.cwl b/utils/pre-process/structure-change/extract-model-pdbqt-tool/extract_model_pdbqt_0@1@0.cwl similarity index 100% rename from utils/extract-model-pdbqt-plugin/extract_model_pdbqt.cwl rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/extract_model_pdbqt_0@1@0.cwl diff --git a/utils/extract-model-pdbqt-plugin/ict.yml b/utils/pre-process/structure-change/extract-model-pdbqt-tool/ict.yml similarity index 94% rename from utils/extract-model-pdbqt-plugin/ict.yml rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/ict.yml index 31564969..347e1ed2 100644 --- a/utils/extract-model-pdbqt-plugin/ict.yml +++ b/utils/pre-process/structure-change/extract-model-pdbqt-tool/ict.yml @@ -1,12 +1,12 @@ specVersion: "0.1.0" name: extract_model_pdbqt version: 0.1.0 -container: extract-model-pdbqt-plugin +container: extract-model-pdbqt-tool entrypoint: title: extract_model_pdbqt description: Extracts a model from a PDBQT file with several models. -author: Data Scientist -contact: data.scientist@labshare.org +author: Brandon Walker, Nazanin Donyapour +contact: brandon.walker@axleinfo.com, nazanin.donyapour@axleinfo.com repository: documentation: citation: diff --git a/utils/extract-model-pdbqt-plugin/pyproject.toml b/utils/pre-process/structure-change/extract-model-pdbqt-tool/pyproject.toml similarity index 92% rename from utils/extract-model-pdbqt-plugin/pyproject.toml rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/pyproject.toml index e4da5843..ff9b683f 100644 --- a/utils/extract-model-pdbqt-plugin/pyproject.toml +++ b/utils/pre-process/structure-change/extract-model-pdbqt-tool/pyproject.toml @@ -8,8 +8,7 @@ readme = "README.md" [tool.poetry.dependencies] python = ">=3.9,<3.12" typer = "^0.7.0" -cwl-utils = "0.33" -cwltool = "3.1.20240404144621" +sophios = "0.1.1" [tool.poetry.group.dev.dependencies] bump2version = "^1.0.1" diff --git a/utils/extract-model-pdbqt-plugin/tests/__init__.py b/utils/pre-process/structure-change/extract-model-pdbqt-tool/tests/__init__.py similarity index 100% rename from utils/extract-model-pdbqt-plugin/tests/__init__.py rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/tests/__init__.py diff --git a/utils/extract-model-pdbqt-plugin/tests/models.pdbqt b/utils/pre-process/structure-change/extract-model-pdbqt-tool/tests/models.pdbqt similarity index 100% rename from utils/extract-model-pdbqt-plugin/tests/models.pdbqt rename to utils/pre-process/structure-change/extract-model-pdbqt-tool/tests/models.pdbqt diff --git a/utils/pre-process/structure-change/extract-model-pdbqt-tool/tests/test_extract_model_pdbqt.py b/utils/pre-process/structure-change/extract-model-pdbqt-tool/tests/test_extract_model_pdbqt.py new file mode 100644 index 00000000..3e53705b --- /dev/null +++ b/utils/pre-process/structure-change/extract-model-pdbqt-tool/tests/test_extract_model_pdbqt.py @@ -0,0 +1,32 @@ +"""Tests for extract_model_pdbqt.""" +from pathlib import Path + +from sophios.api.pythonapi import Step +from sophios.api.pythonapi import Workflow + + +def test_extract_model_pdbqt() -> None: + """Test extract_model_pdbqt.""" + # Define paths and input properties + cwl_file_str = "extract_model_pdbqt_0@1@0.cwl" + cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) + input_pdbqt_path = Path(__file__).resolve().parent / Path("models.pdbqt") + + # Create the CWL step + extract_model_pdbqt_step = Step(clt_path=cwl_file) + extract_model_pdbqt_step.input_pdbqt_path = input_pdbqt_path + extract_model_pdbqt_step.output_pdbqt_path = "system.pdbqt" + + # Create the workflow and run it + steps = [extract_model_pdbqt_step] + filename = "extract_model_pdbqt_workflow" + workflow = Workflow(steps, filename) + workflow.run() + + # Check for the expected output file + outdir = Path("outdir") + files = list(outdir.rglob("system.pdbqt")) + + assert ( + files + ), f"The file 'system.pdbqt' does not exist in any subdirectory of '{outdir}'."