diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca3ff8e3a4a4b383b01a64297c4d330916b416fa..fe5cf4f18646668b1b0c7f0656b44140f61a221b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,21 +8,7 @@ test-centos7: - yum install -y epel-release - yum install install -y python34-pip python34-devel - yum install -y gcc graphviz graphviz-devel + - yum install -y httpd httpd-devel - cd ippisite - pip3 install -r requirements.txt - - python3 manage.py test -test-centos7: - image: centos:centos7 - stage: deploy - script: - - yum install -y epel-release - - yum install install -y python34-pip python34-devel - - yum install -y gcc graphviz graphviz-devel - - cd ippisite - - pip3 install -r requirements.txt - - python3 manage.py test - environment: - name: production - url: https://ippidb.pasteur.fr - only: - - master \ No newline at end of file + - python3 manage.py test \ No newline at end of file diff --git a/README.md b/README.md index 63e3121321474dd432c2e8908669cf0ca2ee914e..ac99bfb1554cfc257cd325b24aa8e879171e7fba 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,32 @@ -iPPI-DB +# iPPI-DB project repository -Inhibitors of Protein-Protein Interaction Database +Refactoring and update of iPPIDB database + +### Description of the repository: + +- **ansible** + - ansible receipe to deploy ippidb web site and content automatically +- **ichem_module** + - module for IChem private tool. + INFO: to use IChem on TARS: + `#module load /pasteur/projets/policy01/IPPI-DB/sources/iPPIDB/ichem_module/5.2.8` +- **ippidb_backend** + - java codes a bit optimized and refactored by Hélenes Borges (a full refactoring is not mandatory but needed (can be done later) + (brainstorming and documentation available at https://docs.google.com/presentation/d/1-HZZiRmEtipNkKLxKpmAhNHmuBbsjCQ7jmcTdgmf88g/edit?usp=sharing) +- **ippidb_binaries** + - binaries used for the ippidb website backend calculations + - the galaxy subdirectory contains Galaxy XML for galaxy-dev.web.pasteur.fr instance + - the lib_lib subdirectory contains the jar dependancies for the Java Chemaxon based program (sources are in ippidb_backend dir) +- **ippidb_files** + - files mandatory for the binaries execution: + - the Chemaxon licenses (update here and with the same name of the license is updated in 2018) +- **ippidb_module** + - module for Chemaxon based private tools. + INFO: to use Chemaxon tools on TARS: + `#module load /pasteur/projets/policy01/IPPI-DB/sources/iPPIDB/ippidb_module/0.1` +- **ippidb_targetbased_binaries** + - python scripts for the tarbased based ippidb approach + - galaxy directory with the XMLs for the python scripts + gromacs protonation tools + IChem Volsite XML (not fonctional yet) +- **ippisite** (HM, and RT don't hesitate to fill this description) + - django web interface for ippidb + - front-end web interface diff --git a/ippisite/ippidb/gx.py b/ippisite/ippidb/gx.py new file mode 100644 index 0000000000000000000000000000000000000000..999004b40da1e46bc72936289d7868cab616e6d9 --- /dev/null +++ b/ippisite/ippidb/gx.py @@ -0,0 +1,15 @@ +from bioblend.galaxy import GalaxyInstance +from bioblend.galaxy.tools.inputs import inputs + +workflow_id = 'dad6103ff71ca4fe' +galaxy_url = 'https://galaxy-dev.web.pasteur.fr' +api_key = '21c2ce387688b1a785040762f7c9c331' + +def run_workflow_and_get_results(input_file): + gi = GalaxyInstance(galaxy_url, key=api_key) + gi.verify = False + history_id = gi.histories.create_history("ippidb_history")['id'] + dataset_id = gi.tools.upload_file(input_file, history_id)['outputs'][0]['id'] + inputs = {'0':{'id':dataset_id, 'src': 'hda' }} + workflow_run = gi.workflows.invoke_workflow(workflow_id, inputs=inputs, history_id=history_id) + print(workflow_run) diff --git a/ippisite/ippisite/settings.py b/ippisite/ippisite/settings.py index f022fe76f74d05eda1d39f5830d67c5c7db6ae82..d2d9b930b809667cbdbceb6962e9afd574948f7a 100644 --- a/ippisite/ippisite/settings.py +++ b/ippisite/ippisite/settings.py @@ -27,7 +27,9 @@ DEBUG = True SHOW_TOOLBAR_CALLBACK = True -ALLOWED_HOSTS = ["127.0.0.1","localhost",] +ALLOWED_HOSTS = ["*"] +#ALLOWED_HOSTS = ["127.0.0.1","localhost",] + INTERNAL_IPS= ["127.0.0.1","localhost",] # Application definition @@ -44,6 +46,7 @@ INSTALLED_APPS = [ 'ippidb', 'formtools', 'debug_toolbar', + 'mod_wsgi.server' ] MIDDLEWARE = [ diff --git a/ippisite/manage.py b/ippisite/manage.py index cbc3b8b3cc70407eab37a9b5a72e5afd93825389..84b21d80a41ef77a67347bfcff7c1c9be12a631c 100755 --- a/ippisite/manage.py +++ b/ippisite/manage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys diff --git a/ippisite/requirements.txt b/ippisite/requirements.txt index ab4ff146a1259b80447fe890649845b313623c8e..683a9367b3f66fc6ad5111239d579439db23969b 100644 --- a/ippisite/requirements.txt +++ b/ippisite/requirements.txt @@ -6,4 +6,5 @@ pygraphviz pydot pyparsing django-formtools -django-debug-toolbar \ No newline at end of file +django-debug-toolbar +mod_wsgi \ No newline at end of file