#!/bin/sh

# This script can be used to test snippy more extensively against
# the problem reported at
#    https://github.com/pcingola/SnpEff/issues/455

# create tmp dir
TMPDIR=$(mktemp -d /tmp/snippyXXXXX)
cd $TMPDIR
# download public read data
wget -q -N ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR201/004/SRR2014554/SRR2014554_1.fastq.gz
wget -q -N ftp://ftp.sra.ebi.ac.uk/vol1/fastq/SRR201/004/SRR2014554/SRR2014554_2.fastq.gz
# download reference data
wget -q -N https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/005/845/GCF_000005845.2_ASM584v2/GCF_000005845.2_ASM584v2_genomic.gbff.gz
gunzip GCF_000005845.2_ASM584v2_genomic.gbff.gz
mkdir tmp

set -x
snippy --cpus 4 --ram 20 --tmpdir ./tmp --reference GCF_000005845.2_ASM584v2_genomic.gbff --R1 SRR2014554_1.fastq.gz --R2 SRR2014554_2.fastq.gz --outdir results --report --mincov 20
