• Stars
    star
    210
  • Rank 187,585 (Top 4 %)
  • Language
    Perl
  • License
    GNU General Publi...
  • Created about 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

⚡♠️ Assemble bacterial isolate genomes from Illumina paired-end reads

Build Status License: GPL v3 Don't judge me

Shovill

Assemble bacterial isolate genomes from Illumina paired-end reads

Introduction

The SPAdes genome assembler has become the de facto standard de novo genome assembler for Illumina whole genome sequencing data of bacteria and other small microbes. SPAdes was a major improvement over previous assemblers like Velvet, but some of its components can be slow and it traditionally did not handle overlapping paired-end reads well.

Shovill is a pipeline which uses SPAdes at its core, but alters the steps before and after the primary assembly step to get similar results in less time. Shovill also supports other assemblers like SKESA, Velvet and Megahit, so you can take advantage of the pre- and post-processing the Shovill provides with those too.

⚠️ Shovill is for isolate data only, primarily small haploid organisms. It will NOT work on metagenomes or larger genomes. Please use Megahit directly instead.

Main steps

  1. Estimate genome size and read length from reads (unless --gsize provided)
  2. Reduce FASTQ files to a sensible depth (default --depth 100)
  3. Trim adapters from reads (with --trim only)
  4. Conservatively correct sequencing errors in reads
  5. Pre-overlap ("stitch") paired-end reads
  6. Assemble with SPAdes/SKESA/Megahit with modified kmer range and PE + long SE reads
  7. Correct minor assembly errors by mapping reads back to contigs
  8. Remove contigs that are too short, too low coverage, or pure homopolymers
  9. Produce final FASTA with nicer names and parseable annotations

Quick Start

% shovill --outdir out --R1 test/R1.fq.gz --R2 test/R2.fq.gz

<snip>
Final assembly in: test/contigs.fa
It contains 17 (min=150) contigs totalling 169611 bp.
Done.

% ls out

contigs.fa   contigs.gfa   shovill.corrections  
shovill.log  spades.fasta

% head -n 4 out/contigs.fa

>contig00001 len=52653 cov=32.7 corr=1 origname=NODE_3 date=20180327 sw=shovill/1.0.1
ATAACGCCCTGCTGGCCCAGGTCATTTTATCCAATCTGGACCTCTCGGCTCGCTTTGAAGAAT
GAGCGAATTCGCCGTTCAGTCCGCTGGACTTCGGACTTAAAGCCGCCTAAAACTGCACGAACC
ATTGTTCTGAGGGCCTCACTGGATTTTAACATCCTGCTAACGTCAGTTTCCAACGTCCTGTCG

Installation

Homebrew

brew install brewsci/bio/shovill
shovill --check

Using Homebrew will install all the dependencies for you: Linux or MacOS

Conda

conda install -c conda-forge -c bioconda -c defaults shovill
shovill --check

Using Bioconda will install all the dependencies for you on MacOS and Linux.

Containers

The Docker recipe is generously maintained by Curtis Kapsak and the StaPH-B workgroup.

# Docker
docker pull staphb/shovill:latest
docker run staphb/shovill:latest shovill --help

# Singularity
singularity build shovill.sif docker://staphb/shovill:latest
singularity exec shovill.sif shovill --help

Source

git clone https://github.com/tseemann/shovill.git
./shovill/bin/shovill --help
./shovill/bin/shovill --check

You will need to install all the dependencies manually:

Note that you will need to make pilon and trimmomatic executables. You can make a simple wrapper for each that just passes the shell arguments.

Output files

Filename Description
contigs.fa The final assembly you should use
shovill.log Full log file for bug reporting
shovill.corrections List of post-assembly corrections
contigs.gfa Assembly graph (spades)
contigs.fastg Assembly graph (megahit)
contigs.LastGraph Assembly graph (velvet)
skesa.fasta Raw assembly (skesa)
spades.fasta Raw assembled contigs (spades)
megahit.fasta Raw assembly (megahit)
velvet.fasta Raw assembly (velvet)

contigs.fa

This is most important output file - the final, corrected assembly. It contains entries like this:

>contig00001 len=263154 cov=8.9 corr=1 origname=NODE_1 date=20180327 sw=shovill/0.9
>contig00041 len=339 cov=8.8 corr=0 origname=NODE_41 date=20180327 sw=shovill/0.9

The sequence IDs are named as per the --namefmt option, and the comment field is a series of space-separated name=value pairs with the following meanings:

Pair Meaning
len Length of contig in basepairs
cov Average k-mer coverage as reported by assembler
corr Number of post-assembly corrections (unless --nocorr used)
origname The original name of the contig (before applying --namefmt)
date YYYYMMDD date when this contig was assembled
sw shovill-engine/version where engine is the --assembler chosen

Advanced options

SYNOPSIS
  De novo assembly pipeline for Illumina paired reads
USAGE
  shovill [options] --outdir DIR --R1 R1.fq.gz --R2 R2.fq.gz
