Installation

Requirements

Installation from Source

  1. Get the code.

git clone https://github.com/streetslab/dimelo.git
cd dimelo
  1. Create and activate a python 3.7 conda venv.

Recommended to avoid package dependency install issues:

Linux:

conda env create -f environment_linux.yml
conda activate dimelo

MacOS:

conda env create -f environment_macOS.yml
conda activate dimelo

Other option to create venv without using provided yml:

conda create --name dimelo python=3.7
conda activate dimelo
  1. Install dimelo and its requirements.

pip install .
  1. Now the dimelo package is available for import. For example, you may import it like this:

python
>>> import dimelo as dm

And then call functions like this:

>>> dm.function_name(...)

Alternatively, functions can be accessed from the command line like this:

dimelo-function-name ...

Other notes

  • The dependency pybedtools requires that you have bedtools. Because this is not able to be installed with pip, if you did not create your environment from environment.yml, you must run:

conda install bedtools
  • If you would like to make changes to the package, you can install it in developer mode:

pip install -e .
  • Additionally, if making contributions to the codebase, install pre-commit, which will enforce the dimelo code style (black, flake8) on each of your commits:

pip install pre-commit
pre-commit install