-
Notifications
You must be signed in to change notification settings - Fork 12
/
0.chia_pipe_hpc.pbs
executable file
·73 lines (58 loc) · 1.6 KB
/
0.chia_pipe_hpc.pbs
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
#PBS -l nodes=1:ppn=1
#PBS -l walltime=1:00:00
#PBS -l mem=2GB
#PBS -l vmem=2GB
#PBS -j oe
# ChIA-PIPE for HPC (qsub)
# Starting point for launching ChIA-PIPE for HPC
# 2018
# The Jackson Laboratory for Genomic Medicine
## The help message:
function usage
{
echo -e "usage: qsub -F \"--conf ${conf}\" 0.chia_pipe_hpc.pbs
"
}
## Parse the command-line argument (i.e., get the name of the config file)
while [ "$1" != "" ]; do
case $1 in
-c | --conf ) shift
conf=$1
;;
-h | --help ) usage
exit
;;
* ) usage
exit 1
esac
shift
done
# Source the config file to get the parameter values
conf="${PBS_O_WORKDIR}/${conf}"
source ${conf}
# Add dependency dir to path
export PATH=${dep_dir}:${PATH}
# Set the output directory for writing files
out_dir="${PBS_O_WORKDIR}/${run}"
mkdir -p ${out_dir}
# Print values
echo ${conf}
echo ${out_dir}
# Set the resource parameters for the computing cluster
# depending on the run type (miseq or hiseq)
if [ ${run_type} == "miseq" ]
then
wall_time=5
elif [ ${run_type} == "hiseq" ] || [ ${run_type} == "nextseq" ]
then
wall_time=10
else
wall_time=20
fi
### 1. Linker filtering
# Submit the job
job_1=$( qsub -F "--conf ${conf} --out_dir ${out_dir}" \
-l nodes=1:ppn=${n_thread},mem=${mem}gb,vmem=${mem}gb,walltime=${wall_time}:00:00 \
-j oe -o ${out_dir}/1.${run}.filter_linker.o \
${bin_dir}/1.filter_linker.pbs )