Skip to content

Commit 7d8ef16

Browse files
author
Alan Christie
committed
Merge remote-tracking branch 'origin/master'
2 parents e029579 + f8ffc99 commit 7d8ef16

File tree

12 files changed

+152
-56
lines changed

12 files changed

+152
-56
lines changed

Dockerfile-obabel

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# We should create an Open Babel implementation of pipeline_utils that handles the basic I/O for
2+
# structure files so that the dependency on RDKit can be removed.
3+
# See https://github.com/InformaticsMatters/pipelines-obabel/issues/1
4+
5+
FROM informaticsmatters/obabel:latest
6+
LABEL maintainer="Tim Dudgeon<[email protected]>"
7+
8+
USER root
9+
10+
# Copy the obabel pipeline implementation into the image
11+
COPY src/python /opt/python-obabel
12+
RUN apt-get install -y --no-install-recommends python-setuptools gzip python-pip && pip install -e /opt/python-obabel
13+
# And the pip packages including pipeline-utilities and im-pipelines-utils-rdkit
14+
RUN pip install im-pipelines-utils==2.2.* im-pipelines-utils-rdkit==1.4.*
15+
16+
USER obabel
17+

Dockerfile-pli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ LABEL maintainer="Tim Dudgeon<[email protected]>"
33

44

55
USER root
6-
RUN apt-get install zlib1g-dev make gcc git -y
6+
RUN apt-get update -y && apt-get install zlib1g-dev make gcc git -y
77
RUN mkdir -p /usr/local/
88
WORKDIR /usr/local/
99
RUN git clone https://bitbucket.org/AstexUK/pli.git

Dockerfile-rdkit-centos

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM informaticsmatters/rdkit-python-centos:latest
2+
LABEL maintainer="Tim Dudgeon<[email protected]>"
3+
4+
USER root
5+
6+
# install required packages
7+
RUN yum -y update && yum -y install zip unzip python-devel python2-pip python-setuptools python2-matplotlib
8+
9+
# Copy the pipeline implementation into the image
10+
COPY src/python /opt/python
11+
RUN pip install -e /opt/python
12+
# And the pip packages including pipeline-utilities and im-pipelines-utils-rdkit
13+
# NOTE: matplotlib is missing
14+
RUN pip install molvs standardiser im-pipelines-utils==2.2.* im-pipelines-utils-rdkit==1.4.*

Dockerfile-smog

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ LABEL maintainer="Tim Dudgeon<[email protected]>"
33

44

55
USER root
6-
RUN apt-get install libopenbabel-dev g++ -y
6+
7+
RUN echo 'deb http://deb.debian.org/debian experimental main' >> /etc/apt/sources.list
8+
9+
RUN apt-get update -y && apt-get install -t experimental libopenbabel-dev g++ -y
710

811
WORKDIR /usr/local
912
RUN wget https://sourceforge.net/projects/opengrowth/files/SMoG2016.tar.gz/download -O smog.tar.gz &&\

build.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,18 +84,28 @@ task buildSmogImage(type: DockerBuildImage) {
8484
tag = "informaticsmatters/smog:latest"
8585
}
8686