GENERAL
  --help          This help
  --version       Print version and exit
  --check         Check dependencies are installed
INPUT
  --R1 XXX        Read 1 FASTQ (default: '')
  --R2 XXX        Read 2 FASTQ (default: '')
  --depth N       Sub-sample --R1/--R2 to this depth. Disable with --depth 0 (default: 150)
  --gsize XXX     Estimated genome size eg. 3.2M <blank=AUTODETECT> (default: '')
OUTPUT
  --outdir XXX    Output folder (default: '')
  --force         Force overwite of existing output folder (default: OFF)
  --minlen N      Minimum contig length <0=AUTO> (default: 0)
  --mincov n.nn   Minimum contig coverage <0=AUTO> (default: 2)
  --namefmt XXX   Format of contig FASTA IDs in 'printf' style (default: 'contig%05d')
  --keepfiles     Keep intermediate files (default: OFF)
RESOURCES
  --tmpdir XXX    Fast temporary directory (default: '/tmp/tseemann')
  --cpus N        Number of CPUs to use (0=ALL) (default: 8)
  --ram n.nn      Try to keep RAM usage below this many GB (default: 16)
ASSEMBLER
  --assembler XXX Assembler: skesa velvet megahit spades (default: 'spades')
  --opts XXX      Extra assembler options in quotes eg. spades: "--untrusted-contigs locus.fna" ... (default: '')
  --kmers XXX     K-mers to use <blank=AUTO> (default: '')
MODULES
  --trim          Enable adaptor trimming (default: OFF)
  --noreadcorr    Disable read error correction (default: OFF)
  --nostitch      Disable read stitching (default: OFF)
  --nocorr        Disable post-assembly correction (default: OFF)

--depth

Giving an assembler too much data is a bad thing. There comes a point where you are no longer adding new information (as the genome is a fixed size), and only adding more noise (sequencing errors). Most assemblers seem to be happy with ~150x depth, so Shovill will downsample your FASTQ files to this depth. It estimates depth by dividing read yield by genome size.

--gsize

The genome size is needed to estimate depth and for the read error correction stage. If you don't provide --gsize, it will be estimated via k-mer frequencies using mash. It doesn't need to be a perfect estimate, just in the right ballpark.

--keepfiles

This will keep all the intermediate files in --outdir so you can explore and debug.

--cpus

By default it will attempt to use all available CPU cores.

--ram

Shovill will do its best to keep memory usage below this value, but it is not guaranteed. If you are on a HPC cluster, you should make sure you tell your job submission engine a value higher than this.

--assembler

By default it will use SPAdes, but you can also choose Megahit or SKESA. These are much faster than SPAdes, but give lesser assemblies. If you use SKESA you can probably use --noreadcorr and --nocoor because it has some of that functionality inbuilt and is conservative.

--opts

If you want to provide some assembler-specific parameters you can use the --opts parameter. Make sure you quote the parameters so they get passed as a single string eg. For --assembler spades you might use --opts "--sc --untrusted-contigs similar_genome.fasta" or --opts '--sc'.

--kmers

A series of kmers are chosen based on the read length distribution. You can override this with this option.

Choosing which stages to use

Stage Enable Disable
Genome size estimation default --gsize XX
Read subsampling --depth N --depth 0
Read trimming --trim default
Read error correction default --noreadcorr
Read stitching/overlap default --nostitch
Contig correction default --nocorr

Environment variables recognised

These env-vars will be used as defaults instead of the built-in defaults. You can use the normal command line option to override them still.

Variable Option Default
$SHOVILL_CPUS --cpus 8
$SHOVILL_RAM --ram 16
$SHOVILL_ASSEMBLER --assembler spades
$TMPDIR --tmpdir /tmp

FAQ

  • Does shovill accept single-end reads?

    No, but it might one day.

  • Do you support long reads from Pacbio or Nanopore?

    No, this is strictly for Illumina paired-end reads only. Try use Flye. CANU, or Redbean.

  • Why does Shovill crash?

    Shovill has a lot of dependencies. If any dependencies are not installed correctly it will die. Spades also doesn't handle --cpus > 16 very well - try giving more RAM.

  • Can I assemble metagenomes with Shovill?

    No. Please use dedicated tools like Minia 3.x or Megahit. Shovill uses the estimated genome size for many dynamic settings related to read error correction, read subsampling etc.

Feedback

Please file questions, bugs or ideas to the Issue Tracker

License

GPLv3

Citation

Not published yet.

Author

Contributors

  • Jason Kwong
  • Simon Gladman
  • Anders Goncalves da Silva

More Repositories

1

prokka

⚡ ♒ Rapid prokaryotic genome annotation
Perl
808
star
2

snippy

✂️ ⚡ Rapid haploid variant calling and core genome alignment
Perl
471
star
3

abricate

🔎 💊 Mass screening of contigs for antimicrobial and virulence genes
Perl
359
star
4

