annotate Dotplot_Release/dotplot.bash @ 5:dc2aed283637 draft

Uploaded
author bornea
date Fri, 29 Jan 2016 10:14:36 -0500
parents dfa3436beb67
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
1 #!/bin/bash
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
2 #SCRIPT=$(readlink -e $0)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
3 #SCRIPTPATH=`dirname $SCRIPT`
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
4 pushd `dirname $0` > /dev/null
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
5 SCRIPTPATH=`pwd`
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
6 popd > /dev/null
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
7
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
8 usage() { printf "Usage: $0
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
9 [-f <saint_file_name.txt>]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
10 [-i <0 for SaintExpress format, 1 for other>]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
11 [-c <clustering to perform. Options: b (biclustering), h (hierarchical), n (none, requires input text files for bait and prey ordering; see options -b and -p)>]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
12 [-n <clustering type to be performed if option -c is set to \"h\">]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
13 [-d <distance metric to use if option -c is set to \"h\">]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
14 [-b <list of bait proteins in display order (see option -c n)>]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
15 [-p <list of prey proteins in display order (see option -c n). Set this to \"all\" if you want to include all preys and cluster them>]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
16 [-s <primary FDR cutoff [0-1, recommended=0.01]>]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
17 [-t <secondary FDR cutoff [must be less than the primary, recommended=0.025]>
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
18 [-x <spectral count minimum. Only preys with >= this will be used]>
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
19 [-m <maximum spectral count>]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
20 [-N <normalization, 0 for no (default), 1 for yes, 2 for normalization based on significant preys counts (prey FDR <= option -t)>]
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
21 [-C <FDR cutoff for normalization if using option -N 2 (deafult is -t)>]\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
22 1>&2; exit 1; }
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
23
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
24 N=0
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
25 n="ward"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
26 d="canberra"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
27 x=0
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
28 i=0
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
29 while getopts ":f:i:s:t:x:m:c:n:d:b:p:N:C:" o; do
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
30 case "${o}" in
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
31 f)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
32 f=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
33 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
34 i)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
35 i=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
36 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
37 s)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
38 s=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
39 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
40 t)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
41 t=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
42 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
43 x)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
44 x=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
45 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
46 m)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
47 m=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
48 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
49 c)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
50 c=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
51 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
52 n)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
53 n=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
54 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
55 d)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
56 d=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
57 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
58 b)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
59 b=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
60 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
61 p)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
62 p=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
63 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
64 N)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
65 N=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
66 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
67 C)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
68 C=${OPTARG}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
69 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
70 *)
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
71 usage
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
72 ;;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
73 esac
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
74 done
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
75 shift $((OPTIND-1))
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
76
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
77 filename=${f%%.*}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
78 echo "Saint input file = ${f}"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
79 echo "Primary FDR cutoff = ${s}"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
80 echo "Secondary FDR cutoff for dotplot = ${t}"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
81 echo "Minimum spectral count for significant preys = ${x}"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
82 echo "Maximum spectral count for dot plot = ${m}"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
83
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
84 if [ -z "${f}" ] || [ -z "${s}" ] || [ -z "${t}" ] || [ -z "${m}" ] || [ -z "${c}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
85 usage
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
86 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
87
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
88 if [ "${i}" == 1 ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
89 $SCRIPTPATH/SaintConvert.pl -i ${f}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
90 f="mockSaintExpress.txt"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
91 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
92
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
93 if [ "${x}" -ge "${m}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
94 echo "spectral count minimum (${x}) cannot be greater than or equal to the maximum (${m})"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
95 exit 1;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
96 elif [ "${x}" -lt 0 ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
97 echo "spectral count minimum (${x}) cannot be less than 0. Setting to 0 and continuing"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
98 x=0
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
99 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
100
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
101 ###Check for normalization
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
102
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
103 if [ "${N}" == 1 ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
104 printf "\nNormalization is being performed\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
105 $SCRIPTPATH/Normalization.R ${f}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
106 f="norm_saint.txt"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
107 elif [ "${N}" == 2 ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
108 printf "\nNormalization is being performed\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
109 if [ -z "${C}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
110 C=${t}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
111 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
112 $SCRIPTPATH/Normalization_sigpreys.R ${f} ${C}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
113 f="norm_saint.txt"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
114 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
115
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
116
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
117 ###Check for clustering etc
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
118
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
119 if [ "${c}" == "h" ] && [ -z "${n}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
120 printf "\nHierarchial clustering was selected (-c = h), but no clustering method (-n) was chosen.\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
121 printf "The input parameter -n must be set to one of \"average\", \"centroid\", \"complete\", \"mcquitty\",\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
122 printf "\"median\", \"single\" or \"ward\". \"ward\" will be selected as default.\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
123 n="ward"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
124 elif [ "${c}" == "h" ] && [ -n "${n}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
125 if [ "${n}" == "average" ] || [ "${n}" == "centroid" ] || [ "${n}" == "complete" ] || [ "${n}" == "mcquitty" ] || [ "${n}" == "median" ] || [ "${n}" == "single" ] || [ "${n}" == "ward" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
126 printf "\nHierarchical clustering (method = ${n}) will be performed\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
127 else
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
128 printf "\n${n} is not a valid Hierarchical clustering method.\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
129 printf "Choose one of \"average\", \"centroid\", \"complete\", \"mcquitty\", \"median\", \"single\" or \"ward\"\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
130 exit 1
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
131 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
132 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
133
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
134 p_c=0
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
135 if [ "${c}" == "h" ] && [ -z "${d}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
136 printf "\nHierarchial clustering was selected (-c = h), but no distance metric (-d) was chosen.\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
137 printf "The input parameter -d must be set to one of \"binary\", \"canberra\", \"euclidean\",\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
138 printf "\"manhattan\", \"maximum\" or \"minkowski\". \"canberra\" will be selected as default.\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
139 d="canberra"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
140 elif [ "${c}" == "h" ] && [ -n "${d}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
141 if [ "${d}" == "binary" ] || [ "${d}" == "canberra" ] || [ "${d}" == "euclidean" ] || [ "${d}" == "manhattan" ] || [ "${d}" == "maximum" ] || [ "${d}" == "minkowski" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
142 printf "\nHierarchical clustering (distance metric = ${d}) will be performed\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
143 else
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
144 printf "\n${d} is not a valid Hierarchical clustering distance metric.\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
145 printf "Choose one of \"binary\", \"canberra\", \"euclidean\", \"manhattan\", \"maximum\" or \"minkowski\"\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
146 exit 1
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
147 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
148 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
149
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
150 if [ "${c}" == "n" ] && [ -z "${b}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
151 printf "\n\"No Clustering\" option was selected (-c = n), but no bait list was included (option -b).\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
152 printf "Bait list must be in .txt formart.\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
153 exit 1
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
154 elif [ "${c}" == "n" ] && [ -z "${p}" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
155 printf "\n\"No Clustering\" option was selected (-c = n), but no prey list was included (option -p).\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
156 printf "Prey list must be in .txt formart.\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
157 exit 1
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
158 elif [ "${c}" == "n" ] && [ "${p}" == "all" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
159 printf "\n\"No Clustering\" option was selected (-c = n) for baits, but preys will still be clustered.\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
160 printf "using \"ward\" and \"canberra\" as defaults or options as supplied on command line.\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
161 p="empty"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
162 p_c=1
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
163 n="ward"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
164 d="canberra"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
165 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
166
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
167
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
168 ###Check number of baits
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
169
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
170 bait_n=$(perl $SCRIPTPATH/BaitCheck.pl -i ${f})
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
171 echo "Number of baits = "$bait_n
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
172 printf "\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
173
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
174 if [ "${c}" == "b" ] && [ $bait_n == 2 ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
175 printf "\nWarning only 2 baits are present. Biclustering will not performed.\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
176 printf "Hierarchical clustering (method = ward) will be performed instead.\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
177 c="h"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
178 n="ward"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
179 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
180
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
181
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
182 ###Generate plots
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
183
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
184 if [ "${c}" == "b" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
185 printf "\nBiclustering will be performed\n\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
186 $SCRIPTPATH/Step1_data_reformating.R ${f} ${s} ${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
187 $SCRIPTPATH/Step2_data_filtering.R ${filename}_matrix.txt ${x} ${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
188 GSL_RNG_SEED=123 $SCRIPTPATH/Step3_nestedcluster ${filename}.dat $SCRIPTPATH/biclust_param.txt
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
189 $SCRIPTPATH/Step4_biclustering.R ${filename}.dat
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
190
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
191 $SCRIPTPATH/SOFD.pl -i ${f} -s ${s} -x ${x}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
192 $SCRIPTPATH/R_dotPlot.R ${s} ${t} ${m}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
193 mkdir Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
194 mkdir Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
195 mv bait_lists Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
196 mv Clusters Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
197 mv MCMCparameters Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
198 mv NestedClusters Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
199 mv NestedMu Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
200 mv NestedSigma2 Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
201 mv OPTclusters Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
202 mv ${filename}_matrix.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
203 mv ${filename}.dat Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
204 mv SC_data.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
205 mv FDR_data.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
206 mv clustered_matrix.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
207 mv singletons.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
208 mv bait2bait_matrix.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
209 mv baitClusters Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
210 mv clusteredData Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
211 mv dotplot.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
212 mv bait2bait.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
213 mv estimated.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
214 mv stats.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
215 cp $SCRIPTPATH/legend.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
216 elif [ "${c}" == "h" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
217
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
218 $SCRIPTPATH/SOFD.pl -i ${f} -s ${s} -x ${x}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
219 $SCRIPTPATH/R_dotPlot_hc.R ${s} ${t} ${m} ${n} ${d} $SCRIPTPATH
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
220
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
221 mkdir Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
222 mkdir Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
223 mv dotplot.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
224 mv heatmap_borders.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
225 mv heatmap_no_borders.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
226 mv bait2bait.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
227 mv SC_data.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
228 mv FDR_data.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
229 cp $SCRIPTPATH/legend.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
230 elif [ "${c}" == "n" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
231
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
232 $SCRIPTPATH/SOFD.pl -i ${f} -s ${s} -x ${x}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
233 echo "$SCRIPTPATH/R_dotPlot_nc.R ${s} ${t} ${m} ${b} $p_c ${p} ${n} ${d} $SCRIPTPATH"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
234 $SCRIPTPATH/R_dotPlot_nc.R ${s} ${t} ${m} ${b} $p_c ${p} ${n} ${d} $SCRIPTPATH
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
235
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
236 mkdir Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
237 mkdir Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
238 mv dotplot.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
239 mv heatmap_borders.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
240 mv heatmap_no_borders.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
241 mv SC_data.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
242 mv FDR_data.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
243 cp $SCRIPTPATH/legend.pdf Output_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
244 else
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
245 printf -- "-c must be one of [b, h, n]: b (biclustering), h (hierarchical), n (none, requires input text files for bait and prey ordering>\n"
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
246 exit 1;
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
247 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
248
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
249 if [ "${N}" == "1" ] || [ "${N}" == "2" ]; then
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
250 mv norm_saint.txt Output_${filename}/TempData_${filename}
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
251 fi
dfa3436beb67 Uploaded
bornea
parents:
diff changeset
252