Difference between revisions of "ChlamDB"

From www.wiki.chlamdb.ch
Jump to navigation Jump to search
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
  
 +
==Mise en ligne de la base de donnée Chlamdb==
  
−
== Mise en ligne de la base de donnée Chlamdb ==
 
  
 +
===Page d’accueil===
  
−
=== Page d’accueil ===
 
  
 +
*mettre un nouvel onglet avec qq infos
 +
*écrire une page tuto avec fonctions de base
 +
*exporter le fichier avec environnementale conda nécessaire pour faire tourner la base de donnée
  
−
* mettre un nouvel onglet avec qq infos
 
−
* écrire une page tuto avec fonctions de base
 
−
* exporter le fichier avec environnementale conda nécessaire pour faire tourner la base de donnée
 
  
−
 
+
===Setup chlamdb===
−
=== Setup chlamdb ===
 
  
 
[[old setup]]
 
[[old setup]]
Line 18: Line 17:
 
[[new setup]]
 
[[new setup]]
  
 +
===Update===
 +
- avril 2019
 +
{| class="wikitable sortable"
 +
|+
 +
!
 +
!N genomes
 +
!N annotated Genbank
 +
!N annotated RS
 +
!N complete genomes
 +
|-
 +
|'''Planctomycetes'''
 +
|600
 +
|423
 +
|60
 +
|20
 +
|-
 +
|'''Chlamydiae'''
 +
|463
 +
|392
 +
|401
 +
|165
 +
|-
 +
|'''Ca. Omnitrophica'''
 +
|172
 +
|137
 +
|4
 +
|0
 +
|-
 +
|'''Kiritimatiellaeota'''
 +
|13
 +
|7
 +
|1
 +
|1
 +
|-
 +
|'''Lentisphaerae'''
 +
|62
 +
|29
 +
|4
 +
|1
 +
|-
 +
|'''Verrucomicrobia'''
 +
|930
 +
|555
 +
|158
 +
|34
 +
|-
 +
|'''TOTAL'''
 +
|'''2249'''
 +
|'''1443'''
 +
|'''628'''
 +
|'''221'''
 +
|}
  
−
=== Setup environnement fonctionnel ===
+
===Setup environnement fonctionnel===
  
−
==== Conda ====
+
====Conda====
  
 
  name: chlamdb
 
  name: chlamdb
Line 64: Line 115:
 
     - django-citations
 
     - django-citations
  
−
==== packages R absents de conda à installer à la main ====
+
====packages R absents de conda à installer à la main====
  
 
- genoPlotR
 
- genoPlotR
 
- flextable
 
- flextable
  
−
==== setup X server pour ete3 ====
+
====modules python a ajouter à la main====
 +
<syntaxhighlight lang="Bash" line="line">
 +
conda develop /home/ubuntu/dev/orthomcl/
 +
conda develop /home/ubuntu/dev/plots/
 +
conda develop /home/ubuntu/dev/biosqldb/
 +
conda develop /home/ubuntu/dev/utilitaires/
 +
conda develop /home/ubuntu/dev/phylo_tree_display/
 +
conda develop /home/ubuntu/dev/TPutils/
 +
conda develop /home/ubuntu/dev/network_d3/
 +
</syntaxhighlight>
 +
====setup X server pour ete3====
  
−
<syntaxhighlight lang="Bash" line='line'>
+
<syntaxhighlight lang="Bash" line="line">
 
apt-get install  xserver-xorg xdm  xfonts-base xfonts-100dpi xfonts-75dpi
 
apt-get install  xserver-xorg xdm  xfonts-base xfonts-100dpi xfonts-75dpi
 
</syntaxhighlight>
 
</syntaxhighlight>
  
−
<syntaxhighlight lang="Bash" line='line'>
+
<syntaxhighlight lang="Bash" line="line">
 
In our example, edit the /etc/X11/xdm/xdm-config file and set following values:
 
In our example, edit the /etc/X11/xdm/xdm-config file and set following values:
  
Line 82: Line 143:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
−
<syntaxhighlight lang="Bash" line='line'>
+
<syntaxhighlight lang="Bash" line="line">
 
/etc/init.d/xdm restart
 
/etc/init.d/xdm restart
 
</syntaxhighlight>
 
</syntaxhighlight>
  
−
<syntaxhighlight lang="Bash" line='line'>
+
<syntaxhighlight lang="Bash" line="line">
 
export DISPLAY=':0'
 
export DISPLAY=':0'
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
Might be necessary to update the Xservers file as well (/etc/X11/xdm/Xservers)
  
−
== setup https ==
+
<syntaxhighlight lang="Bash" line="1">
 +
#:0 local /usr/X11R6/bin/X -dpi 100 -nolisten tcp
 +
:0 local /usr/X11R6/bin/X -dpi 100
 +
</syntaxhighlight>
 +
==setup https==
  
−
=== setup certificate and key with letsencrypt ===
+
===setup certificate and key with letsencrypt===
  
−
<syntaxhighlight lang="Bash" line='line'>
+
<syntaxhighlight lang="Bash" line="line">
 
systemctl stop nginx
 
systemctl stop nginx
 
letsencrypt certonly
 
letsencrypt certonly
Line 102: Line 168:
  
  
−
=== update config ===
+
===update config===
  
−
<syntaxhighlight lang="Bash" line='line'>
+
<syntaxhighlight lang="Bash" line="line">
 
upstream monsite {
 
upstream monsite {
 
     # Adresse du serveur wsgi, par exemple gunicorn
 
     # Adresse du serveur wsgi, par exemple gunicorn
Line 143: Line 209:
 
}
 
}
  
 +
</syntaxhighlight>
 +
 +
=setup celery=
 +
 +
