#!/bin/bash
#SBATCH -p queue_name
#SBATCH -J assem-brakerProtein
#SBATCH -N 1
#SBATCH -n 24
#SBATCH -t 120:00:00

module load python/3 
module load gcc/7.2.0

# Export path variables
export PERL5LIB=/path/to/lib64/perl5:/path/to/share/perl5:/path/to/perl5/lib/perl5:$PERL5LIB
export CDBTOOLS_PATH=/path/to/opt/cdbfasta
export AUGUSTUS_BIN_PATH=/path/to/opt/augustus-3.4.0/bin
export AUGUSTUS_SCRIPTS_PATH=/path/to/opt/augustus-3.4.0/scripts
export AUGUSTUS_CONFIG_PATH=/path/to/augustus-3.4.0/config
export PYTHON3_PATH=/usr/local/python/3.7.0/bin
export PYTHONPATH=/path/to/mypython3:${PYTHONPATH}
export BLAST_PATH=/path/to/opt/blast/bin
export SAMTOOLS_PATH=/path/to/bin
export BAMTOOLS_PATH=/path/to/opt/bamtools-2.5.1/bin
export GENEMARK_PATH=/path/to/opt/genemark_4.68
export PROTHINT_PATH=/path/to/opt/ProtHint-2.6.0/bin
export DIAMOND_PATH=/path/to/bin

# Reference protein seqs
prot=/path/to/OrthoDB
# Braker executables
braker=/path/to/opt/braker-2.1.6/scripts
# Masked genome
genome=/path/to/masked/assembly.fasta
# Output dir
dir=/path/to/braker/protein/output/directory

${braker}/braker.pl \
    --specie=spp-protein \
    --cores 24 \
    --genome=$genome \
    --prot_seq=${prot}/odb.dre.dm \
    --epmode \
    --softmasking \
    --workingdir=${dir} \
    --BLAST_PATH=/path/to/opt/blast/bin
