So in summary umap uses job arrays.
In SGE, job arrays are in this format
qsub -q <queuename> -t <startid>-<endid> -hold_jid <jobid to wait before running> -e <path to error> -o <path to log> -b y <path to executable .sh file>
This will run the script after -b y N times, each time specifying SGE_TASK_ID to a number between <startid>-<endid>
In slurm, the name of this variable is SLURM_ARRAY_TASK_ID
So you can run ubismap.py and specify -var_id SLURM_ARRAY_TASK_ID as one of the parameters
Since it doesn't support SGE, it will still generate a .sh file with qsub commands.
You can replace the qsub commands to sbatch as:
sbatch -p <partition name> --array=<startid>-<endid> --dependency=afterany:<jobid to wait for before running> -e <path to error> -o <path to log> <path to executable .sh file>
One example:
In SGE you can do:
qsub -q hoffmangroup -N $JOBNAME -e Logs/$JOBNAME.ERR -t 1-30 -o Logs/$JOBNAME.LOG -cwd -b y python uint8_to_bed_parallel.py $INDIR $OUTDIR C2T-Converted -chrsize_path $MAINDIR/$GENOME/chrsize.tsv -C2T -WriteUnique -kmers 24 36 50 100
In Slurm:
1. You create .sh file with the command
echo -e '#!/bin/sh' > myScript.sh
echo "python uint8_to_bed_parallel.py $INDIR $OUTDIR C2T-Converted -chrsize_path $MAINDIR/$GENOME/chrsize.tsv -C2T -WriteUnique -kmers 24 36 50 100 -varid SLURM_ARRAY_TASK_ID" >> myScript.sh
sbatch -c 1 -p hoffmangroup --mem=8G -t 12:00:00 --array=1-30 -e Logs/$JOBNAME.ERR -o Logs/$JOBNAME.LOG myScript.sh
Hope this helps!
M