- install celery, django-celery
 +
- install rabbitmq
 +
<syntaxhighlight lang="Bash" line="line">
 +
sudo apt-get install rabbitmq-server
 +
sudo systemctl enable rabbitmq-server
 +
sudo systemctl start rabbitmq-server
 +
</syntaxhighlight>
 +
 +
- setup user and host
 +
 +
<syntaxhighlight lang="Bash" line="line">
 +
sudo rabbitmqctl add_vhost my_vhost
 +
sudo rabbitmqctl add_user chlamdb estrella3
 +
sudo rabbitmqctl set_permissions -p my_vhost chlamdb "." "." ".*"
 +
</syntaxhighlight>
 +
 +
- launch celery workers
 +
 +
<syntaxhighlight lang="Bash" line="line">
 +
celery -A chlamdb.celeryapp worker -l info
 +
</syntaxhighlight>
 +
 +
 +
=setup on vital-it=
 +
 +
==ete3==
 +
 +
work with the following variable exported:
 +
 +
 +
<syntaxhighlight lang="Bash" line="line">
 +
export QT_QPA_PLATFORM=offscreen
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 17:48, 10 March 2020

Mise en ligne de la base de donnée Chlamdb

Page d’accueil

  • mettre un nouvel onglet avec qq infos
  • écrire une page tuto avec fonctions de base
  • exporter le fichier avec environnementale conda nécessaire pour faire tourner la base de donnée


Setup chlamdb

old setup

new setup

Update

- avril 2019

N genomes N annotated Genbank N annotated RS N complete genomes
Planctomycetes 600 423 60 20
Chlamydiae 463 392 401 165
Ca. Omnitrophica 172 137 4 0
Kiritimatiellaeota 13 7 1 1
Lentisphaerae 62 29 4 1
Verrucomicrobia 930 555 158 34
TOTAL 2249 1443 628 221

Setup environnement fonctionnel

Conda

name: chlamdb
channels:
 - r
 - etetoolkit
 - bioconda
 - conda-forge
 - defaults
dependencies:
 - python=3.5.6
 - django=2.1.1
 - django-extensions
 - bibtexparser
 - cairo
 - r-cairo
 - r-vegan
 - r-gplots
 - r-gdtools
 - r-svglite
 - pandas
 - qtconsole
 - ete3
 - ete_toolchain
 - pyqt=4.11.4
 - matplotlib
 - scipy
 - pylibmc
 - simplejson
 - dill
 - gunicorn
 - numpy 
 - pyqt 
 - lxml 
 - conda-build
 - reportlab
 - biopython
 - django-crispy-forms
 - mysqlclient
 - pip:
   - cython
   - django-citations

packages R absents de conda à installer à la main

- genoPlotR - flextable

modules python a ajouter à la main

1conda develop /home/ubuntu/dev/orthomcl/
2conda develop /home/ubuntu/dev/plots/
3conda develop /home/ubuntu/dev/biosqldb/
4conda develop /home/ubuntu/dev/utilitaires/
5conda develop /home/ubuntu/dev/phylo_tree_display/
6conda develop /home/ubuntu/dev/TPutils/
7conda develop /home/ubuntu/dev/network_d3/

setup X server pour ete3

1apt-get install  xserver-xorg xdm  xfonts-base xfonts-100dpi xfonts-75dpi
1In our example, edit the /etc/X11/xdm/xdm-config file and set following values:
2
3DisplayManager*authorize:       false
4DisplayManager*authComplain:    false
1/etc/init.d/xdm restart
1export DISPLAY=':0'

Might be necessary to update the Xservers file as well (/etc/X11/xdm/Xservers)

1#:0 local /usr/X11R6/bin/X -dpi 100 -nolisten tcp
2:0 local /usr/X11R6/bin/X -dpi 100

setup https

setup certificate and key with letsencrypt

1systemctl stop nginx
2letsencrypt certonly
3systemctl start nginx


update config

 1upstream monsite {
 2    # Adresse du serveur wsgi, par exemple gunicorn
 3        server localhost:8001;
 4        }
 5
 6# HTTP Request will be Redirected to the HTTPS
 7server {
 8      listen 80;
 9      server_name chlamdb.ch;
10      return 301 https://$server_name$request_uri;
11      }
12
13server {
14    listen 443 ssl;
15    server_name chlamdb.ch;
16    
17    ssl_certificate /etc/letsencrypt/live/chlamdb.ch/fullchain.pem;
18    ssl_certificate_key /etc/letsencrypt/live/chlamdb.ch/privkey.pem;
19    
20    access_log /webapps/logs/GEN.access.log;
21    error_log /webapps/logs/GEN.error.log;
22    
23    location / {
24        #include fastcgi_params;
25        proxy_pass http://monsite;
26        proxy_redirect off;
27        proxy_set_header Host $http_host;
28        proxy_set_header X-Real-IP $remote_addr;
29        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
30        proxy_set_header X-Forwarded-Proto $scheme;
31    }
32
33    location /assets {
34        autoindex on;
35        alias /home/ubuntu/dev/chlamdb/assets/;
36    }
37}

setup celery

- install celery, django-celery - install rabbitmq

1sudo apt-get install rabbitmq-server
2sudo systemctl enable rabbitmq-server
3sudo systemctl start rabbitmq-server

- setup user and host

1sudo rabbitmqctl add_vhost my_vhost
2sudo rabbitmqctl add_user chlamdb estrella3
3sudo rabbitmqctl set_permissions -p my_vhost chlamdb "." "." ".*"

- launch celery workers

1celery -A chlamdb.celeryapp worker -l info


setup on vital-it

ete3

work with the following variable exported:


1export QT_QPA_PLATFORM=offscreen