snippy 4.6.0

Snippy

Rapid haploid variant calling and core genome alignment

Author

Torsten Seemann

Synopsis

Snippy finds SNPs between a haploid reference genome and your NGS sequence reads. It will find both substitutions (snps) and insertions/deletions (indels). It will use as many CPUs as you can give it on a single computer (tested to 64 cores). It is designed with speed in mind, and produces a consistent set of output files in a single folder. It can then take a set of Snippy results using the same reference and generate a core SNP alignment (and ultimately a phylogenomic tree).

NOTE

Since snippy 4.6.0 we had to update to a conda environment to facilitate use of the new perl requirement.

Therefore, you’ll have to update your pipelines with the lines below, rather than using the snippy from /local/cluster/bin.

To activate:

1
2
bash
source /local/cluster/snippy/activate.sh

Location and version:

1
2
3
4
$ which snippy
/local/cluster/snippy-4.6.0/bin/snippy
$ snippy --version
snippy 4.6.0

Version checks:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$ snippy --check
[15:38:08] This is snippy 4.6.0
[15:38:08] Written by Torsten Seemann
[15:38:08] Obtained from https://github.com/tseemann/snippy
[15:38:08] Detected operating system: linux
[15:38:08] Enabling bundled linux tools.
[15:38:08] Found bwa - /local/cluster/snippy-4.6.0/bin/bwa
[15:38:08] Found bcftools - /local/cluster/snippy-4.6.0/bin/bcftools
[15:38:08] Found samtools - /local/cluster/snippy-4.6.0/bin/samtools
[15:38:08] Found java - /local/cluster/snippy-4.6.0/bin/java
[15:38:08] Found snpEff - /local/cluster/snippy-4.6.0/bin/snpEff
[15:38:08] Found samclip - /local/cluster/snippy-4.6.0/bin/samclip
[15:38:08] Found seqtk - /local/cluster/snippy-4.6.0/bin/seqtk
[15:38:08] Found parallel - /local/cluster/snippy-4.6.0/bin/parallel
[15:38:08] Found freebayes - /local/cluster/snippy-4.6.0/bin/freebayes
[15:38:08] Found freebayes-parallel - /local/cluster/snippy-4.6.0/bin/freebayes-parallel
[15:38:08] Found fasta_generate_regions.py - /local/cluster/snippy-4.6.0/bin/fasta_generate_regions.py
[15:38:08] Found vcfstreamsort - /local/cluster/snippy-4.6.0/bin/vcfstreamsort
[15:38:08] Found vcfuniq - /local/cluster/snippy-4.6.0/bin/vcfuniq
[15:38:08] Found vcffirstheader - /local/cluster/snippy-4.6.0/bin/vcffirstheader
[15:38:08] Found gzip - /bin/gzip
[15:38:08] Found vt - /local/cluster/snippy-4.6.0/bin/vt
[15:38:08] Found snippy-vcf_to_tab - /local/cluster/snippy-4.6.0/bin/snippy-vcf_to_tab
[15:38:08] Found snippy-vcf_report - /local/cluster/snippy-4.6.0/bin/snippy-vcf_report
[15:38:08] Checking version: samtools --version is >= 1.7 - ok, have 1.14
[15:38:08] Checking version: bcftools --version is >= 1.7 - ok, have 1.14
[15:38:09] Checking version: freebayes --version is >= 1.1 - ok, have 1.3.2
[15:38:09] Checking version: snpEff -version is >= 4.3 - ok, have 5.0
[15:38:09] Checking version: bwa is >= 0.7.12 - ok, have 0.7.17
[15:38:09] Dependences look good!

help message:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
$ snippy --help
SYNOPSIS
  snippy 4.6.0 - fast bacterial variant calling from NGS reads
USAGE
  snippy [options] --outdir <dir> --ref <ref> --R1 <R1.fq.gz> --R2 <R2.fq.gz>
  snippy [options] --outdir <dir> --ref <ref> --ctgs <contigs.fa>
  snippy [options] --outdir <dir> --ref <ref> --bam <reads.bam>
GENERAL
  --help           This help
  --version        Print version and exit
  --citation       Print citation for referencing snippy
  --check          Check dependences are installed then exit (default OFF)
  --force          Force overwrite of existing output folder (default OFF)
  --quiet          No screen output (default OFF)
RESOURCES
  --cpus N         Maximum number of CPU cores to use (default '8')
  --ram N          Try and keep RAM under this many GB (default '8')
  --tmpdir F       Fast temporary storage eg. local SSD (default '/data')
INPUT
  --reference F    Reference genome. Supports FASTA, GenBank, EMBL (not GFF) (default '')
  --R1 F           Reads, paired-end R1 (left) (default '')
  --R2 F           Reads, paired-end R2 (right) (default '')
  --se F           Single-end reads (default '')
  --ctgs F         Don't have reads use these contigs (default '')
  --peil F         Reads, paired-end R1/R2 interleaved (default '')
  --bam F          Use this BAM file instead of aligning reads (default '')
  --targets F      Only call SNPs from this BED file (default '')
  --subsample n.n  Subsample FASTQ to this proportion (default '1')
OUTPUT
  --outdir F       Output folder (default '')
  --prefix F       Prefix for output files (default 'snps')
  --report         Produce report with visual alignment per variant (default OFF)
  --cleanup        Remove most files not needed for snippy-core (inc. BAMs!) (default OFF)
  --rgid F         Use this @RG ID: in the BAM header (default '')
  --unmapped       Keep unmapped reads in BAM and write FASTQ (default OFF)
PARAMETERS
  --mapqual N      Minimum read mapping quality to consider (default '60')
  --basequal N     Minimum base quality to consider (default '13')
  --mincov N       Minimum site depth to for calling alleles (default '10')
  --minfrac n.n    Minumum proportion for variant evidence (0=AUTO) (default '0')
  --minqual n.n    Minumum QUALITY in VCF column 6 (default '100')
  --maxsoft N      Maximum soft clipping to allow (default '10')
  --bwaopt F       Extra BWA MEM options, eg. -x pacbio (default '')
  --fbopt F        Extra Freebayes options, eg. --theta 1E-6 --read-snp-limit 2 (default '')
SOURCE
  https://github.com/tseemann/snippy - Torsten Seemann

software ref: https://github.com/tseemann/snippy
research ref: <>