-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.prepare.sh
executable file
·39 lines (26 loc) · 1.1 KB
/
1.prepare.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Perform contig separation and read filtering
# Configuration
source config.ini
# ******************
# Command line
BATCH="$1"
CMD="$2"
# ******************
BAMLIST=bamlist.${BATCH}
if [[ "$CMD" == "preprocess" ]] ; then
mkdir -p ${FB_SCRATCHDIR}
LSF_OUTDIR=${MYSTORAGE}/LSF_logs/${STUDY}/preprocess
mkdir -p ${LSF_OUTDIR}
LSF_STDOUT=${LSF_OUTDIR}/preprocess.${BATCH}.stdout
LSF_STDERR=${LSF_OUTDIR}/preprocess.${BATCH}.stderr
bsub -n ${NCPU_PREPROC} -J preproc.${BATCH} -g /${USER}/${LABNAME} -q ${QNAME} -R 'rusage[mem=32GB] span[hosts=1]' -a "docker(${IMAGE})" -o ${LSF_STDOUT} -e ${LSF_STDERR} "python ${INSTALL_PATH}/src/Monopogen.py preProcess -b ${BAMLIST} -o ${FB_SCRATCHDIR}/out.${BATCH} -a ${INSTALL_PATH}/apps -t ${NCPU_PREPROC}"
echo stuff -a "docker(${IMAGE})"
elif [[ "$CMD" == "move" ]] ; then
mkdir -p ${FB_STORAGEDIR}
rsync -rlHtpgP --exclude '*.bam.lst' ${FB_SCRATCHDIR}/out.${BATCH} ${FB_STORAGEDIR}
elif [[ "$CMD" == "tidy" ]] ; then
rm -rf ${FB_SCRATCHDIR}/out.${BATCH}
else
echo Command ${CMD} is unrecognized. Exiting...
fi