#!/bin/bash

	file="$1"
# tasks for refinement targets e.g. TR644 and assitance guided ones Tc644 are uploaded as for regular files
./upload_task_for_target.sh "$2" "$file" "$3" "$4" > /tmp/log.log

substring=${file:0:1}
if [ $substring == "R" -a $2 == "lga_sda" ]
then 
	./upload_task_for_target.sh "lga_sda_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "DaliLite" ]
then
        ./upload_task_for_target.sh "DaliLite_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "mammoth" ]
then
        ./upload_task_for_target.sh "mammoth_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "lddt" ]
then
        ./upload_task_for_target.sh "lddt_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "cad_score" ]
then
        ./upload_task_for_target.sh "cad_score_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "LVR" ]
then
        ./upload_task_for_target.sh "LVR_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "sg_py" ]
then
        ./upload_task_for_target.sh "sg_py_tr" "$file" "$3" "$4" > /tmp/log.log
fi


if [ $substring == "R" -a $2 == "qcs" ]
then
        ./upload_task_for_target.sh "qcs_tr" "$file" "$3" "$4" > /tmp/log.log
fi


if [ $substring == "R" -a $2 == "ce" ]
then
        ./upload_task_for_target.sh "ce_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "sov" ]
then
        ./upload_task_for_target.sh "sov_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "TMscore" ]
then
        ./upload_task_for_target.sh "TMscore_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "TMalign" ]
then
        ./upload_task_for_target.sh "TMalign_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "molprb" ]
then
        ./upload_task_for_target.sh "molprb_tr" "$file" "$3" "$4" > /tmp/log.log
fi

if [ $substring == "R" -a $2 == "rpf" ]
then
        ./upload_task_for_target.sh "rpf_tr" "$file" "$3" "$4" > /tmp/log.log
fi
