Start an interactive job, with a walltime of 2 hours, 2000MB of memory.
srun --pty -p interactive -t 0-02:0:0 --mem 2000MB -n 1 /bin/bash
Make alignment using: STAR through module rcbio/1.1 , bowtie2 through module rcbio/1.1 or bwa through module rcbio/1.1
After alignment finishes, go to that folder, for example star
cd /n/scratch2/$USER/star
Copy the example htseq bash script:
module load gcc/6.2.0 python/2.7.12 rcbio/1.1 cp /n/app/rcbio/1.1/bin/htseq.sh .
Now you can modify the options as needed. For example, if your file are huge, you may need increase mem and runtime -t for sbatch command.
To edit the htseq bash script:
nano htseq.sh
To test the pipeline run the following command. Jobs will not be submitted to the scheduler.
runAsPipeline "htseq.sh -p starOut -i dm3" "sbatch -p short -t 10:0 -n 1" useTmp
To run the pipeline:
runAsPipeline "htseq.sh -p starOut -i dm3" "sbatch -p short -t 10:0 -n 1" useTmp run
To understand how 'runAsPipeline' works, please visit: Run Bash Script As Slurm Pipeline