4
|
1 #!/bin/bash
|
|
2 set -e
|
1
|
3
|
4
|
4 #arguments are -i input sequence file in fasta
|
|
5 # -o output zip arhive
|
|
6 # -t temp directory with results
|
|
7 # -a DNA|RNA
|
|
8 # -c tempreature (C)
|
|
9 # -s [Na+] in M
|
|
10 # -m [Mg++] in M
|
|
11 # -b maxbp
|
1
|
12
|
4
|
13 #-n, --NA=(RNA | DNA) (defaults to RNA)
|
|
14 #-t, --temp=<temperature> (defaults to 37)
|
|
15 #-N, --sodium=<[Na+] in M> (defaults to 1)
|
|
16 #-M, --magnesium=<[Mg++] in M> (defaults to 0)
|
|
17 #-p, --polymer
|
|
18 #-C, --Ct=<total strand concentration>
|
|
19 #-I, --noisolate
|
|
20 #-m, --maxbp=<maximum basepair distance>
|
|
21 #-c, --constraints=<name of constraints file> (defaults to prefix.aux)
|
|
22 #-P, --percent=<energy increment percent> (defaults to 5)
|
|
23 #-W, --window=<window size> (default set by sequence length)
|
|
24 #-X, --max=<maximum number of foldings> (defaults to 100)
|
|
25 # --ann=(none | p-num | ss-count) (defaults to none)
|
|
26 # --mode=(auto | bases | lines) (defaults to auto)
|
|
27 # --label=<base numbering frequency>
|
|
28 # --rotate=<structure rotation angle>
|
|
29 # --run-type=(text | html) (defaults to text)
|
|
30 # --model=(EM | PF) (defaults to EM)
|
|
31 # --circular
|
|
32 #Obscure options:
|
|
33 # --allpairs
|
|
34 # --maxloop=<maximum bulge/interior loop size> (defaults to 30)
|
|
35 # --nodangle
|
|
36 # --simple
|
|
37 # --prefilter=<filter value>
|
1
|
38
|
4
|
39 NA=RNA
|
|
40 TM=37
|
|
41 NAT=1
|
|
42 MG=0
|
1
|
43
|
4
|
44 while getopts ":i:o:t:a:c:s:m:" OPTION;
|
|
45 do
|
|
46 case $OPTION in
|
|
47 i) INPUT="$OPTARG";;
|
|
48 o) ZIP_ARHIVE="$OPTARG";;
|
|
49 t) TEMP_DIR="$OPTARG";;
|
|
50 a) NA="$OPTARG";;
|
|
51 c) TM="$OPTARG";;
|
|
52 s) NAT="$OPTARG";;
|
|
53 m) MG="$OPTARG";;
|
|
54 esac
|
|
55 done
|
|
56
|
|
57 mkdir -p ${TEMP_DIR}/unafold
|
|
58 cd ${TEMP_DIR}/unafold
|
1
|
59
|
4
|
60 NA=$(echo $NA | tr '[:lower:]' '[:upper:]')
|
1
|
61
|
4
|
62 # calucalation of RNA don't need the concentraion of salts
|
|
63 if [[ ${NA} == 'DNA' ]]; then
|
|
64 UNAFold.pl -n ${NA} -t ${TM} -N ${NAT} -M ${MG} ${INPUT}
|
|
65 else
|
|
66 UNAFold.pl -n ${NA} -t ${TM} ${INPUT}
|
|
67 fi
|
1
|
68
|
4
|
69 echo ""
|
|
70 echo "Parametres of UNAFold run:"
|
|
71 cat *run
|
1
|
72
|
4
|
73 cd ../
|
|
74 zip -r -q unafold.zip unafold
|
|
75 mv unafold.zip ${ZIP_ARHIVE}
|
1
|
76
|