Skip to content

Commit

Permalink
extract-model (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon Duane Walker <[email protected]>
  • Loading branch information
misterbrandonwalker and Brandon Duane Walker authored May 21, 2024
1 parent e98942d commit 5965ec4
Show file tree
Hide file tree
Showing 12 changed files with 26,322 additions and 0 deletions.
29 changes: 29 additions & 0 deletions utils/extract-model-plugin/.bumpversion.cfg
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/extract_model/__init__.py]
4 changes: 4 additions & 0 deletions utils/extract-model-plugin/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.venv
out
tests
__pycache__
1 change: 1 addition & 0 deletions utils/extract-model-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
poetry.lock
5 changes: 5 additions & 0 deletions utils/extract-model-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CHANGELOG

## 0.1.0

Initial release.
14 changes: 14 additions & 0 deletions utils/extract-model-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# extract_model (0.1.0)

This class is a wrapper of the Structure Checking tool to extract a model from a 3D structure.

## Options

This plugin takes 3 input arguments and 1 output argument:

| Name | Description | I/O | Type | Default |
|---------------|-------------------------|--------|--------|---------|
| input_structure_path | Input structure file path, Type: string, File type: input, Accepted formats: pdb, pdbqt, Example file: https://github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/data/utils/extract_model.pdb | Input | File | File |
| output_structure_path | Output structure file path, Type: string, File type: output, Accepted formats: pdb, pdbqt, Example file: https://github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/reference/utils/ref_extract_model.pdb | Input | string | string |
| config | Advanced configuration options for biobb_structure_utils ExtractModel. This should be passed as a string containing a dict. The possible options to include here are listed under 'properties' in the biobb_structure_utils ExtractModel documentation: https://biobb-structure-utils.readthedocs.io/en/latest/utils.html#module-utils.extract_model | Input | string | string |
| output_structure_path | Output structure file path | Output | File | File |
1 change: 1 addition & 0 deletions utils/extract-model-plugin/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
71 changes: 71 additions & 0 deletions utils/extract-model-plugin/extract_model.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0

class: CommandLineTool

label: This class is a wrapper of the Structure Checking tool to extract a model from
a 3D structure.

doc: |-
Wrapper for the Structure Checking tool to extract a model from a 3D structure.

baseCommand: extract_model

hints:
DockerRequirement:
dockerPull: quay.io/biocontainers/biobb_structure_utils:4.0.0--pyhdfd78af_0 # 4.0.0--pyhdfd78af_1 Doesn't work!


inputs:
input_structure_path:
label: Input structure file path
doc: |-
Input structure file path
Type: string
File type: input
Accepted formats: pdb, pdbqt
Example file: https://github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/data/utils/extract_model.pdb
type: File
format: edam:format_1476, edam:format_1476
inputBinding:
position: 1
prefix: --input_structure_path

output_structure_path:
label: Output structure file path
doc: |-
Output structure file path
Type: string
File type: output
Accepted formats: pdb, pdbqt
Example file: https://github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/reference/utils/ref_extract_model.pdb
type: string
format: edam:format_1476, edam:format_1476
inputBinding:
position: 2
prefix: --output_structure_path
default: system.pdb

config:
label: Advanced configuration options for biobb_structure_utils ExtractModel
doc: |-
Advanced configuration options for biobb_structure_utils ExtractModel. This should be passed as a string containing a dict. The possible options to include here are listed under 'properties' in the biobb_structure_utils ExtractModel documentation: https://biobb-structure-utils.readthedocs.io/en/latest/utils.html#module-utils.extract_model
type: string?
inputBinding:
prefix: --config

outputs:
output_structure_path:
label: Output structure file path
doc: |-
Output structure file path
type: File
outputBinding:
glob: $(inputs.output_structure_path)
format: edam:format_1476

$namespaces:
edam: https://edamontology.org/

$schemas:
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl
51 changes: 51 additions & 0 deletions utils/extract-model-plugin/ict.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
specVersion: "0.1.0"
name: extract_model
version: 0.1.0
container: extract-model-plugin
entrypoint:
title: extract_model
description: This class is a wrapper of the Structure Checking tool to extract a model from a 3D structure.
author: Data Scientist
contact: [email protected]
repository:
documentation:
citation:

inputs:
- name: input_structure_path
required: true
description: Input structure file path, Type string, File type input, Accepted formats pdb, pdbqt, Example file https//github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/data/utils/extract_model.pdb
type: File
format:
uri: edam:format_1476, edam:format_1476
- name: output_structure_path
required: true
description: Output structure file path, Type string, File type output, Accepted formats pdb, pdbqt, Example file https//github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/reference/utils/ref_extract_model.pdb
type: string
defaultValue: system.pdb
format:
uri: edam:format_1476, edam:format_1476
- name: config
required: true
description: Advanced configuration options for biobb_structure_utils ExtractModel. This should be passed as a string containing a dict. The possible options to include here are listed under 'properties' in the biobb_structure_utils ExtractModel documentation https//biobb-structure-utils.readthedocs.io/en/latest/utils.html#module-utils.extract_model
type: string
outputs:
- name: output_structure_path
required: true
description: Output structure file path
type: File
format:
uri: edam:format_1476
ui:
- key: inputs.input_structure_path
title: "input_structure_path: "
description: "Input structure file path, Type string, File type input, Accepted formats pdb, pdbqt, Example file https//github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/data/utils/extract_model.pdb"
type: File
- key: inputs.output_structure_path
title: "output_structure_path: "
description: "Output structure file path, Type string, File type output, Accepted formats pdb, pdbqt, Example file https//github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/reference/utils/ref_extract_model.pdb"
type: string
- key: inputs.config
title: "config: "
description: "Advanced configuration options for biobb_structure_utils ExtractModel. This should be passed as a string containing a dict. The possible options to include here are listed under 'properties' in the biobb_structure_utils ExtractModel documentation https//biobb-structure-utils.readthedocs.io/en/latest/utils.html#module-utils.extract_model"
type: string
30 changes: 30 additions & 0 deletions utils/extract-model-plugin/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[tool.poetry]
name = "polus-mm-utils-extract-model"
version = "0.1.0"
description = "This class is a wrapper of the Structure Checking tool to extract a model from a 3D structure."
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 = [
"."
]
1 change: 1 addition & 0 deletions utils/extract-model-plugin/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Tests for extract_model."""
Loading

0 comments on commit 5965ec4

Please sign in to comment.