Skip to content

Installation

Caleb Lareau edited this page Jul 8, 2026 · 6 revisions

Install mgatk

Recommended: First, create a python virtual environment in some working directory to keep things tidy:

python3 -m venv venv3
source venv3/bin/activate

Next, install mgatk from PyPi:

pip3 install mgatk

This should be all that you need. To verify:

mgatk --version

Common error messages in installation

PEP 517 Error

Building wheels for collected packages: numpy, pandas, pyyaml, datrie, pyrsistent
Building wheel for XXXXX (PEP 517) ... error
ERROR: Command errored out with exit status 1
...

This error results from using an old version of pip. We recommend upgrading pip:

pip3 install --upgrade pip

Additional requirements for native execution

In addition the python mgatk package, the following R packages GenomicRanges, data.table, SummarizedExperiment, and Matrix. Note: if you specify the flag --skip-R, you can avoid the internal R execution but will have plain text enumerations of the mitochondrial genetic data.

PCR duplicate removal is performed by bam-dedup, a pure-Python dependency that is installed automatically with mgatk. There is no longer a java requirement (older versions of mgatk shelled out to Picard MarkDuplicates). While not recommended, you can skip duplicate removal entirely with the --keep-duplicates flag (but this retains likely PCR duplicates, which we've found decreases the interpretability of variants by introducing additional false positives).

Note: the --max-javamem/-jm flag is deprecated and now a no-op. It is still accepted so that existing scripts do not break, but it does nothing since duplicate removal no longer runs on a JVM.



Wiki

Logo

Clone this wiki locally