Skip to content

tejaas_array.slurm

francosimonetti edited this page May 13, 2021 · 1 revision
#!/bin/sh
#SBATCH -p medium  #<--- replace with your partition name
#SBATCH -t 0-6:00:00
#SBATCH -n 8
#SBATCH -N 1
#SBATCH -J _JOB_NAME
#SBATCH -o _JOB_NAME.out
#SBATCH -e _JOB_NAME.err

# Remember to load all the libraries and modules here such as intel compilers and intel MKL and MPI libraries for Tejaas to work

# Here we pass the information about how many SNPs per job and how many SNPs in total. This is how each job inside the job array will know which chunk of SNPs to use
NMAX=_NUM_MAX_
NTOT=_NUM_TOT_
startsnp=$(( NMAX * SLURM_ARRAY_TASK_ID + 1 ))
endsnp=$(( NMAX * (SLURM_ARRAY_TASK_ID + 1) ))
if [ $endsnp -gt $NTOT ]; then
    endsnp=${NTOT}
fi
INCSTRNG="${startsnp}:${endsnp}"

# Other Tejaas parameters
RUN_PATH=_TJS_BINR
GENOFILE=_GT_FILE_
EXPRFILE=_EXPR_FL_
GENEINFO=_GEN_POSF
TJMETHOD=_TJ_METHD
NULLMODL=_NULL_MDL
OUTPRFIX=_OUT_PRFX
SNPTHRES=_SNP_CUT_
GENTHRES=_GEN_CUT_
SBETA=_SIG_BETA
CHROM=_CHRM_NUM
EXPRFILE_CORR=_EXPRCORR_

mpirun -n 8 ${RUN_PATH} --vcf          ${GENOFILE} \
                        --gx           ${EXPRFILE} \
                        --gtf          ${GENEINFO} \
                        --chrom        ${CHROM}    \
                        --method       ${TJMETHOD} \
                        --null         ${NULLMODL} \
                        --outprefix    ${OUTPRFIX} \
                        --psnpthres    ${SNPTHRES} \
                        --pgenethres   ${GENTHRES} \
                        --include-SNPs ${INCSTRNG} \
                        --prior-sigma  ${SBETA} \
                        --gxcorr       ${EXPRFILE_CORR} \
                        --knn 30 \
                        --cismask