MAGeCK / Wiki / install
Menu ▾ ▴

install

Wei Li
There is a newer version of this page. You can find it here.

Installation

There are several ways to install MAGeCK.

Method 1: through conda/bioconda channel

You can install MAGeCK-VISPR (which includes MAGeCK) using conda, a commonly used package management softare. The instructions to install MAGeCK-VISPR can be found on MAGeCK-VISPR manual.

Method 2: through source code

You can also download the software and install it by yourself. See the detailed instructions below.

Download

The latest version of MAGeCK (0.5.8) can be downloaded here:

Or click the link here (in cases the button points to a wrong file).


For earlier versions (< 0.5.4), the zip file is encrypted, but you can get the password easily by one of the following options:

  • Join our MAGeCK Google group and the password is shown on the top of the forum; or
  • Send an email to mageck.help@gmail.com with the subject "password", and you will get an automatic reply with password within 1 minute.

You need to go to the Terminal to unzip and install the software. See the instructions for Installation below.


System requirement

MAGeCK can be run on either Mac or Linux system. Since MAGeCK is written in Python and C, Python 2.7 (>2.7) and a C compiler is needed.

Optional dependencies

Two optional softwares include R and pdflatex. MAGeCK relies on both softwares to generating PDF reports if the --pdf-report option is used. If it is not possible to install them, you can also generate PDF reports by copying some MAGeCK output files to another computers with R and pdflatex are properly installed. See Q and A for more information.

If you use the --pdf-report option, xtable is required, and gplots as well as ggplot2 is optional. Use install.packages("xtable") and install.packages(c("gplots","ggplot2")) in R to install them.

You won't get any error messages if you don't have gplots, but you will get a more beautiful clustering figure in the pdf report of the count command.

MAGeCK also suggests users installing numpy to calculate the negative binomial p value. However, in cases where numpy is not found, MAGeCK will use the normal p value instead. There may be slight differences between both methods.

What if I cannot install these R packages in my machine

You can run MAGeCK without --pdf-report option, and copy some files to another machine with these R packages to generate pdf report. See Q and A for more details.

What if I run into issues of latex

You can still get some figures generated from MAGeCK, by adding the "--keep-tmp" option to keep intermediate files.

Installation

Since version 0.3, MAGeCK uses standard Python installation procedures (distutils) for compiling and installation of the software.

The installation procedure is extremely easy. First, download the source code, unzip it by using the following command (or just double-clicking it), and go into the directory in the command line:

tar xvzf mageck-0.5.4.tar.gz
cd mageck-0.5.4

After that, invoke python setup.py:

python setup.py install

And it is done! If you want MAGeCK to be installed on your own directory , use the following command instead:

python setup.py install --user

This is the easiest way to install mageck. An alternative approach is (you may have one additional step to set up the environment variables; see below)

python setup.py install --prefix=$HOME

where $HOME is the root directory you want to install (usually the user home).

Manual installation

The manual installation is deprecated since version 0.3. Please refer to the installation instructions above.

After downloading the source code, follow the instructions below for manual installation.

Setting up the environment variables

In most systems you don't need to set up the environment variables. Just type "mageck" in the command line to see if the mageck program works.

If you get a "command not found" error, that indicates the environment variables are not properly set up. There are several additional steps to finish the installation. First you need to add the path of the mageck program to your PATH variable.

There are several different situations.

1. If you use the --prefix=$HOME option during installation

Set up the PATH variable by typing:

export PATH=$PATH:$HOME/bin

2. If you use the --user option during installation (and other situations)

You first need to determine where MAGeCK is installed. See this Q and A for additional steps to determine the correct bin directory.

If your bin directory is located in /Users/john/.local/bin, then type the following:

export PATH=$PATH:/Users/john/.local/bin

Setting up PYTHONPATH variable

You may also need to add the path of the MAGeCK module to the PYTHONPATH variable. Again, follow the steps above to determine the correct Python installation path (see the Q&A). This variable should be set as, for example,

export PYTHONPATH=/Users/john/.local/lib/python2.7/site-packages:$PYTHONPATH

Save your PATH or PYTHONPATH variable

To save the path configuration (so you don't have to type it every time), place the above command in your ~/.bashrc (for Linux) or ~/.bash_profile (for Mac).

Experimental version

The experimental version of MAGeCK is available at bitbucket. Note that the source codes on BitBucket are experimental and are not fully tested, and it may not be stable or function well. It is strongly recommended to use the MAGeCK software downloaded from sourceforge or from bioconda.

Return to [Home]