#!/bin/bash
display_help() {
    echo "seq-seq-pan - Consensus Genome Construction from WGA"
    echo ""
    echo "Usage: seq-seq-pan-consensus INPUT.xmfa"
    echo
    exit 0
}

if [ "$1" == "" -o "$1" == "-h" -o "$1" == "--help" ]; then
  display_help
  exit 0
fi

file=$1
name=${file%.xmfa}

java -jar "/opt/anaconda1anaconda2anaconda3/opt/seq-seq-pan/java/XMFAConsensus/XMFAconsensus_majorityvote.jar" --xmfa ${file} --outfasta ${name}_consensus.fasta --outidx ${name}_consensus.fasta.idx --outblocksepfasta ${name}_consensus.fasta.blockseparated.fasta --outblocksepidx ${name}_consensus.fasta.blockseparated.idx
