A simple web interface for MQ2 to process output from MapQTL analysis.
Switch branches/tags
Failed to load latest commit information.
static Remove protovis since we no longer use it May 29, 2013
templates Fix the link to PBR underneath the Wageninge UR logo at the top of ea… May 29, 2013
.gitignore Add .cfg files to .gitignore Jun 28, 2012
README.rst Remove the section about Internet Explorer from the README as we no l… Jul 1, 2013
__init__.py Add an __init__.py to be able to import on the folder Jun 28, 2012
mq2.cfg.sample Add a new allowed mimetype for the zip archive. Aug 29, 2012
mq2_web.py Fix experiment_done, fix comparison of existing settings vs given one Jun 12, 2013
tests.py Update copyright years since the files were changed in 2013 May 29, 2013



Author: Pierre-Yves Chibon <pierre-yves.chibon@wur.nl>, <pingou@pingoured.fr>

A web application for MQ2 to quickly visualize output from MapQTL analysis

Assuming one QTL per linkage group and using the LOD threshold set by the user. This application extracts all the QTLs detected by MapQTL, using the JoinMap map file, it finds the closest marker and finally put the number of QTLs found for each marker on the map.

This approach quickly allows you to find and visualize potential QTL hotspot in your dataset. This is particularly usefull for large QTL analysis on a large number of traits.

Get this project:

Source: https://github.com/PBR/MQ2_Web

Run it at: http://www.plantbreeding.wur.nl/mq2


This project is a Flask application, as such it depends on:

Since this project is a web-interface to MQ2, it requires MQ2 installed.

Deploying this project:

Instruction to deploy this application is available on the Flask deployment documentation page.

My approach.

Below is the approach I took to deploy the instance on a local machine.

Retrieve the sources:

cd /srv/
git clone <repo>
cd MQ2_Web

Copy the configuration file:

cp mq2.cfg.sample mq2.cfg

Adjust the configuration file (upload folder, secret key...)

Don't forget to create the folder and set its right it you use a specific one, for example if you use /var/www/uploads as upload folder:

sudo mkdir /var/www/uploads
sudo chown apache:apache /var/www/uploads

Then configure apache:

sudo vim /etc/httd/conf.d/wsgi.conf

and put in this file:

WSGIScriptAlias /mq2 /var/www/wsgi/mq2.wsgi
<Directory /var/www/wsgi/>
   Order deny,allow
   Allow from all

Then create the file /var/www/wsgi/mq2.wsgi with:

import sys
sys.path.insert(0, '/srv/MQ2_Web')

import mq2_web
application = mq2_web.APP

Then restart apache and you should be able to access the website on http://localhost/mq2

Set the demo session:

The configuration file contains the name of a sample_session which is presented in the index page of the project to show what MQ² can do.

Create your own sample session by creating a folder in the static folder of MQ²_Web. Place on this folder the dataset you want to have in your sample session (name it input.zip) and set in the configuration file the name of the directory you created.


This project contains unit-tests allowing you to check if your server has all the dependencies correctly set.

To run them:

python tests.py

Note that the unit-tests will fail if the upload_folder defined in mq2.cfg is not writable for the user running the tests.

Cleaning the upload folder:

Within the sources of the project is a script called clean_uploads.py which can be called from within a cron job to clean the upload directory and remove the session older than X days.

This X is set at the top of the script and can be adjusted as desired.

python clean_uploads.py --help

provides more information about the options available for this script.

Beware that this script requires the mq2.cfg file to be in the same directory as it is.


This project is licensed GPLv3+.