#!/bin/bash

#$ -cwd
#$ -o Output/batch-$TASK_ID.stdout
#$ -e Output/batch-$TASK_ID.stderr
#$ -S /bin/bash
cd $TMPDIR

cp /u/home/d/desmond/RH_human_gseq.txt RH_human_gseq.txt
cp /u/home/d/desmond/cell_label_info.txt cell_label_info.txt
cp /u/home/d/desmond/RH_pool_human_total_align.txt RH_pool_human_total_align.txt
cp -r /u/home/d/desmond/R R

. /etc/profile
module load R/3.5.0
echo Starting batch $SGE_TASK_ID


Rscript --vanilla --verbose /u/home/d/desmond/runJobs_shuff_human.R $1 > /u/home/d/desmond/Output/R-gam-$1-batch-${SGE_TASK_ID}.Rout 2>&1    

