#!/bin/bash

if [ "$1" == "clean" ]
then
    echo "Cleaning the folder."
    # rm -rf BLAT_*.txt
    # rm -rf BLAT_*.png
    # rm -rf BLAT.pdb
    # rm -rf BLAT.fasta
    rm -rf BLAT*
    rm -f default.conf caracTest.dat

elif [ "$1" == "jetoff" ]
then
    # If you have your own JET2 score file, you can turn off JET2 as follows:
    # In ../tests folder, you can find a sample JET2 file called BLAT_jet.res 
    echo "Running GEMME with a user-provided alignment file."
    echo "Using a previously produced prot_jet.res file to check reproducibility!"
    cp ../tests/BLAT_jet.res .
    python $GEMME_PATH/gemme.py aliBLAT.fasta -r input -f aliBLAT.fasta --jetfile BLAT_jet.res

elif [ "$1" == "withpdb" ]
then

    #Please note that CV isa structural feature and it can not be calculated if you don't specify a pdb file.
    echo "Using blat-curated.pdb for the structural feature calculations!"
    python $GEMME_PATH/gemme.py aliBLAT.fasta -r input -f aliBLAT.fasta --pdbfile blat-curated.pdb --normweightmode max-trace-pc-cv
    
else
    echo "Running GEMME with a user-provided alignment file."
    python $GEMME_PATH/gemme.py aliBLAT.fasta -r input -f aliBLAT.fasta
    
fi


