Submit Jobs on HPC
Step 1: install software and set environment
vi .bashrc
export PATH="/ifs/scratch/biosoft/samtools-1.11/bin:$PATH"
export PATH="/ifs/scratch/STAR-2.7.6a/bin/Linux_x86_64_static/:$PATH"
export PATH="/ifs/scratch/"
export PATH="/ifs/scratch/subread-2.0.1-source/bin:$PATH"
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
export HOME=/ifs/home/
export ANT_OPTS="-Xmx256M"
export PATH="/nfs/apps/matlab/2017a/bin:$PAT
source .bashrc
Step 2: submit a job
cd $Dir/work/
command="$myjob.R"
echo $command|qsub -l mem=8G,time=48:: -cwd -j yes -o job.out -N myjob
More example run multiple jobs
rscript="Rscript --vanilla --verbose"
mDir="/ifs/scratch/"
dDir="/ifs/scratch/"
#####
cd $mDir
for dir in $(ls -d $mDir/*/AA*); do
echo $dir
command="$rscript JOB.R --workDir=$dir --jobName=${dir##*/} --expFile=$(ls $dir/*.DAT.txt) --annoFile=/ifs/scratch/File.txt"
echo $command | qsub -l mem=11G,time=2:: -N ${dir##*/} -j y -cwd -o ${dir##*/}OUT.log
done
~~~
Kill a job
qdel Job-ID
网友评论