Skip to content

Installation

martinghunt edited this page Apr 11, 2022 · 13 revisions

There are GUI apps available for Windows and Mac. There are the following options if you are using the command line:

All files are available to download from the github latest release page. Mac and Windows apps are also available here.

GUI apps

Depending on your operating system, download one of the following files from the GitHub releases, where "X.Y.Z" should be replaced with the version of the release:

  • Mac GUI app: Mykrobe-X.Y.Z.dmg
  • Windows GUI app: Mykrobe-Setup-X.Y.Z.exe

Then double-click on the downloaded file and follow the instructions to install.

Bioconda

conda badge

Before attempting to install with bioconda, please ensure you have your channels set up as specified in the documentation. If you don't, you may run into issues with an older version of mykrobe being installed.

To install this package with conda:

conda install -c bioconda mykrobe

Containers

Biocontainers maintain images for all bioconda recipes. The container and all tags for mykrobe can be found here. To use a specific version, just select your required version/tag and use the URI as follows.

tag="0.9.0--py37h13b99d1_2"
uri="quay.io/biocontainers/mykrobe:${tag}"

# using Singularity
singularity exec docker://"$uri" mykrobe --help
# using docker
docker pull "$uri"

Alternatively, you can build your own Singularity container. The root of the mykrobe repository has the file Singularity.def, which can be used to build the latest release and install the latest panels:

sudo singularity build mykrobe.img Singularity.def

From source

Requirements:

  • C++ compiler (to compile mccortex during install)
  • Python >= 3.6
  • Python requests modulde (pip3 install requests)
  • mongodb > 3.0 (optional, not needed to run mykrobe predict)

Either git clone:

git clone https://github.com/Mykrobe-tools/mykrobe.git

or download the latest release source code archive and extract it.

Then install with:

cd mykrobe
pip3 install .

and (unless you are installing an older version than v0.9.0) download the latest panel data with:

mykrobe panels update_metadata
mykrobe panels update_species all

If you get installation problems relating to compiling mccortex, then it may be helpful to debug by trying to compile mccortex first. The mykrobe install looks for the compiled binary file ./mccortex/bin/mccortex31, and if it finds it then it does not try to recompile, and simply copies the file. This means you can make this binary before running pip3, like this:

git clone --recursive -b geno_kmer_count https://github.com/Mykrobe-tools/mccortex mccortex
cd mccortex
make

and once the make runs successfully, pip3 install . can be run from the mykrobe/ directory.

Self-contained Mac/Windows command line

These are available for Windows and Mac and should simply work without installing anything. Depending on your operating system, download one of the following files from the github release, where "X.Y.Z" should be replaced with the version of the release:

  • Mac self-contained command line: mykrobe.command_line.osx.vX.Y.Z.tar.gz
  • Windows self-contained command line: mykrobe.command_line.windows.vX.Y.Z.tar.gz

Extract the archive. Inside is an executable called mykrobe_atlas, which is really just command line mykrobe. The name is different because these stand-alone packages were made to use with Atlas. Bear this in mind when reading the documentation, because all example commands will use mykrobe, not mykrobe_atlas.

If you are using a mac, you will likely get the error that mykrobe_atlas "can’t be opened because Apple cannot check it for malicious software." You can fix this by running this command on the mykrobe_atlas/ directory (not just the executable!):

xattr -d com.apple.quarantine -r mykrobe_atlas