87-
task buildSdPosterDockerImage(type: DockerBuildImage) {
87+
task buildSdPosterImage(type: DockerBuildImage) {
8888
description 'Builds the pipelines SD-poster Docker image'
8989

9090
dockerFile = file('Dockerfile-sdposter')
9191
inputDir = file('.')
9292
tag = "squonk/rdkit-${pipeline}-sdposter:latest"
9393
}
9494

95+
task buildObabelImage(type: DockerBuildImage) {
96+
// TODO - remove this once the pipelines-obabel project becomes active
97+
description 'Builds the obabel Docker image'
98+
99+
dockerFile = file('Dockerfile-obabel')
100+
inputDir = file('.')
101+
tag = "informaticsmatters/pipelines-obabel:latest"
102+
}
103+
95104
task buildDockerImages() {
96105
dependsOn buildPliImage // that one depends on buildPipelinesImage
97106
dependsOn buildSmogImage // and so does this one
98-
dependsOn buildSdPosterDockerImage
107+
dependsOn buildSdPosterImage
108+
dependsOn buildObabelImage
99109

100110
group 'Docker'
101111
description 'Builds all the project Docker images'

src/nextflow/docking/plip.nsd.nf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ protein = file(params.protein)
1212

1313
process splitter {
1414

15+
container 'informaticsmatters/pli:latest'
1516
beforeScript 'chmod g+w .'
1617

1718
input:
@@ -31,6 +32,7 @@ process splitter {
3132
*/
3233
process pli_scoring {
3334

35+
container 'informaticsmatters/pli:latest'
3436
beforeScript 'chmod g+w .'
3537

3638
input:
@@ -47,6 +49,7 @@ process pli_scoring {
4749

4850
process joiner {
4951

52+
container 'informaticsmatters/pli:latest'
5053
beforeScript 'chmod g+w .'
5154
publishDir baseDir, mode: 'link'
5255

src/nextflow/docking/smog.nsd.nf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ protein = file(params.protein)
1212

1313
process splitter {
1414

15+
container 'informaticsmatters/smog:latest'
1516
beforeScript 'chmod g+w .'
1617

1718
input:
@@ -31,6 +32,7 @@ process splitter {
3132
*/
3233
process smog_scoring {
3334

35+
container 'informaticsmatters/smog:latest'
3436
beforeScript 'chmod g+w .'
3537

3638
input:
@@ -47,6 +49,7 @@ process smog_scoring {
4749

4850
process joiner {
4951

52+
container 'informaticsmatters/smog:latest'
5053
beforeScript 'chmod g+w .'
5154
publishDir baseDir, mode: 'link'
5255

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
{ "@class":"org.squonk.core.DockerServiceDescriptor",
1+
{ "@class": "org.squonk.core.DockerServiceDescriptor",
22
"serviceConfig": {
3-
"id": "pipelines.xchem.obabel.prepare.pdb.v1",
4-
"name": "OBabelPreparePDB",
5-
"description": "Prepare PDB file uisng Open Babel",
6-
"tags": [ "rdkit", "xchem", "docker", "openbabel", "obabel", "prepare", "pdb", "convert"],
7-
"resourceUrl": null,
8-
"icon": "icons/transform_molecule.png",
3+
"id": "pipelines.xchem.obabel.prepare.pdb.v1",
4+
"name": "OBabelPreparePDB",
5+
"description": "Prepare PDB file using Open Babel",
6+
"tags": [ "rdkit", "xchem", "docker", "openbabel", "obabel", "prepare", "pdb", "convert", "protein"],
7+
"resourceUrl": null,
8+
"icon": "icons/transform_molecule.png",
99

10-
"inputDescriptors": [
11-
{
12-
"primaryType": "org.squonk.types.PDBFile",
13-
"mediaType": "chemical/x-pdb",
14-
"name": "pdb"
15-
}
16-
],
17-
"outputDescriptors": [
18-
{
19-
"primaryType": "org.squonk.types.Mol2File",
20-
"mediaType": "chemical/x-mol2",
21-
"name": "mol2"
22-
}
23-
],
10+
"inputDescriptors": [
11+
{
12+
"primaryType": "org.squonk.types.PDBFile",
13+
"mediaType": "chemical/x-pdb",
14+
"name": "pdb"
15+
}
16+
],
17+
"outputDescriptors": [
18+
{
19+
"primaryType": "org.squonk.types.Mol2File",
20+
"mediaType": "chemical/x-mol2",
21+
"name": "mol2"
22+
}
23+
],
2424

25-
"optionDescriptors": [
26-
{
27-
"modes": [
28-
"User"
29-
],
30-
"editable": true,
31-
"@class": "org.squonk.options.OptionDescriptor",
32-
"typeDescriptor": {
33-
"type": "java.lang.Float",
34-
"@class": "org.squonk.options.SimpleTypeDescriptor"
35-
},
36-
"key": "arg.protonate",
37-
"label": "Protonate at pH",
38-
"description": "Optionally protonate side chains at this pH",
39-
"visible": true,
40-
"minValues": 0,
41-
"maxValues": 1
42-
}
43-
],
44-
"executorClassName": "org.squonk.execution.steps.impl.ThinDatasetDockerExecutorStep"
25+
"optionDescriptors": [
26+
{
27+
"modes": [
28+
"User"
29+
],
30+
"editable": true,
31+
"@class": "org.squonk.options.OptionDescriptor",
32+
"typeDescriptor": {
33+
"type": "java.lang.Float",
34+
"@class": "org.squonk.options.SimpleTypeDescriptor"
35+
},
36+
"key": "arg.protonate",
37+
"label": "Protonate at pH",
38+
"description": "Optionally protonate side chains at this pH",
39+
"visible": true,
40+
"minValues": 0,
41+
"maxValues": 1
42+
}
43+
],
44+
"executorClassName": "org.squonk.execution.steps.impl.ThinDatasetDockerExecutorStep"
4545
},
4646
"inputRoutes": [ {"route": "FILE"} ],
4747
"outputRoutes": [ {"route": "FILE"} ],
48-
"imageName": "informaticsmatters/rdkit_pipelines",
49-
"command": "python -m pipelines.docking.obabel_prepare_pdb -i ${PIN}pdb.pdb.gz -o ${POUT}mol2 -mol2${protonate ? ' -prot ' + protonate : ''} --meta"
48+
"imageName": "informaticsmatters/pipelines-obabel:latest",
49+
"command": "python -m pipelines.docking.obabel_prepare_pdb -i ${PIN}pdb.pdb.gz -o ${POUT}mol2 -mol2${binding.variables.containsKey('protonate') ? ' -prot ' + protonate : ''} --meta"
5050
}

src/python/pipelines/docking/obabel_prepare_pdb.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Copyright 2017 Informatics Matters Ltd.
3+
# Copyright 2018 Informatics Matters Ltd.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -21,15 +21,19 @@
2121

2222

2323
def execute(input, output, extension, format, ph, noGzip):
24+
25+
# TODO - convert this to use the Python API rather than an external process
26+
2427
filename = output + "." + extension
2528
base_args = ["obabel", "-ipdb", input, format, "-O", filename]
2629
if ph:
2730
base_args.append("-p")
28-
base_args.append("ph")
31+
base_args.append(str(ph))
32+
utils.log("Command: " + " ".join(base_args))
2933

3034
subprocess.check_call(base_args, stdout=sys.stderr, stderr=sys.stderr)
3135

32-
# NOTE the -z argument does not seem to work correctly with obabel (truncted files generated) so we
36+
# NOTE the -z argument does not seem to work correctly with obabel (truncated files generated) so we
3337
# fall back to good old gzip to handle the compression once the uncompressed file is created
3438
if not noGzip:
3539
subprocess.check_call(['gzip', filename], stdout=sys.stderr, stderr=sys.stderr)

src/python/pipelines/rdkit/o3dAlign.dsd.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@
7171
},
7272
"@class": "org.squonk.options.OptionDescriptor"
7373
},
74+
{
75+
"modes": [
76+
"User"
77+
],
78+
"editable": true,
79+
"visible": true,
80+
"description": "Use Crippen (logP) contributions",
81+
"label": "Use Crippen (logP) contributions",
82+
"key": "arg.crippen",
83+
"minValues": 1,
84+
"maxValues": 1,
85+
"typeDescriptor": {
86+
"type": "java.lang.Boolean",
87+
"@class": "org.squonk.options.SimpleTypeDescriptor"
88+
},
89+
"@class": "org.squonk.options.OptionDescriptor"
90+
},
7491
{
7592
"@class": "org.squonk.options.OptionDescriptor",
7693
"modes": [
@@ -110,5 +127,5 @@
110127
}
111128
],
112129
"imageName": "informaticsmatters/rdkit_pipelines",
113-
"command": "python -m pipelines.rdkit.o3dAlign queryMol.data.gz -i ${PIN}input.data.gz -o ${POUT}output -of json${binding.variables.containsKey('qmolidx') ? ' --qmolidx ' + binding.variables.get('qmolidx') : ''}${binding.variables.containsKey('num') ? ' --num ' + binding.variables.get('num') : ''}${binding.variables.containsKey('threshold') ? ' --threshold ' + binding.variables.get('threshold') : ''} --meta"
130+
"command": "python -m pipelines.rdkit.o3dAlign queryMol.data.gz -i ${PIN}input.data.gz -o ${POUT}output -of json${binding.variables.containsKey('qmolidx') ? ' --qmolidx ' + binding.variables.get('qmolidx') : ''}${binding.variables.containsKey('num') ? ' --num ' + binding.variables.get('num') : ''}${binding.variables.containsKey('threshold') ? ' --threshold ' + binding.variables.get('threshold') : ''}${crippen ? ' --crippen' : ''} --meta"
114131
}

0 commit comments

Comments
 (0)