This respository contains the open-source spectral library curation tool: Curatr. It accompanies the paper
Andrew Palmer, Prasad Phapale, Dominik Fay, Theodore Alexandrov, Curatr: a web application for creating, curating, and sharing a mass spectral library, 2017 biorxiv
It is written in python using the django web framework and is being developed by the Alexandrov Team at EMBL Heidelberg.
We recommend installing curatr and its python dependencies inside a conda virtual environment as follows:
```
cd $HOME/Downloads
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh
bash Miniconda2-latest-Linux-x86_64.sh
source .bashrc
conda update conda
```
Create a convenient directory, for example curatr and clone the repository there:
mkdir curatr
cd curatr
git clone https://github.com/alexandrovteam/curatr
```
conda create -y -n venv python=3.6
source activate venv
pip install --upgrade pip
pip install pip-tools
conda install cython
conda install -y -c openbabel openbabel
pip-sync
```
Make and edit a local copy of the django settings file
cd mcf_standard_browser/mcf_standard_browser/mcf_standard_browser/
cp settings_template.py settings.py
Open settings.py
and edit the following fields
SECRET_KEY: replace the secret key with a securely generated key e.g. copy-and-paste from a python terminal
python
from the python terminal:
import random
print(''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]))
python manage.py migrate
python manage.py createsuperuser
[Install RabbitMQ] (https://www.rabbitmq.com/download.html)
echo "deb http://www.rabbitmq.com/debian/ testing main" >> /etc/apt/sources.list
curl http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install rabbitmq-server
(Optional) Configure a user
# RabbitMQ installs with a default username / password of guest / guest
# you can change that by creating a new user
rabbitmqctl add_user myuser mypassword
rabbitmqctl add_vhost myvhost
rabbitmqctl set_permissions -p myvhost myuser ".*" ".*" ".*"
And adjust the URL in settings.py: BROKER_URL = "amqp://myuser:mypassword@localhost:5672/myvhost"
.
Find more details [here] (http://www.rabbitmq.com/man/rabbitmqctl.1.man.html)
python manage.py migrate djcelery
sudo service rabbitmq-server start
(on Ubuntu)python manage.py celeryd
. Useful parameters:
--verbosity=2
--loglevel=DEBUG
python manage.py runserver
Curatr should now be visible on localhost:8000
We have provided an example molecular library and data in the media directory
It is a bad idea to run the django development server in a production environment. It's probably OK to run behind a corporate/university firewall but should not be exposed to the internet. There are excellent detail guides available for various deployment platforms e.g. from mozilla on deploying to Heroku
The source code in this repository is distributed under the Apache 2.0 licence.