Skip to content

Installation

Niklas Birth edited this page Jan 13, 2024 · 9 revisions

There are several ways to install CoCoPyE. The easiest and recommended way is the installation via conda. Alternatively you can use pip or install CoCoPyE from source.

Installation via conda

You need to have conda (or some compatible package manager like mamba) installed. See here for conda installation instructions.

Important

Please note that the Conda installation currently does not work for MacOS with ARM CPU. You can use pip instead (see below).

CoCoPyE is available on the conda-forge channel. Create a new environment, install the application and activate the created environment with

conda create -n cocopye -c conda-forge cocopye
conda activate cocopye

Continue with Preparation.

Installation via pip

Create a virtual environment and activate it:

python -m venv .venv

# Only use one of the following lines, depending on your operating system
source .venv/bin/activate  # Linux/Mac
.venv\Scripts\activate     # Windows

Important

It is highly recommended to install CoCoPyE in its own virtual environment to avoid dependency conflicts with other packages. If you decide to skip the previous step and encounter any errors during the installation or runtime of the tool, please test it in its own virtual environment before creating a bug report.

Install CoCoPyE using pip:

pip install cocopye

Continue with Preparation.

Installation from source

Note

This is a more difficult installation method that has no advantage if you don't intend to tinker with the source code. For normal users we recommend using pip or conda instead.

Clone this repository:

git clone https://github.com/gobics/cocopye.git
cd cocopye

Create and activate a new virtual environment (optional, but highly recommended):

python -m venv .venv

# Only use one of the following lines, depending on your operating system
source .venv/bin/activate  # Linux/Mac
.venv/Scripts/activate     # Windows

You can install CoCoPyE either as a pip package (similar to the pip installation method) or run the CLI Python file directly. For the former, run

pip install .

For the latter, run

# Install requirements
pip install -r requirements.txt

# Running CoCoPyE
cd src  # This step is important; using something else as working directory won't work
python cli.py [parameters]

Continue with Preparation.

Preparation

Note

CoCoPyE has a low-memory option which is recommended for systems with 16GB or less RAM. See System requirements for more information.

CoCoPyE requires UProC for counting protein families. Furthermore both UProC and CoCoPyE need a database. You can download and install all these dependencies by executing cocopye setup download-dependencies. (If you have installed CoCoPyE via Conda then UProC was installed alongside and the command will only download the databases.) Alternatively, if you don't want to use the automatic downloader, you can specify the location of dependencies in the configuration file (the file will be created on first run; default location under Linux is /home/<username>/.config/cocopye/cocopye.toml).

Important

Note for MacOS users

Currently CoCoPyE cannot automatically install UProC on MacOS when using cocopye setup download-dependencies. If you are using an x86 CPU we recommend to use the Conda installation method to mitigate this problem (Conda will install UProC alongside CoCoPyE). However, at the moment we don't offer a conda package for ARM architecture. If you are using OS X with ARM CPU then there is no other way than installing UProC by yourself and specifying the path to the binaries in the configuration file. See here for a guide on how to get UProC running on MacOS.

Once finished you can start a testrun with cocopye setup testrun. If this doesn't produce any errors you should be ready to use CoCoPyE. See Usage for further instructions.