31
|
1 #!/bin/bash
|
|
2 #
|
|
3 # Galaxy wrapper for WIG parser
|
|
4 # Written by Eugen Eirich @ Institute of Molecular Biology Mainz
|
|
5 #
|
|
6
|
|
7 set -e
|
|
8
|
|
9
|
|
10 #get parameters
|
|
11
|
|
12 until [ $# -eq 0 ]
|
|
13 do
|
|
14 case $1 in
|
|
15 input=*)
|
|
16 input=${1#input=}
|
|
17 ;;
|
|
18 extract=*)
|
|
19 extract=${1#extract=}
|
|
20 ;;
|
|
21 context=*)
|
|
22 context=${1#context=}
|
|
23 ;;
|
|
24 depth=*)
|
|
25 depth="cutoff=${1#depth=}"
|
|
26 ;;
|
|
27 cov_out=*)
|
|
28 cov_out=${1#cov_out=}
|
|
29 ;;
|
|
30 meth_out=*)
|
|
31 meth_out=${1#meth_out=}
|
|
32 ;;
|
|
33 esac
|
|
34 shift
|
|
35 done
|
|
36
|
|
37 case $extract in
|
|
38 c)
|
|
39 output="-cov_out=$cov_out";;
|
|
40 m)
|
|
41 output="-meth_out=$meth_out";;
|
|
42 b)
|
|
43 output="-meth_out=$meth_out -cov_out=$cov_out";;
|
|
44 esac
|
|
45
|
|
46 if [ "$context" != "" ]
|
|
47 then
|
|
48 context="-context=$context"
|
|
49 fi
|
|
50
|
|
51 cd "$(dirname ${BASH_SOURCE[0]})"
|
|
52 perl wig_extractor.pl -e $extract $context $output $input 2>&1>/dev/null
|