-
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
ce1591d
commit c3a0775
Showing
12 changed files
with
4,327 additions
and
0 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,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/convert_xyz/__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,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 |
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. |
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,13 @@ | ||
# convert_xyz (0.1.0) | ||
|
||
This class is a wrapper of the Open Babel tool. | ||
|
||
## Options | ||
|
||
This plugin takes 2 input arguments and 1 output argument: | ||
|
||
| Name | Description | I/O | Type | Default | | ||
|---------------|-------------------------|--------|--------|---------| | ||
| input_path | Path to the input file, Type: string, File type: input, Accepted formats: gro, mol, mol2, pdb, pdbqt, sdf, Example file: https://github.com/bioexcel/biobb_chemistry/raw/master/biobb_chemistry/test/data/babel/babel.smi | Input | File | File | | ||
| output_xyz_path | Path to the output file, Type: string, File type: output, Accepted formats: xyz | Input | string | string | | ||
| output_xyz_path | Path to the output 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 |
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,62 @@ | ||
#!/usr/bin/env cwl-runner | ||
cwlVersion: v1.2 | ||
|
||
class: CommandLineTool | ||
|
||
label: This class is a wrapper of the Open Babel tool. | ||
|
||
doc: |- | ||
Converts small molecules in 2D or 3D formats to the XYZ format. | ||
|
||
baseCommand: obabel | ||
#Usage: | ||
#obabel[-i<input-type>] <infilename> [-o<output-type>] -O<outfilename> [Options] | ||
#... | ||
#Options, other than -i -o -O -m, must come after the input files. | ||
arguments: [$(inputs.input_path), "-o", "xyz", "-O", $(inputs.output_xyz_path)] | ||
|
||
hints: | ||
DockerRequirement: | ||
dockerPull: quay.io/biocontainers/biobb_chemistry:4.0.0--pyhdfd78af_1 | ||
|
||
requirements: | ||
InlineJavascriptRequirement: {} | ||
|
||
inputs: | ||
input_path: | ||
label: Path to the input file | ||
doc: |- | ||
Path to the input file | ||
Type: string | ||
File type: input | ||
Accepted formats: gro, mol, mol2, pdb, pdbqt, sdf | ||
Example file: https://github.com/bioexcel/biobb_chemistry/raw/master/biobb_chemistry/test/data/babel/babel.smi | ||
type: File | ||
format: edam:format_2033, edam:format_3815, edam:format_3816, edam:format_1476, edam:format_1476, edam:format_3814 | ||
|
||
output_xyz_path: | ||
label: Path to the output file | ||
doc: |- | ||
Path to the output file | ||
Type: string | ||
File type: output | ||
Accepted formats: xyz | ||
type: string | ||
format: edam:format_3877 # xyz | ||
default: system.xyz | ||
|
||
outputs: | ||
output_xyz_path: | ||
label: Path to the output file | ||
doc: |- | ||
Path to the output file | ||
type: File | ||
outputBinding: | ||
glob: $(inputs.output_xyz_path) | ||
format: edam:format_3877 # xyz | ||
|
||
$namespaces: | ||
edam: https://edamontology.org/ | ||
|
||
$schemas: | ||
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl |
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,43 @@ | ||
specVersion: "0.1.0" | ||
name: convert_xyz | ||
version: 0.1.0 | ||
container: convert-xyz-plugin | ||
entrypoint: | ||
title: convert_xyz | ||
description: This class is a wrapper of the Open Babel tool. | ||
author: Data Scientist | ||
contact: [email protected] | ||
repository: | ||
documentation: | ||
citation: | ||
|
||
inputs: | ||
- name: input_path | ||
required: true | ||
description: Path to the input file, Type string, File type input, Accepted formats gro, mol, mol2, pdb, pdbqt, sdf, Example file https//github.com/bioexcel/biobb_chemistry/raw/master/biobb_chemistry/test/data/babel/babel.smi | ||
type: File | ||
format: | ||
uri: edam:format_2033, edam:format_3815, edam:format_3816, edam:format_1476, edam:format_1476, edam:format_3814 | ||
- name: output_xyz_path | ||
required: true | ||
description: Path to the output file, Type string, File type output, Accepted formats xyz | ||
type: string | ||
defaultValue: system.xyz | ||
format: | ||
uri: edam:format_3877 | ||
outputs: | ||
- name: output_xyz_path | ||
required: true | ||
description: Path to the output file | ||
type: File | ||
format: | ||
uri: edam:format_3877 | ||
ui: | ||
- key: inputs.input_path | ||
title: "input_path: " | ||
description: "Path to the input file, Type string, File type input, Accepted formats gro, mol, mol2, pdb, pdbqt, sdf, Example file https//github.com/bioexcel/biobb_chemistry/raw/master/biobb_chemistry/test/data/babel/babel.smi" | ||
type: File | ||
- key: inputs.output_xyz_path | ||
title: "output_xyz_path: " | ||
description: "Path to the output file, Type string, File type output, Accepted formats xyz" | ||
type: string |
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 @@ | ||
[tool.poetry] | ||
name = "polus-mm-utils-convert-xyz" | ||
version = "0.1.0" | ||
description = "This class is a wrapper of the Open Babel tool." | ||
authors = ["Data Scientist <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = ">=3.9,<3.12" | ||
typer = "^0.7.0" | ||
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 = [ | ||
"." | ||
] |
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 convert_xyz.""" |
Oops, something went wrong.