Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adraismawur committed Oct 4, 2024
1 parent 26c17bd commit b124fd5
Showing 1 changed file with 118 additions and 23 deletions.
141 changes: 118 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@
![Pylint](https://medema-group.github.io/BiG-SCAPE/badges/pylint.svg)


# BiG-SCAPE

**BiG-SCAPE** (Biosynthetic Gene Similarity Clustering and Prospecting Engine) is a software package, written in Python, that constructs sequence similarity networks of Biosynthetic Gene Clusters (BGCs) and groups them into Gene Cluster Families (GCFs). BiG-SCAPE does this by rapidly calculating a distance matrix between gene clusters based on a comparison of their protein domain content, order, copy number and sequence identity.

As input, BiG-SCAPE takes GenBank files from the output of [antiSMASH](https://antismash.secondarymetabolites.org) with BGC predictions, as well as reference BGCs from the [MIBiG repository](https://mibig.secondarymetabolites.org/). As output, BiG-SCAPE generates tab-delimited output files, as well as a rich HTML visualization.

In principle, BiG-SCAPE can also be used on any other gene clusters, such as pathogenicity islands, secretion system-encoding gene clusters, or even whole viral genomes.

If you find BiG-SCAPE useful, please [cite us]() [TODO V2].



## Running BiG-SCAPE

There are a few ways to run BiG-SCAPE, depending on your needs.
Expand All @@ -18,26 +30,16 @@ Software:
- python 3.11 or up
- conda/mamba

All steps start with cloning the repository:

`git clone https://github.com/medema-group/BiG-SCAPE`.

All other steps assume you are in the BiG-SCAPE directory, using cd `BiG-SCAPE`.

The most straightforward ways of installing are using Docker or Hatch.
However, these do not allow you to run the application from anywhere using a command like `big-scape`.
The most straightforward way of installing is using Hatch.
However, this does not allow you to run the application from anywhere using a command like `big-scape`.
If you want to do that, follow the **Using Conda/Mamba** steps.

### Using Docker

TODO

### Using Hatch

Install Hatch and setup an environment:

1. `pip install hatch`
2. `hatch -v env create bigscape`
1. `git clone https://github.com/medema-group/BiG-SCAPE`.
2. `cd BiG-SCAPE`
3. `pip install hatch`
4. `hatch -v env create bigscape`

Run the application through hatch in the BiG-SCAPE folder:

Expand All @@ -50,18 +52,111 @@ This command only works inside the BiG-SCAPE folder.

These steps use `mamba`.

1. `mamba env create -f environment.yml`
2. `mamba activate bigscape`
3. `pip install .`
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 bigscape anywhere:

`bigscape --help`

### Using Docker
Run BiG-SCAPE through docker using the docker run command:

```sh
docker run \
--volume your_root_data_dir:/home/data \
--detatch=false \
--rm \
--user=$(id -u):$(id -g) \
TODO: DOCKER URL \
# 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 Pfam and where you want
to put your output.

For example:

```
/home/example/data
├ /input
| ├ experiment_1/
| | └ sample_1/
| | ├ a.region001.gbk
| | └ a.region002.gbk
| └ unrelated_folder_do_not_use/
├ /output
└ /pfam
└ Pfam-A.hmm
```

Can use a command as such:

```
docker run \
--volume /home/example/data:/home/data \
--detatch=false \
--rm \
--user=$(id -u):$(id -g) \
TODO: DOCKER URL \
cluster \
-i /home/data/input/experiment_1 \
-o /home/data/output/experument_1 \
-p /home/data/pfam/Pfam-A.hmm
```


## Dev instructions

1. pip install -r dev-requirements.txt
2. pre-commit install
3. mkdocs build
4. have fun!
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 . --extra 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).

### Using hatch

1. `pip install hatch`
2. `git clone https://github.com/medema-group/BiG-SCAPE`.
3. `cd BiG-SCAPE`
4. `hatch env create dev`
5. `hatch run dev:pre-commit install`

To run BiG-SCAPE:

`hatch run bigscape:dev --help`

To run tests:

`hatch test`

These commands only work inside the BiG-SCAPE folder.

When developing, make sure to use the hatch environment under .venv/dev.

0 comments on commit b124fd5

Please sign in to comment.