-
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
6d5007e
commit ab6bd14
Showing
21 changed files
with
820 additions
and
192 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
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
2 changes: 1 addition & 1 deletion
2
utils/sanitize-ligand-plugin/README.md → ...g/diffdock/sanitize-ligand-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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sanitize Ligand (0.1.1-dev1) | ||
# Sanitize Ligand (0.1.1-dev2) | ||
|
||
Handle molecules with rdkit errors gracefully. | ||
|
||
|
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.1-dev2 |
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,25 @@ | ||
specVersion: 0.1.0 | ||
name: labshare/sanitize-ligand | ||
version: 0.1.1-dev2 | ||
container: polusai/sanitize-ligand-tool:0.1.1-dev2 | ||
entrypoint: "" | ||
title: Sanitize Ligand | ||
description: Handle molecules with rdkit errors gracefully. | ||
author: Brandon Walker ([email protected]) | ||
repository: https://github.com/labshare/polus-plugins | ||
documentation: https://ncats.nih.gov/preclinical/core/informatics | ||
citation: "" | ||
inputs: | ||
- name: pattern | ||
required: true | ||
description: Filepattern to parse files | ||
type: string | ||
- name: indir | ||
required: true | ||
description: Input collection. | ||
type: collection | ||
outputs: | ||
- name: outdir | ||
required: false | ||
description: Output collection. | ||
type: collection |
7 changes: 4 additions & 3 deletions
7
utils/sanitize-ligand-plugin/pyproject.toml → ...fdock/sanitize-ligand-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 |
---|---|---|
@@ -1,15 +1,16 @@ | ||
[tool.poetry] | ||
name = "mm-polus-sanitize-ligand" | ||
version = "0.1.1-dev1" | ||
version = "0.1.1-dev2" | ||
description = "Handle molecules with rdkit errors gracefully." | ||
authors = ["Brandon Walker <[email protected]>"] | ||
readme = "README.md" | ||
packages = [{include = "polus", from = "src"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.8" | ||
python = ">=3.9,<3.12" | ||
typer = "^0.7.0" | ||
rdkit = "*" | ||
rdkit = "2024.3.3" | ||
sophios = "0.1.1" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
bump2version = "^1.0.1" | ||
|
65 changes: 65 additions & 0 deletions
65
utils/docking/diffdock/sanitize-ligand-tool/sanitize_ligand_0@[email protected]
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,65 @@ | ||
#!/usr/bin/env cwl-runner | ||
cwlVersion: v1.0 | ||
|
||
class: CommandLineTool | ||
|
||
label: Sanitize input ligand | ||
|
||
doc: |- | ||
Sanitize input ligand | ||
|
||
baseCommand: ["python", "-m", "polus.mm.utils"] | ||
|
||
hints: | ||
DockerRequirement: | ||
dockerPull: mrbrandonwalker/sanitize_ligand_tool@sha256:6c272a427377e05ed2a83da5cdb3c00678b74b05c248f56c78d2349201f34d2f | ||
|
||
requirements: | ||
InlineJavascriptRequirement: {} | ||
InitialWorkDirRequirement: # conditionally overwrite the input ligand, otherwise cwltool will symlink to the original | ||
listing: | ||
- entry: $(inputs.input_small_mol_ligand) | ||
writable: true | ||
|
||
inputs: | ||
|
||
input_small_mol_ligand: | ||
type: File | ||
format: edam:format_3814 | ||
inputBinding: | ||
prefix: --input_small_mol_ligand | ||
|
||
output_ligand: | ||
type: string? | ||
|
||
valid_ligand: | ||
type: string? | ||
|
||
outputs: | ||
|
||
output_ligand: | ||
type: File | ||
format: edam:format_3814 | ||
outputBinding: | ||
glob: "*.sdf" | ||
|
||
valid_ligand: | ||
type: boolean | ||
outputBinding: | ||
glob: valid.txt | ||
loadContents: true | ||
outputEval: | | ||
${ | ||
// Read the contents of the file | ||
const lines = self[0].contents.split("\n"); | ||
// Read boolean value from the first line | ||
const valid = lines[0].trim() === "True"; | ||
return valid; | ||
|
||
} | ||
|
||
$namespaces: | ||
edam: https://edamontology.org/ | ||
|
||
$schemas: | ||
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl |
2 changes: 1 addition & 1 deletion
2
...and-plugin/src/polus/mm/utils/__init__.py → ...igand-tool/src/polus/mm/utils/__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
36 changes: 36 additions & 0 deletions
36
utils/docking/diffdock/sanitize-ligand-tool/src/polus/mm/utils/__main__.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,36 @@ | ||
"""Package entrypoint for the sanitize_ligand package.""" | ||
|
||
# Base packages | ||
import logging | ||
from os import environ | ||
from pathlib import Path | ||
|
||
import typer | ||
from polus.mm.utils.sanitize_ligand import sanitize_ligand | ||
|
||
logging.basicConfig( | ||
format="%(asctime)s - %(name)-8s - %(levelname)-8s - %(message)s", | ||
datefmt="%d-%b-%y %H:%M:%S", | ||
) | ||
POLUS_LOG = getattr(logging, environ.get("POLUS_LOG", "INFO")) | ||
logger = logging.getLogger("polus.mm.utils.sanitize_ligand") | ||
logger.setLevel(POLUS_LOG) | ||
|
||
app = typer.Typer(help="Sanitize Ligand.") | ||
|
||
|
||
@app.command() | ||
def main( | ||
input_small_mol_ligand: Path = typer.Option( | ||
..., | ||
"--input_small_mol_ligand", | ||
help="Input input_small_mol_ligand to be processed.", | ||
), | ||
) -> None: | ||
"""Sanitize Ligand.""" | ||
logger.info(f"input_small_mol_ligand: {input_small_mol_ligand}") | ||
sanitize_ligand(input_small_mol_ligand) | ||
|
||
|
||
if __name__ == "__main__": | ||
app() |
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.
Oops, something went wrong.