Skip to content

Generic but comprehensive pipeline for prokaryotic genome annotation and interrogation with interactive reports and shiny app.

License

Notifications You must be signed in to change notification settings

abhi18av/bacannot

 
 

Repository files navigation

DOI GitHub release (latest by date including pre-releases) Documentation Dockerhub Nextflow version License

bacannot pipeline

A generic but comprehensive bacterial annotation pipeline


See the documentation »

Report Bug · Request Feature

About

Bacannot is an easy to use nextflow docker-based pipeline that adopts state-of-the-art software for prokaryotic genome annotation. It is a wrapper around several tools that enables a better understanding of prokaryotic genomes.

Its main steps are:

Analysis steps Used software or databases
Genome assembly (if raw reads are given) Flye and Unicycler
Identification of closest 10 NCBI Refseq genomes RefSeq Masher
Generic annotation and gene prediction Prokka
rRNA prediction barrnap
Classification within multi-locus sequence types (STs) mlst
KEGG KO annotation and visualization KofamScan and KEGGDecoder
Annotation of secondary metabolites antiSMASH
Methylation annotation Nanopolish
Annotation of antimicrobial (AMR) genes AMRFinderPlus, ARGminer, Resfinder and RGI
Annotation of virulence genes Victors and VFDB
Prophage sequences and genes annotation PHASTER database, Phigaro and PhySpy
Annotation of integrative and conjugative elements ICEberg
In silico detection of plasmids Plasmidfinder and Platon
Prediction and visualization of genomic islands IslandPath-DIMOB and gff-toolbox
Focused detection of insertion sequences digIS
Merge of annotation results bedtools
Renderization of results in a Genome Browser JBrowse
Renderization of automatic reports and shiny app for results interrogation R Markdown, Shiny and SequenceServer

Release notes

Are you curious about changes between releases? See the changelog.

  • I strongly, vividly, mightily recommend the usage of the latest versions hosted in master branch, which is nextflow's default.
    • The latest will always have support, bug fixes and generally maitain the same processes (I mainly add things instead of removing) that also were in previous versions.
    • But, if you really want to execute an earlier release, please see the instructions for that.
  • Versions below 2.0 are no longer supported.

Further reading and complementary analyses

Moreover, this pipeline has two complementary pipelines (also written in nextflow) for NGS preprocessing and Genome assembly that can give the user a more thorough and robust workflow for bacterial genomics analyses.

Requirements

These images have been kept separate to not create massive Docker image and to avoid dependencies conflicts.

Installation

  1. If you don't have it already install Docker in your computer.
    • After installed, you need to download the required Docker images

    • Required

      docker pull fmalmeida/bacannot:v3.0         # Main image for core annotations
      docker pull fmalmeida/bacannot:v3.0_renv    # R packages for reports
      docker pull fmalmeida/bacannot:jbrowse      # JBrowse software
      
    • Optional

      docker pull fmalmeida/bacannot:kofamscan    # If user wants KO annotation
      docker pull fmalmeida/bacannot:antismash    # If user wants antismash annotation
      docker pull fmalmeida/bacannot:server       # If user wants to open the shiny parser
      

🔥 Nextflow can also automatically handle images download on the fly when executed. However, some servers may hang the download due to the image size (view below).

❗ If the download of fmalmeida/bacannot:v3.0 image keeps hanging due to its size, download fmalmeida/bacannot:main_tools first. It is the core of the versioned tag and it will help on the download by creating some cache.

  1. Install Nextflow (version 20.07 or higher):

    curl -s https://get.nextflow.io | bash
    
  2. Give it a try:

    nextflow run fmalmeida/bacannot --help
    

🔥 Users can get let the pipeline always updated with: nextflow pull fmalmeida/bacannot

Maintaining databases up-to-date

To use the most up-to-date databases users must run docker pull fmalmeida/bacannot:v3.0 before running the pipeline. We try to keep this image updated every three months if they pass execution tests after built.

A custom script is provided to allow users to update the database image any time, if desired.

bash <(wget -O - -o /dev/null https://github.com/fmalmeida/bacannot/raw/master/bin/update_database_image.sh)

This command line will trigger a custom script that downloads the databases and build the main docker image.

Quickstart

Please refer to the quickstart page »

Overview of outputs

A nice overview of the output directory structure and the main tools/features produced by the pipeline is provided at https://bacannot.readthedocs.io/en/latest/outputs.html.

Documentation

Usage

Users are advised to read the complete documentation »

  • Complete command line explanation of parameters:
    • nextflow run fmalmeida/bacannot --help
  • See usage examples in the command line:
    • nextflow run fmalmeida/bacannot --examples

Command line usage examples

Command line executions are exemplified in the manual.

Using the configuration file

All the parameters showed above can be, and are advised to be, set through the configuration file. When a configuration file is set the pipeline is run by simply executing nextflow run fmalmeida/bacannot -c ./configuration-file

Your configuration file is what will tell to the pipeline the type of data you have, and which processes to execute. Therefore, it needs to be correctly set up.

Create a configuration file in your working directory:

  nextflow run fmalmeida/bacannot --get_config

Interactive graphical configuration and execution

Via NF tower launchpad (good for cloud env execution)

Nextflow has an awesome feature called NF tower. It allows that users quickly customise and set-up the execution and configuration of cloud enviroments to execute any nextflow pipeline from nf-core, github (this one included), bitbucket, etc. By having a compliant JSON schema for pipeline configuration it means that the configuration of parameters in NF tower will be easier because the system will render an input form.

Checkout more about this feature at: https://seqera.io/blog/orgs-and-launchpad/

Via nf-core launch (good for local execution)

Users can trigger a graphical and interactive pipeline configuration and execution by using nf-core launch utility. nf-core launch will start an interactive form in your web browser or command line so you can configure the pipeline step by step and start the execution of the pipeline in the end.

# Install nf-core
pip install nf-core

# Launch the pipeline
nf-core launch fmalmeida/bacannot

It will result in the following:

Known issues

  1. Sometimes when navigating through the shiny parser the reports and JBrowse tabs may still be pointing to old, or just different, samples that have been analysed before and not the actual sample in question. For example, you open the shiny server for the Sample 2, but the reports and JBrowse are showing results of Sample 1. This is caused by the browser's data storages and cookies.
    • To solve this problem user's can just clear the cookies and data cache from the browser.
  2. The JBrowse wrapper in the shiny server is not capable of displaying the GC content and methylation plots when available. It can only display the simpler tracks. If the user wants to visualise and interrogate the GC or methylation tracks it must open the JBrowse outside from the shiny server. For that, two options are available:
    • You can navigate to the jbrowse directory under your sample's output folder and simply execute http-server. This command can be found at: https://www.npmjs.com/package/http-server
    • Or, you can download the JBrowse Desktop app and, from inside the app, select the folder jbrowse/data that is available in your sample's output directory.

Citation

Please cite this pipeline using our Zenodo tag or directly via the github url.

Please, do not forget to cite the software that were used whenever you use its outputs. See the list of tools.

About

Generic but comprehensive pipeline for prokaryotic genome annotation and interrogation with interactive reports and shiny app.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Nextflow 39.8%
  • R 37.2%
  • Shell 16.6%
  • Python 6.2%
  • CSS 0.2%