MAGI is a platform for interactive visualization and collaborative annotation of combinations of genetic aberrations. MAGI allows users to upload their own private datasets and view and annotate them in combination with public datasets.
This Docker image automatically installs the prerequisites for MAGI within its own container. It is written in Node.js with a MongoDB database. MAGI uses D3, jQuery, and GD3 on the front-end. Below, we describe how to get a version of MAGI running on your personal machine.
The image runs nginx as a reverse proxy to port 8000 within the container. MAGI listens on port 8000.
The MAGI container requires links to two other docker containers for full functionality, mongo and a statistics server.
The statistics server can be found at magi-images/statistics.
For use with linked containers:
docker run -d --name mongo mongo docker run -d --name enricher magi:stats-server docker run --link mongo:mongo --link enricher:statserver -p --env-file=local.env 80:80 magi
Alternately, you can run start.sh from the host machine.
In either case, the web application can then be viewed at localhost:80.
There are various items that are configured in the local.env file.
The SITE_URL should contain the address used to access MAGI.
The MONGO_HOST and MONGO_PORT variables should contain the IP address and the port on which mongod listens (usually 27017).
Likewise, The ENRICHMENT_HOST and ENRICHMENT_PORT should contain the IP address and the port on which the statistics server listens (defaults to 8888).
MAGI uses the Google OAuth2 protocol for authentication. To set up authentication on your own personal version of MAGI:
- Fill in the following fields in local.env with the resulting data:
If you do not set up authentication, you will not be able to use the
/upload feature, and attempting to "Login via Google" will result in server errors. You will, however, be able to view public datasets and upload additional datasets to MongoDB from the command line.Annotations are done with Google OAuth2.
The mongo TCP port can be probed with
$ nc -zw2 mongo 27017 && echo "Mongo open"
within the container.
Public data associated with the TCGA project can be uploaded and placed onto the database with the load-TCGA-data.sh script within the container once the mongo instance is up and running.
If you have private data, security can be provided with password protection by properly configuring nginx. See here for details.