# Install Harpy

method considerations
conda or mamba If using conda, we strongly recommend using version 23.10 or later. If using mamba, replace conda with mamba in the instructions below.
pixi Relatively new kid on the block-- think of it as the next-gen of conda. It's a little different, but it's lightning fast and very sensible to use.
docker Clunkier to use, but best system compatibility and might be what your sysadmins prefer

Harpy is hosted on Bioconda, which means you just need to have either conda or pixi (or docker) on your Unix-like system to install it.

It's best to create a new environment for a harpy installation. The code below creates a new conda/mamba environment called harpy (via -n harpy) and installs harpy into it. You can name this environment whatever you like using the -n somename argument.

conda create -n harpy -c bioconda -c conda-forge harpy

Once conda/mamba finishes, activate the harpy conda/mamba environment with:

conda activate env_name

where env_name is the name of that environment. After doing so, the harpy executable should be callable from your path.

Alternatively, you can create the environment locally within a specific project folder, just swap -n harpy for -p path/to/workdir/harpy, which creates the environment in that specific folder (e.g. potato_blight/harpy).

conda create -p path/to/workdir/harpy -c bioconda -c conda-forge harpy

If you wish to install harpy and its dependencies into an existing environment, activate that environment and execute this installation code:

conda activate env_name
conda install -c conda-forge bioconda::harpy

Or provide -n env_name to install it into an existing environment named env_name

conda install -n env_name -c conda-forge bioconda::harpy

Activate the environment and run conda update:

conda update -c conda-forge bioconda::harpy

# Conda Usage

Activate the conda environment with Harpy and call harpy or harpy --help on the command line to get started

activate the environment
conda activate harpy_env

# or, if installed locally
conda activate path/to/harpy_env
call harpy
harpy

If you prefer Pixi (it's pretty good, you should try it), you can install Harpy to be accessible in your PATH, i.e. a "global" installation:

pixi global install -c conda-forge -c bioconda harpy

Likewise, you can do an installation into a local project directory:

pixi init -c conda-forge -c bioconda projectname && cd projectname
pixi add harpy

If installed via Pixi, you can update Harpy with pixi update:

# global install
pixi global update harpy

# local install
# project dir has the pixi.toml file
cd path/to/projectdir
pixi update harpy

# Pixi Usage

If installed globally, just call harpy or harpy --help on the command line, otherwise navigate to the directory with the pixi environment and call harpy from within it:

call harpy if installed globally
# installed globally
harpy
call harpy if installed locally
# navigate to project directory
cd path/to/workdir

# activate the pixi environment and run harpy
pixi shell
harpy

# or prepend `pixi run` to it without activating the environment
pixi run harpy

If you didn't know, packages on Bioconda are automatically built as containers too! So, if you're using docker, you can pull the Harpy container using:

pull harpy container
docker pull quay.io/biocontainers/harpy

Then proceed to use containerized-Harpy however you are used to using containers on your system.