-
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
23fb84d
commit 202c1d6
Showing
25 changed files
with
91 additions
and
251 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,5 @@ | ||
*.pdb filter=lfs diff=lfs merge=lfs -text | ||
*.pdbqt filter=lfs diff=lfs merge=lfs -text | ||
*.mol2 filter=lfs diff=lfs merge=lfs -text | ||
*.xlsx filter=lfs diff=lfs merge=lfs -text | ||
*.sdf filter=lfs diff=lfs merge=lfs -text |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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/docking/diffdock/pose-cluster-filter-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/pose-cluster-filter-tool:${version} |
6 changes: 3 additions & 3 deletions
6
utils/pose-cluster-filter-plugin/ict.yml → ...diffdock/pose-cluster-filter-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,12 +1,12 @@ | ||
specVersion: "0.1.0" | ||
name: pose_cluster_filter | ||
version: 0.1.0 | ||
container: pose-cluster-filter-plugin | ||
container: pose-cluster-filter-tool | ||
entrypoint: | ||
title: pose_cluster_filter | ||
description: Cluster poses in protein and take max confident pose for each cluster | ||
author: Data Scientist | ||
contact: [email protected] | ||
author: Brandon Walker, Nazanin Donyapour | ||
contact: [email protected], [email protected] | ||
repository: | ||
documentation: | ||
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
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.
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.
3 changes: 3 additions & 0 deletions
3
utils/docking/diffdock/pose-cluster-filter-tool/tests/rank1_confidence0.36.sdf
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
utils/docking/diffdock/pose-cluster-filter-tool/tests/rank2_confidence0.35.sdf
Git LFS file not shown
3 changes: 3 additions & 0 deletions
3
utils/docking/diffdock/pose-cluster-filter-tool/tests/rank3_confidence0.34.sdf
Git LFS file not shown
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,16 +1,9 @@ | ||
"""Tests for pose_cluster_filter.""" | ||
import sys | ||
from pathlib import Path | ||
|
||
from polus.mm.utils.pose_cluster_filter.pose_cluster_filter import pose_cluster_filter | ||
|
||
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 | ||
from sophios.api.pythonapi import Step | ||
from sophios.api.pythonapi import Workflow | ||
|
||
|
||
def test_pose_cluster_filter() -> None: | ||
|
@@ -35,22 +28,38 @@ def test_pose_cluster_filter() -> None: | |
|
||
def test_pose_cluster_filter_cwl() -> None: | ||
"""Test the pose_cluster_filter CWL.""" | ||
cwl_file = Path("pose_cluster_filter.cwl") | ||
input_to_props = parse_cwl_arguments(cwl_file) | ||
cwl_file_str = "pose_cluster_filter_0@[email protected]" | ||
cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) | ||
|
||
predicted_poses = [ | ||
"rank2_confidence0.35.sdf", | ||
"rank3_confidence0.34.sdf", | ||
"rank1_confidence0.36.sdf", | ||
] | ||
file_dict = input_to_props["predicted_poses"][0] | ||
input_to_props["predicted_poses"] = [] | ||
for pose in predicted_poses: | ||
file_dict_current = file_dict.copy() | ||
path_pose = str(Path(__file__).resolve().parent / Path(pose)) | ||
file_dict_current["path"] = path_pose | ||
input_to_props["predicted_poses"].append(file_dict_current) | ||
|
||
input_yaml_path = Path("pose_cluster_filter.yml") | ||
create_input_yaml(input_to_props, input_yaml_path) | ||
stdout, stderr = call_cwltool(cwl_file, input_yaml_path) | ||
assert "success" in stderr | ||
|
||
pose_cluster_filter = Step(clt_path=cwl_file) | ||
pose_cluster_filter.predicted_poses = [ | ||
{ | ||
"format": "edam:format_3814", | ||
"class": "File", | ||
"path": str(Path(__file__).resolve().parent / Path(pose)), | ||
} | ||
for pose in predicted_poses | ||
] | ||
pose_cluster_filter.centroid_cutoff = 5 | ||
|
||
steps = [pose_cluster_filter] | ||
filename = "pose_cluster_filter" | ||
viz = Workflow(steps, filename) | ||
|
||
viz.run() | ||
|
||
outdir = Path("outdir") | ||
|
||
# Use rglob to find all .sdf files | ||
sdf_files = list(outdir.rglob("*.sdf")) | ||
|
||
# Check if any .sdf files were found | ||
if not sdf_files: | ||
msg = f"No .sdf files found in '{outdir}'." | ||
raise FileNotFoundError(msg) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
utils/pose-cluster-filter-plugin/tests/rank1_confidence0.36.sdf
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
utils/pose-cluster-filter-plugin/tests/rank2_confidence0.35.sdf
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.