#!/bin/bash

display_help() {
    echo "seq-seq-pan - Pan-genome Construction (powered by Snakemake)"
    echo ""
	echo "Usage: seq-seq-pan-wga --config genomefile=genome_list.txt outfilename=TB_example [pangenome=TB_example.xmfa] [Snakemake options]"
	echo
    echo " Useful Snakemake parameters:"
	echo "   -n, --dryrun           do not execute anything"
	echo "   -p, --printshellcmds   print out the shell commands that will be executed"
	echo "   -t, --timestamp        add a timestamp to all logging output"
    echo
	echo " Full list of parameters:"
    echo "   --help                 show Snakemake help (or snakemake -h)"
	echo
    exit 0
}

if [ "$1" == "" -o "$1" == "-h" -o \( "$1" != "--config" -a "$1" != "--help" \) ]; then
  display_help
  exit 0
fi

snakemake -s "/opt/anaconda1anaconda2anaconda3/opt/seq-seq-pan/run_seqseqpan.Snakemake" "$@"
