#!/usr/bin/env bash

# Obtained the raw `fastq.gz` files from https://www.mothur.org/MiSeqDevelopmentData.html
# * Downloaded https://www.mothur.org/MiSeqDevelopmentData/StabilityWMetaG.tar
# * Ran the following from the project's root directory

wget --no-check-certificate https://www.mothur.org/MiSeqDevelopmentData/StabilityWMetaG.tar
tar xvf StabilityWMetaG.tar -C data/raw/
rm StabilityWMetaG.tar



# Obtained the silva reference alignment from the mothur website:

wget http://mothur.org/w/images/1/15/Silva.seed_v123.tgz
tar xvzf Silva.seed_v123.tgz silva.seed_v123.align silva.seed_v123.tax
code/mothur/mothur "#get.lineage(fasta=silva.seed_v123.align, taxonomy=silva.seed_v123.tax, taxon=Bacteria);degap.seqs(fasta=silva.seed_v123.pick.align, processors=8)"
mv silva.seed_v123.pick.align data/references/silva.seed.align
rm Silva.seed_v123.tgz silva.seed_v123.*
rm mothur.*.logfile


# Obtained the RDP reference taxonomy from the mothur website:

wget -N http://www.mothur.org/w/images/8/88/Trainset14_032015.pds.tgz
tar xvzf Trainset14_032015.pds.tgz
mv trainset14_032015.pds/trainset* data/references/
rm -rf trainset14_032015.pds
rm Trainset14_032015.pds.tgz


Add code to obtain raw and reference data
Add code to obtain raw and reference data
