-
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
1 parent
6b3ed2b
commit dcded8d
Showing
19 changed files
with
83 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
utils/pdbfixer-plugin/Dockerfile → ...tructure-changes/pdbfixer-tool/Dockerfile
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
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions
4
utils/pre-process/structure-changes/pdbfixer-tool/build-docker.sh
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 @@ | ||
#!/bin/bash | ||
|
||
version=$(<VERSION) | ||
docker build . -t polusai/pdbfixer-tool:${version} |
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
5 changes: 3 additions & 2 deletions
5
utils/pdbfixer-plugin/ict.yml → ...s/structure-changes/pdbfixer-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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
specVersion: 0.1.0 | ||
name: labshare/pdbfixer | ||
version: 0.1.0 | ||
container: polusai/pdbfixer-plugin:0.1.0 | ||
container: polusai/pdbfixer-tool:0.1.0 | ||
entrypoint: "" | ||
title: pdbfixer | ||
description: Fix pdbfiles. | ||
author: Data Scientist ([email protected]) | ||
author: Brandon Walker, Nazanin Donyapour | ||
contact: [email protected], [email protected] | ||
repository: https://github.com/labshare/mmtools | ||
documentation: https://ncats.nih.gov/preclinical/core/informatics | ||
citation: | ||
|
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
71 changes: 71 additions & 0 deletions
71
utils/pre-process/structure-changes/pdbfixer-tool/tests/test_pdbfixer.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,71 @@ | ||
"""Tests for pdbfixer.""" | ||
from pathlib import Path | ||
|
||
from polus.mm.utils.pdbfixer.pdbfixer import runpdbfixer | ||
from sophios.api.pythonapi import Step | ||
from sophios.api.pythonapi import Workflow | ||
|
||
|
||
def test_pdbfixer() -> None: | ||
"""Test pdbfixer.""" | ||
add_atoms = "all" | ||
add_residues = True | ||
pdbid = "" | ||
url = "" | ||
replace_nonstandard = True | ||
keep_heterogens = "all" | ||
input_pdb_path = "1msn_protein.pdb" | ||
input_helper_pdb_path = "1msn_protein.pdb" | ||
input_pdb_path = str(Path(__file__).resolve().parent / Path(input_pdb_path)) | ||
input_helper_pdb_path = str( | ||
Path(__file__).resolve().parent / Path(input_helper_pdb_path), | ||
) | ||
output_pdb_path = "test.pdb" | ||
output_pdb_path = str(Path(__file__).resolve().parent / Path(output_pdb_path)) | ||
|
||
runpdbfixer( | ||
input_pdb_path, | ||
input_helper_pdb_path, | ||
output_pdb_path, | ||
add_atoms, | ||
add_residues, | ||
pdbid, | ||
url, | ||
replace_nonstandard, | ||
keep_heterogens, | ||
) | ||
|
||
assert Path(output_pdb_path).exists() | ||
|
||
|
||
def test_cwl_pdb_fixer() -> None: | ||
"""Test the pdbfixer function in cwltool.""" | ||
cwl_file = Path("pdb_fixer_0@[email protected]") | ||
|
||
# Create a Step instance | ||
pdb_fixer_step = Step(clt_path=cwl_file) | ||
|
||
# Define input paths and parameters | ||
input_pdb_path = str(Path(__file__).resolve().parent / "1msn_protein.pdb") | ||
input_helper_pdb_path = str(Path(__file__).resolve().parent / "1msn_protein.pdb") | ||
output_pdb_path = "output.pdb" | ||
|
||
# Assign inputs to the step | ||
pdb_fixer_step.input_pdb_path = input_pdb_path | ||
pdb_fixer_step.input_helper_pdb_path = input_helper_pdb_path | ||
pdb_fixer_step.output_pdb_path = output_pdb_path | ||
|
||
# Create a Workflow instance | ||
steps = [pdb_fixer_step] | ||
viz = Workflow(steps, "pdb_fixer") | ||
|
||
# Run the workflow | ||
viz.run() | ||
|
||
# Check if the expected output file exists | ||
outdir = Path("outdir") | ||
files = list(outdir.rglob(output_pdb_path)) | ||
|
||
assert ( | ||
files | ||
), f"The file '{output_pdb_path}' does not exist in any subdirectory of '{outdir}'." |