#!/bin/bash -e

pkg=clonalframeml

if [ "$AUTOPKGTEST_TMP" = "" ]; then

	AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXX`
	trap "rm -rf $AUTOPKG_TMP" 0 INT QUIT ABRT PIPE TERM

fi

cd "$AUTOPKGTEST_TMP"/

# Download data
wget -O clmf.tgz https://figshare.com/ndownloader/files/34861005

# Unzip data
tar -xzvf clmf.tgz

cd ClonalFrameML

# Run the standard ClonalFrameML analysis as follows. Note! This is a real-world example, and requires around 12 hours of run time.
ClonalFrameML Saureus.phyML.newick Saureus.fasta example.output -kappa 4.967695 -emsim 100 -ignore_user_sites Saureus.non-core-sites.txt > example.log