barrnap

🔬 ♌ Bacterial ribosomal RNA predictor
Perl
200
star
5

mlst

🆔 Scan contig files against PubMLST typing schemes
Shell
191
star
6

nullarbor

💾 📃 "Reads to report" for public health and clinical microbiology
Perl
134
star
7

snp-dists

Pairwise SNP distance matrix from a FASTA sequence alignment
C
126
star
8

any2fasta

Convert various sequence formats to FASTA
Perl
115
star
9

VelvetOptimiser

📈 Automatically optimise three of Velvet's assembly parameters.
Perl
47
star
10

samclip

Filter SAM file for soft and hard clipped alignments
Perl
44
star
11

phastaf

Identify phage regions in bacterial genomes for masking purposes
Perl
29
star
12

seeka

Get microbial sequence data easier and faster
Perl
28
star
13

homebrew-bioinformatics-linux

🍺 🐧 Homebrew formulae for bioinformatics software only available for Linux
Ruby
27
star
14

berokka

🍊 💫 Trim, circularise and orient long read bacterial genome assemblies
Perl
25
star
15

ekidna

Assembly based core genome SNP alignments for bacteria
Perl
25
star
16

sixess

🔬🐛 Rapid 16s rRNA identification from isolate FASTQ files
Shell
23
star
17

cgmlst-dists

🐻⇔🐨 Calculate distance matrix from ChewBBACA cgMLST allele call tables
C
23
star
18

PEAR

Pair-End AssembeR
C
22
star
19

mokka

Annotate your metagenome assemblies
11
star
20

scapper

Whole genome core alignments from multiple draft genomes
Perl
10
star
21

kounta

🧮 🔢 Generate multi-sample k-mer count matrix from WGS
Perl
9
star
22

trencha

Normalize VCF depth for Illumina GC bias
Perl
7
star
23

legsta

🍗⭐ In silico Legionella pneumophila Sequence Based Typing
Perl
7
star
24

snasm

Assembly based core SNP alignments
Perl
7
star
25

tseemann.github.io

Torsten Seemann's Home Page
HTML
7
star
26

noary

🍣 🦐 A lightweight nucleotide bacterial ortholog clustering tool
Perl
7
star
27

wombac

‼️ Rapid core genome SNP alignments from multiple bacterial genomes
Perl
7
star
28

klosham

Find closest aligned sequences to a query sequnece
C
6
star
29

kopynumba

Identify copy number variation in bacterial Illumina sequences
6
star
30

fasterqc

A non-Java alternative to the classic FastQC tool
Perl
5
star
31

ragnarokka

Annotate and correct erro-prone ONT genomes
5
star
32

spekki

Species prediction from NGS reads
Python
5
star
33

polisha

Fix small assembly errors using Illumina reads
Perl
5
star
34

polyfix

🔪⛓️ Repair nanopore assemblies using related genome(s)
Perl
5
star
35

skrofula

Yet another M.tuberculosis typing and resistance tool, but for the impatient (not in-patient)
Perl
5
star
36

varion

5
star
37

injecta

Insert genes into genomes to aid synthetic test data generation
Perl
4
star
38

kurra

Fast whole genome phylogeny
4
star
39

heterik

Estimate heterozygosity or mixture level of a bacterial WGS sample
4
star
40

dehomopolymerate

Collapse sequence homopolymers to a single character
C
4
star
41

babykraken

👶🦑 Very small Kraken2 database for bundling with pipelines
4
star
42

bowkaster

cgMLST from FASTQ reads
4
star
43

perl-biotool

🐫 🐪 Small pure Perl5 libraries for writing command line bioinformatics tools
Perl
3
star
44

anthrakks

Distinguish Bacillus cereus and biovar anthracis (anthrax)
3
star
45

bioinfo-scripts

Collection of bioinformatics utility scripts, mostly written in Bioperl
Perl
3
star
46

gbk2bcfgff

Convert Genbank to GFF compatible with "bcftools csq"
2
star
47

easy-web-blast

2
star
48

mini-outbreak

Small WGS dataset for testing bacterial outbreak analysis pipelines
2
star
49

snippa

Experimental modular bacterial SNP calling pipeline
Perl
2
star
50

vikka

Viral genomics toolkit for pandemics
1
star
51

gard

🍆 💊 Gonococcal Antimicrobial Resistance Detection
1
star
52

wtfq

Duplicate FASTQ reads to address undersequenced regions
C
1
star
53

simuvar

Simulate variants of bacterial genomes for testing SNP callers
1
star
54

coginator

Assign COGs to protein sequences
1
star
55

skrilla

It ain't all about skrilla
1
star
56

arborkart

Phylogenomic trees with maps for the web
1
star
57

assembill

Simple script to clip, assemble, tile and annotate a bacterial genome from Illumina reads
Shell
1
star
58

kroucha

Mock repository for Sanger publications citing Croucher et al
1
star