Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 16 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,48 @@
<img src="https://github.com/sunbeam-labs/sunbeam/blob/stable/docs/images/sunbeam_logo.gif" width=120, height=120 align="left" />

# sbx_virus_id
# sbx_cenote_taker

<!-- badges: start -->
[![Tests](https://github.com/sunbeam-labs/sbx_virus_id/actions/workflows/tests.yml/badge.svg)](https://github.com/sunbeam-labs/sbx_virus_id/actions/workflows/tests.yml)
[![DockerHub](https://img.shields.io/docker/pulls/sunbeamlabs/sbx_virus_id)](https://hub.docker.com/repository/docker/sunbeamlabs/sbx_virus_id/)
[![Tests](https://github.com/sunbeam-labs/sbx_cenote_taker/actions/workflows/tests.yml/badge.svg)](https://github.com/sunbeam-labs/sbx_cenote_taker/actions/workflows/tests.yml)
[![DockerHub](https://img.shields.io/docker/pulls/sunbeamlabs/sbx_cenote_taker)](https://hub.docker.com/repository/docker/sunbeamlabs/sbx_cenote_taker/)
<!-- badges: end -->

## Introduction

sbx_virus_id is a [sunbeam](https://github.com/sunbeam-labs/sunbeam) extension for identifying viruses in samples. This pipeline uses [MEGAHIT](https://github.com/voutcn/megahit) or [SPAdes](https://github.com/ablab/spades) for assembly of contigs and [Cenote-Taker2](https://github.com/mtisza1/Cenote-Taker2) or [Virsorter2](https://github.com/jiarong/VirSorter2) for viral identification.
sbx_cenote_taker is a [sunbeam](https://github.com/sunbeam-labs/sunbeam) extension for identifying viruses in samples with [Cenote-Taker3](https://github.com/jedvachey/Cenote-Taker3). This pipeline uses [MEGAHIT](https://github.com/voutcn/megahit) for assembly of contigs and then processes assemblies with Cenote-Taker3.

N.B. If using Megahit for assembly, this extension requires also having sbx_assembly installed.
N.B. This extension requires also having sbx_assembly installed.

### Installation

```
sunbeam extend https://github.com/sunbeam-labs/sbx_virus_id.git
sunbeam extend https://github.com/sunbeam-labs/sbx_assembly.git
sunbeam extend https://github.com/sunbeam-labs/sbx_cenote_taker.git
```

# Installing blast dbs
### Cenote-Taker database

Install blast db:
sbx_cenote_taker expects the Cenote-Taker3 reference database to be available locally. Download the database following the official instructions, for example:

```
conda create -n blast
conda activate blast
conda install -c bioconda blast
mkdir refseq_select_prot/
cd refseq_select_prot/
perl `which update_blastdb.pl` --decompress refseq_select_prot
conda activate cenote-taker
get_ct3_dbs -o /path/to/ct3_db --hmm T --hallmark_tax T --refseq_tax T --mmseqs_cdd T --domain_list T --hhCDD T --hhPFAM T --hhPDB T
```

Install viral blast db:
Update the `cenote_taker_db` entry in your Sunbeam configuration to point at the resulting directory.

```
conda stuff from above ^^^
mkdir viral_prot/ && cd viral_prot/
wget https://ftp.ncbi.nlm.nih.gov/refseq/release/viral/viral.1.protein.faa.gz && gzip -d viral.1.protein.faa.gz
makeblastdb -in viral.1.protein.faa -parse_seqids -title "viral" -dbtype prot
```
### Running

## Running

Run with sunbeam on the target `all_virus_id`,
Run with sunbeam on the target `all_cenote_taker`:

```
sunbeam run --profile /path/to/project/ all_virus_id
sunbeam run --profile /path/to/project/ all_cenote_taker
```

### Options for config.yml

- blast_db: path to blast db (default: "") (NOTE: this should be the database file not just the directory it's in)
- blastx_threads: number of threads for running blastx (default: 4)
- bowtie2_build_threads: number of threads for running bowtie2-build (default: 4)
- cenote_taker2_db: path to cenote-taker2 db (default: "") (NOTE: this should be a directory)
- virsorter_db: path to virsorter2 db (default: "") (NOTE: this should be a directory)
- cenote_taker_db: path to cenote-taker3 db (default: "") (NOTE: this should be a directory)
- include_phages: Whether to include phages in the output (default: False)
- use_spades: Whether to use SPAdes instead of MEGAHIT (default: False)
- use_virsorter: Whether to use Virsorter2 instead of Cenote-Taker2 (default: False)

## Legacy Installation

```
git clone https://github.com/sunbeam-labs/sbx_virus_id.git extensions/sbx_virus_id
cd extensions/sbx_virus_id
cat config.yml >> /path/to/sunbeam_config.yml
```
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.1.0
6 changes: 1 addition & 5 deletions config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
sbx_virus_id:
sbx_cenote_taker:
blast_db: ''
blastx_threads: 4
bowtie2_build_threads: 4
cenote_taker_db: ''
cenote_taker_extra_dbs: True # Download hhsuite databases (True, ~70GB) or only basic (False, ~3GB)
virsorter_db: ''
include_phages: False
use_spades: False # Default: Megahit
use_virsorter: False # Default: Cenote-Taker2
34 changes: 17 additions & 17 deletions envs/cenote_taker_env.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
FROM condaforge/mambaforge:latest
# Setup
WORKDIR /home/sbx_virus_id_env
COPY envs/cenote_taker_env.yml ./
# Install environment
RUN conda env create --file cenote_taker_env.yml --name cenote_taker
ENV PATH="/opt/conda/envs/cenote_taker/bin/:${PATH}"
# "Activate" the environment
SHELL ["conda", "run", "-n", "cenote_taker", "/bin/bash", "-c"]
# Run
CMD "bash"
FROM condaforge/mambaforge:latest

# Setup
WORKDIR /home/sbx_cenote_taker_env

COPY envs/cenote_taker_env.yml ./

# Install environment
RUN conda env create --file cenote_taker_env.yml --name cenote_taker

ENV PATH="/opt/conda/envs/cenote_taker/bin/:${PATH}"

# "Activate" the environment
SHELL ["conda", "run", "-n", "cenote_taker", "/bin/bash", "-c"]

# Run
CMD "bash"
17 changes: 17 additions & 0 deletions envs/sbx_cenote_taker.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM condaforge/mambaforge:latest

# Setup
WORKDIR /home/sbx_cenote_taker_env

COPY envs/sbx_cenote_taker.yml ./

# Install environment
RUN conda env create --file sbx_cenote_taker.yml --name sbx_cenote_taker

ENV PATH="/opt/conda/envs/sbx_cenote_taker/bin/:${PATH}"

# "Activate" the environment
SHELL ["conda", "run", "-n", "sbx_cenote_taker", "/bin/bash", "-c"]

# Run
CMD "bash"
4 changes: 2 additions & 2 deletions envs/sbx_virus_id.yml → envs/sbx_cenote_taker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: sbx_virus_id
name: sbx_cenote_taker
channels:
- conda-forge
- bioconda
Expand All @@ -7,4 +7,4 @@ dependencies:
- blast
- bowtie2
- samtools
- python>=3.10
- python>=3.10
17 changes: 0 additions & 17 deletions envs/sbx_virus_id.Dockerfile

This file was deleted.

17 changes: 0 additions & 17 deletions envs/spades_env.Dockerfile

This file was deleted.

34 changes: 0 additions & 34 deletions envs/spades_env.linux-64.pin.txt

This file was deleted.

5 changes: 0 additions & 5 deletions envs/spades_env.yml

This file was deleted.

17 changes: 0 additions & 17 deletions envs/virsorter_env.Dockerfile

This file was deleted.

Loading
Loading