#!/bin/bash

#SBATCH --job-name=dDocentRun_v294_RegioDiv_01_37G_20cpu
#SBATCH --mail-user=walter.durka@ufz.de
#SBATCH --mail-type=BEGIN,END,FAIL,TIME_LIMIT

#SBATCH --time=72:00:00
#SBATCH --mem-per-cpu=37G
#SBATCH --cpus-per-task=20

# output files
#SBATCH --output=/work/durka/%x-%j.out
#SBATCH --error=/work/durka/%x-%j.err


# versuch die aktuelle Version wieder direkt zu starten
#########################################################################################################
# Paths and filenames for this analysis
# 
dDOCENT_DIR=/data/Popgen/programs/ddocent-2.9.4/bin
dDOCENT_DIR2=/home/durka/dDocent

# WORK_DIR: here + /$1  are the correctly named outputfiles of process_radtags
BASE_DIR=/work/durka/dDocent/RegioDiv
WORK_DIR=$BASE_DIR/$1

#########################################################################################################

module load Anaconda3
source $(dirname $(which conda))/../etc/profile.d/conda.sh 
#conda activate /data/Popgen/programs/stacks-2.53
conda activate /data/Popgen/programs/ddocent-2.9.4

cd $dDOCENT_DIR
cp dDocent_2x $WORK_DIR

cd $dDOCENT_DIR2
cp Configuration_01 $WORK_DIR

cd $WORK_DIR
./dDocent_2x Configuration_01

conda deactivate

