annotate Dotplot_Release/dotplot.bash @ 16:89a7ee06257f draft

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