printf "\nV1: This file prints out the time spamps during proessing and calculates processing time\nfor all samples and overall processing time of the full batch\n" >> ${CALCTIME}
printf "\n*****************************\nRun from $(date '+%d/%m/%Y_%H:%M:%S')\n*****************************\n" >> ${CALCTIME}
printf "\nStarting time job: $STARTTIME_FULL" >> ${CALCTIME}
# Block for writing out sample processing time to txt file
ENDTIME_SAMPLE=$(date +%s)
printf "\nEnd time sample ${folder[$name]}: $ENDTIME_SAMPLE" >> ${CALCTIME}
printf "\nTotal processing time for sample ${folder[$name]}: $((ENDTIME_SAMPLE - STARTTIME_SAMPLE)) seconds\n--------------------------" >> ${CALCTIME}
done
# Block for writing total processing time to file
ENDTIME_FULL=$(date +%s)
printf "\n\nThe time for analyis of this job was $((ENDTIME_FULL - STARTTIME_FULL)) seconds\n*****************************\n*****************************" >> ${CALCTIME}