-
Notifications
You must be signed in to change notification settings - Fork 8
Installation Instructions
You can follow these instructions to get the preprocessing script up and running on your machine. (If you just want to try out the visualization side of the tool without installing anything just yet, you can access a demo of MetagenomeScope's viewer interface at mgsc.umiacs.io.)
These commands assume you have git and conda installed on your system, and that you're using a Linux or macOS system.
conda create -n metagenomescope -c anaconda python=3.6 graphviz=2.38.0 pygraphviz numpy
source activate metagenomescope
pip install git+https://github.com/marbl/MetagenomeScope.git
mgsc -i [input assembly graph location] -o [output file prefix]
The final command, mgsc
, will produce a .db file starting with the specified file prefix that can be visualized in the MetagenomeScope viewer interface.
There are a lot of options available for the preprocessing script, which are detailed here. However, the only required options are -i/--inputfile
(to specify an input assembly graph file) and -o/--outputprefix
(to specify an output .db file prefix).
Note that using the -spqr
argument will only work on certain system architectures—it was built on a 64-bit Linux system. If you want to install MetagenomeScope with SPQR tree support built in for your particular system, read on!
Most of MetagenomeScope's code (at least on the command-line side of things) is written in Python. However, the parts of its code that perform SPQR tree decomposition -- if you run mgsc
with the -spqr
option -- are written in C++, so that they can interface with OGDF.
In order to compile this for your system, there are some extra steps. This installation will involve creating two conda environments (the first one is temporary and just used to compile the SPQR script; the second one is the one we will install MetagenomeScope into).
# Instead of pip installing, clone the MetagenomeScope source code to your
# current working directory
git clone https://github.com/marbl/MetagenomeScope.git
cd MetagenomeScope
# Create a temporary conda environment that we'll use to compile the SPQR script
# We need to do this because installing this version of OGDF requires Python 2
conda create -n py2env python=2.7
source activate py2env
# Download OGDF
wget -O ogdf.zip https://ogdf.uos.de/wp-content/uploads/2019/04/ogdf.v2015.05.zip
unzip ogdf.zip
# Build OGDF -- these commands may take a few minutes
cd OGDF
bash makeMakefile.sh
# you can use the -j option here to parallelize this, if your system supports it
make
# Now that we've built OGDF, we can build MetagenomeScope's "spqr script". This
# will replace the SPQR script binary located in `metagenomescope/spqr` with a
# binary that supports your system.
cd ..
make spqr IDIR=OGDF/include/ RDIR=OGDF/_release/
# Deactivate the temporary Python 2 conda environment (you can delete it if you want)
conda deactivate
# Finally, create a "normal" environment that we'll install MetagenomeScope into
conda create -n metagenomescope_spqr -c anaconda python=3.6 graphviz=2.38.0 pygraphviz numpy
source activate metagenomescope_spqr
# Now, pip-install MetagenomeScope from the current directory
pip install -e .
Now we're free to use MetagenomeScope with a version of the SPQR script that supports our system:
mgsc -i [input assembly graph location] -o [output file prefix] -spqr
(Note that the metagenomescope_spqr
conda environment will need to be activated in order to use MetagenomeScope.)
-
Controls
(Work in progress)
-
Viewer Interface Tutorial