Skip to content

Installing and Running BiG SCAPE

Catarina Loureiro edited this page Dec 13, 2024 · 2 revisions

User instructions

There are a few ways to run BiG-SCAPE 2, depending on your needs.


Prerequisites

Software:

  • python 3.11 or up
  • conda/mamba

Data:

See more details here.


Using Conda/Mamba

Note: The bigscape package in the bioconda repository (https://anaconda.org/bioconda/bigscape) has not been generated nor is it being maintained by us, so please follow the installation instructions bellow. We hope to address this in the future.

We assume that you already have a (mini)conda/(micro)mamba package manager installed.

Note: Working on a macbook with a M1/M2 chip? follow these (or analog) instructions: https://stackoverflow.com/questions/71515117/how-to-set-up-a-conda-osx-64-environment-on-arm-mac

Note: cloning the most recent version of this repo will likely get you a working version, but we advise to always use a stable release.

These steps use mamba, for conda/miniconda/micromamba simply replace mamba with your package manager of choice.

Clone this repository:

  1. git clone https://github.com/medema-group/BiG-SCAPE.
  2. cd BiG-SCAPE
  3. mamba env create -f environment.yml
  4. mamba activate bigscape
  5. pip install .

You can now run BiG-SCAPE 2 anywhere:

bigscape --help


Using Docker

We assume you have a working version of Docker installed, and good knowledge of how Docker works.

Run BiG-SCAPE through docker using the docker run command:

docker run \
    --volume your_root_data_dir:/home/data \
    --detach=false \
    --rm \
    --user=$(id -u):$(id -g) \
    ghcr.io/medema-group/big-scape:2.0.0-beta.1 \
    # arguments from here are the same as using bigscape.py normally
    cluster \
    -i /home/data/your_input \
    -o /home/data/output_folder \
    -p /home/data/pfam_folder/Pfam-A.hmm

your_root_data_dir must be a parent folder of your input, your profile hmm database (commonly, Pfam) and where you want to put your output.

For example:

/home/example/data
  ├ /input
  |    ├ genome_1/
  ├ /output
  └ /pfam
      └ Pfam-A.hmm

Can use a command as such:

docker run \
    --volume /home/example/data:/home/data \
    --detach=false \
    --rm \
    --user=$(id -u):$(id -g) \
    ghcr.io/medema-group/big-scape:2.0.0-beta.1 \
    cluster \
    -i /home/data/input/genome_1 \
    -o /home/data/output/genome_1\
    -p /home/data/pfam/Pfam-A.hmm

Dev Instructions

We appreciate any contributions! In order to setup a development environment, please follow the following steps:

Using mamba

  1. Install (micro)mamba
  2. git clone https://github.com/medema-group/BiG-SCAPE.
  3. cd BiG-SCAPE
  4. mamba env create -f environment.yml
  5. mamba activate bigscape
  6. pip install -e .[dev]
  7. pre-commit install

To run BiG-SCAPE: python bigscape.py --help

You can use the bigscape --help runnable directly, but this must be re-installed each time you make a change to the codebase.

To run tests: python -m pytest

When developing, make sure to use the mamba environment you created (called bigscape).