-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_macs2.sh
41 lines (38 loc) · 1.18 KB
/
run_macs2.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
#!/usr/bin/bash
source /shares/tmockler_share/clizarraga/usr/virtualenvs/MACS2/bin/activate
# A POSIX Variable. Reset in case getopts has been used in shell.
OPTIND=1
while getopts "h?t:c:n:o:mf:" opt; do
case "$opt" in
h|\?)
macs2 callpeak -h
echo "This script needs only: -t -c -n -o (--outdir) -m (--nomodel) -f (--extsize)"
exit 0
;;
t)
treatment_file=$OPTARG
echo "Treatment file is $treatment_file"
;;
c)
control_file=$OPTARG
echo "Control file is $control_file"
;;
n)
prefix_name=$OPTARG
echo "Prefix for filenames is $prefix_name"
;;
o)
outdir=$OPTARG
echo "Output directory is $outdir"
;;
m)
nomodel="--nomodel"
echo "No model selected."
;;
f)
frag=$OPTARG
echo "Fragment size is $frag"
esac
done
# Broad model calling
macs2 callpeak -t $treatment_file -c $control_file -g 2.584e8 -B --broad --broad-cutoff 0.05 -n $prefix_name --outdir $outdir -f BAM $nomodel --extsize $frag