-
Notifications
You must be signed in to change notification settings - Fork 0
/
step9-summaryInfo.sh
57 lines (46 loc) · 1.31 KB
/
step9-summaryInfo.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
## Usage
# sh step9-summaryInfo.sh snyder run3-v1.0.10
# sh step9-summaryInfo.sh hippo run3-v1.0.10
# Define variables
EXPERIMENT=$1
PREFIX=$2
SHORT="summInfo-${EXPERIMENT}"
# Directories
ROOTDIR=/dcl01/lieber/ajaffe/derRuns/derCountSupp
MAINDIR=${ROOTDIR}/${EXPERIMENT}
# Construct shell files
sname="${SHORT}.${PREFIX}"
echo "Creating script ${sname}"
if [[ "${EXPERIMENT}" == "snyder" ]]
then
EXAMPLES='c("coverage dips" = 1, "alternative splicing" = 7, "and less pronounced coverage dips" = 13)'
elif [[ "${EXPERIMENT}" == "hippo" ]]
then
EXAMPLES='c("a coverage dip" = 3, "the complex relationship with annotation" = 4, "and a potentially extended UTR" = 8)'
else
echo "Specify a valid experiment: snyder or hippo"
fi
WDIR=${MAINDIR}/summaryInfo/${PREFIX}
cat > ${ROOTDIR}/.${sname}.sh <<EOF
#!/bin/bash
#$ -cwd
#$ -m e
#$ -l mem_free=50G,h_vmem=200G,h_fsize=10G
#$ -N ${sname}
#$ -hold_jid derM-${EXPERIMENT}.${PREFIX}
echo "**** Job starts ****"
date
# Make logs directory
mkdir -p ${WDIR}/logs
# Compare DERs vs regionMatrix
cd ${WDIR}
module load R/3.2.x
Rscript ${ROOTDIR}/step9-summaryInfo.R -s '${EXPERIMENT}' -r '${PREFIX}' -p '${EXAMPLES}' -v TRUE
# Move log files into the logs directory
mv ${ROOTDIR}/${sname}.* ${WDIR}/logs/
echo "**** Job ends ****"
date
EOF
call="qsub .${sname}.sh"
echo $call
$call