11
|
1 #!/bin/bash
|
|
2 #
|
|
3 # Galaxy wrapper for Bismark Methylation Caller
|
|
4 #
|
|
5
|
|
6 set -e
|
|
7
|
|
8 #get parameters
|
|
9
|
|
10 until [ $# -eq 0 ]
|
|
11 do
|
|
12 case $1 in
|
|
13 input=*)
|
|
14 input=${1#input=}
|
|
15 ;;
|
|
16 method=*)
|
|
17 method=${1#method=}
|
|
18 ;;
|
|
19 output=*)
|
|
20 output=${1#output=}
|
|
21 ;;
|
|
22 tempdir=*)
|
|
23 tempdir=${1#tempdir=}
|
|
24 ;;
|
|
25 esac
|
|
26 shift
|
|
27 done
|
|
28 (grep ^@ $input; grep -v ^@ $input | sort -k3,3 -k1,1) > $tempdir"bismark_sam_sorted.sam"
|
|
29 methylation_extractor -$method -o $output $tempdir"bismark_sam_sorted.sam" 2>&1 > /dev/null
|
|
30
|
|
31
|
|
32
|
|
33
|
|
34
|
|
35
|