Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


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.


  • Ubuntu 14.04 or 16.04
  • git 2.6
  • python 3.6


We recommend installing curatr and its python dependencies inside a conda virtual environment as follows:

Install miniconda

cd $HOME/Downloads
source .bashrc
conda update conda

Download curatr

Create a convenient directory, for example curatr and clone the repository there:

mkdir curatr
cd curatr
git clone

Initialize and activate a 'curatr' environment with all python dependencies

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

Run Server in debug mode

Django Settings

Make and edit a local copy of the django settings file

cd mcf_standard_browser/mcf_standard_browser/mcf_standard_browser/

Open 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


    from the python terminal:

    import random
    print(''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]))
  • CELERYD_CONCURRENCY: set this number to the desired amount of workers (degree of parallelism) or remove the line to use all CPUs

Initialize the DB

python migrate

Create an admin user

python createsuperuser

Set up a message broker (example: RabbitMQ)

  1. [Install RabbitMQ] (

    echo "deb testing main" >> /etc/apt/sources.list
    curl | sudo apt-key add -
    sudo apt-get update
    sudo apt-get install rabbitmq-server
  2. (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 BROKER_URL = "amqp://myuser:mypassword@localhost:5672/myvhost". Find more details [here] (

  3. Sync your DB:

    python migrate djcelery

Run Server

  1. Start RabbitMQ: sudo service rabbitmq-server start (on Ubuntu)
  2. Start Celery: python celeryd. Useful parameters:
    • --verbosity=2
    • --loglevel=DEBUG
  3. Start the server: python runserver

Curatr should now be visible on localhost:8000

Getting Going

We have provided an example molecular library and data in the media directory

  1. Add standards to library
    • Single
      1. Add molecule: See detailed screenshots in the manuscript supporting information
      2. Add standard: See detailed screenshots in the manuscript supporting information
    • Batch
      1. From the "Curate" menu select "Add Standard"
      2. Click 'Add Batch'
      3. Select a properly formatted .tsv file containing the standards to add this method will silently overwrite existing files allowing batch updating
      4. The task runs asynchronously so after a few seconds hit refresh
  2. Add adducts. Curate -> Add Adduct [nM+X]^(y)
    • NM = n (number of metabolite molecules)
    • Delta formula = X (e.g. "-H2O+H")
    • Charge = y
  3. Add data: See detailed screenshots in the manuscript supporting information
  4. Curate data: See detailed screenshots in the manuscript supporting information



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.


No description, website, or topics provided.




No releases published


No packages published
You can’t perform that action at this time.