Skip to content

Commit

Permalink
Issue 30 (#31)
Browse files Browse the repository at this point in the history
* Initial relative import changes

* - Adds a requirements file (for testing)

- Fix for Python3 has_key (now "in")
- Fix for Python 3 xrange (now range)

* - Updated Dockerfile requirements

* - Use of Python3 RDKit base image

* #30 switched service descriptors to yaml
  • Loading branch information
alanbchristie authored Apr 17, 2019
1 parent 87c6e7b commit 18690c0
Show file tree
Hide file tree
Showing 46 changed files with 1,536 additions and 1,881 deletions.
5 changes: 3 additions & 2 deletions Dockerfile-rdkit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM informaticsmatters/rdkit-python-debian:Release_2018_09_1
FROM informaticsmatters/rdkit-python3-debian:Release_2019_03_1
LABEL maintainer="Tim Dudgeon<[email protected]>"

USER root
Expand All @@ -10,4 +10,5 @@ RUN apt-get -y update && apt-get -y install zip unzip procps
COPY src/python /opt/python
RUN pip install -e /opt/python
# And the pip packages including pipeline-utilities and im-pipelines-utils-rdkit
RUN pip install molvs standardiser matplotlib im-pipelines-utils==2.2.* im-pipelines-utils-rdkit==1.4.*
RUN pip install molvs standardiser matplotlib \
im-pipelines-utils>=2.4.5 im-pipelines-utils-rdkit>=1.5.7
5 changes: 3 additions & 2 deletions post-service-descriptors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ POST=${1:-http://coreservices:8080/coreservices/rest/v1/services}
BASE_D='docker://github.com/InformaticsMatters/pipelines'
BASE_N='nextflow://github.com/InformaticsMatters/pipelines'
CT_DJ="application/x-squonk-service-descriptor-docker+json"
CT_DY="application/x-squonk-service-descriptor-docker+yaml"
CT_MM="multipart/mixed"


for d in 'src/python/pipelines/dmpk' 'src/python/pipelines/docking' 'src/python/pipelines/rdkit'
do
for file in $d/*.dsd.json
for file in $d/*.dsd.yml
do
echo $file
curl -X POST \
-T $file\
-H "Content-Type: $CT_DJ"\
-H "Content-Type: $CT_DY"\
-H "Base-URL: $BASE_D"\
$POST
echo ""
Expand Down
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
im-pipelines-utils==2.4.*
im-pipelines-utils-rdkit==1.5.*
matplotlib==2.2.*
scipy==1.1.*
numpy==1.14.*
scikit-learn==0.19.*
pandas==0.23.*
122 changes: 0 additions & 122 deletions src/python/pipelines/dmpk/pk_tmax_cmax_sim.dsd.json

This file was deleted.

94 changes: 94 additions & 0 deletions src/python/pipelines/dmpk/pk_tmax_cmax_sim.dsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---
"@class": org.squonk.core.DockerServiceDescriptor
serviceConfig:
id: pipelines.dmpk.sygnature.tmax_cmax_sim.1
name: TmaxCmaxSimulation
description: Simulation of Tmax and Cmax
tags:
- sygnature
- dmpk
- pk
- cmax
- tmax
- simulation
- prediction
- docker
resourceUrl:
icon: icons/program.png
outputDescriptors:
- primaryType: org.squonk.types.PngImageFile
mediaType: image/png
name: output
optionDescriptors:
- modes:
- User
editable: true
visible: true
description: Half life(elim)(hr)
label: Half life(elim)(hr)
key: arg.halfLife
minValues: 1
maxValues: 1
typeDescriptor:
type: java.lang.Float
"@class": org.squonk.options.SimpleTypeDescriptor
"@class": org.squonk.options.OptionDescriptor
- modes:
- User
editable: true
visible: true
description: Half life(abs)(hr)
label: Half life(abs)(hr)
key: arg.absorption
minValues: 1
maxValues: 1
typeDescriptor:
type: java.lang.Float
"@class": org.squonk.options.SimpleTypeDescriptor
"@class": org.squonk.options.OptionDescriptor
- modes:
- User
editable: true
visible: true
description: Dose(mg)
label: Dose(mg)
key: arg.dose
minValues: 1
maxValues: 1
typeDescriptor:
type: java.lang.Float
"@class": org.squonk.options.SimpleTypeDescriptor
"@class": org.squonk.options.OptionDescriptor
- modes:
- User
editable: true
visible: true
description: AUC(mg/L.hr)
label: AUC(mg/L.hr)
key: arg.auc
minValues: 1
maxValues: 1
typeDescriptor:
type: java.lang.Float
"@class": org.squonk.options.SimpleTypeDescriptor
"@class": org.squonk.options.OptionDescriptor
- modes:
- User
editable: true
visible: true
description: Simulation Time Length(hr)
label: Simulation Time Length(hr)
key: arg.time
minValues: 1
maxValues: 1
typeDescriptor:
type: java.lang.Float
"@class": org.squonk.options.SimpleTypeDescriptor
"@class": org.squonk.options.OptionDescriptor
executorClassName: org.squonk.execution.steps.impl.ThinDatasetDockerExecutorStep
outputRoutes:
- route: FILE
imageName: informaticsmatters/rdkit_pipelines
command: >-
python -m pipelines.dmpk.pk_tmax_cmax_sim -o ${POUT}output --half-life $halfLife
--absorption $absorption --dose $dose --auc $auc --time $time
50 changes: 0 additions & 50 deletions src/python/pipelines/docking/obabel_prepare_pdb.dsd.json

This file was deleted.

50 changes: 50 additions & 0 deletions src/python/pipelines/docking/obabel_prepare_pdb.dsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
"@class": org.squonk.core.DockerServiceDescriptor
serviceConfig:
id: pipelines.xchem.obabel.prepare.pdb.v1
name: OBabelPreparePDB
description: Prepare PDB file using Open Babel
tags:
- rdkit
- xchem
- docker
- openbabel
- obabel
- prepare
- pdb
- convert
- protein
resourceUrl:
icon: icons/transform_molecule.png
inputDescriptors:
- primaryType: org.squonk.types.PDBFile
mediaType: chemical/x-pdb
name: pdb
outputDescriptors:
- primaryType: org.squonk.types.Mol2File
mediaType: chemical/x-mol2
name: mol2
optionDescriptors:
- modes:
- User
editable: true
"@class": org.squonk.options.OptionDescriptor
typeDescriptor:
type: java.lang.Float
"@class": org.squonk.options.SimpleTypeDescriptor
key: arg.protonate
label: Protonate at pH
description: Optionally protonate side chains at this pH
visible: true
minValues: 0
maxValues: 1
executorClassName: org.squonk.execution.steps.impl.ThinDatasetDockerExecutorStep
inputRoutes:
- route: FILE
outputRoutes:
- route: FILE
imageName: informaticsmatters/pipelines-obabel:latest
command: >-
python -m pipelines.docking.obabel_prepare_pdb -i ${PIN}pdb.pdb.gz -o ${POUT}mol2 -mol2
${binding.variables.containsKey('protonate') ? '-prot ' + protonate : ''}
--meta
Loading

0 comments on commit 18690c0

Please sign in to comment.