-
Notifications
You must be signed in to change notification settings - Fork 12
/
0.chia_pipe_shell_dev.sh
74 lines (57 loc) · 1.72 KB
/
0.chia_pipe_shell_dev.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
# ChIA-PIPE
# Starting point for launching ChIA-PIPE
# 2018
# The Jackson Laboratory for Genomic Medicine
## The help message:
function usage
{
echo -e "usage: bash 0.chia_pipe_shell.sh -c CONF
"
}
## 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
source ${conf}
## Add dependency dir to path
#workdir=$( pwd)
#dep_dir=$( cd ${dep_dir} && pwd )
#export PATH=${dep_dir}:${PATH}
#cd ${workdir}
# Set the output directory for writing files
out_dir="${run}"
mkdir -p ${out_dir}
cd ${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)
n_thread=1
mem=8
## 1. Linker filtering
bash shell_scripts/1.filter_linker.sh --conf ${conf}
## 2a. Map "No linker" reads
bash shell_scripts/2.map.sh --conf ${conf} --tag_name none
## 2b. Map "Linker, one tag" reads
bash shell_scripts/2.map.sh --conf ${conf} --tag_name singlelinker.single
## 2c. Map "Linker, two tag" reads
bash shell_scripts/2.map.sh --conf ${conf} --tag_name singlelinker.paired
## 3. Peak calling
bash shell_scripts/3.call_peaks.sh --conf ${conf}
## 4. QC table generation
bash shell_scripts/4.extract_summary_stats.sh --conf ${conf}
## 5. Allele-specific analysis
bash shell_scripts/5.phase_loops.sh --conf ${conf}