0
|
1 #!/bin/sh
|
|
2 # script to generate all functional test outputs for each rgenetics tool
|
|
3 # could be run at installation to ensure all dependencies are in place?
|
|
4 case $# in 0) echo "USAGE: ${0##*/} TooltoTest galaxyRoot outRoot"; exit 1;;
|
|
5 [1-2]*) echo "Need ToolToTest and paths for galaxyRoot outRoot as parameters"; exit 2;;
|
|
6 [5-10]*) echo "Too many arguments - ToolToTest and paths for galaxyRoot outRoot as parameters"; exit 2;;
|
|
7 *)
|
|
8 esac
|
|
9 GALAXYROOT=$2
|
|
10 OUTROOT=$3
|
|
11 echo "using $GALAXYROOT"
|
|
12 # change this as needed for your local install
|
|
13 INPATH="${GALAXYROOT}/test-data"
|
|
14 JARPATH="${GALAXYROOT}/tool-data/shared/jars"
|
|
15 TOOLPATH="${GALAXYROOT}/tools/rgenetics"
|
|
16 OROOT="${OUTROOT}/test-data/rgtestouts"
|
|
17 NORMALOROOT="${OUTROOT}/test-data"
|
|
18 case "$1" in
|
|
19 'rgManQQ')
|
|
20
|
|
21 TOOL="rgManQQ"
|
|
22 NPRE=${TOOL}test1
|
|
23 OUTPATH="$OROOT/$TOOL"
|
|
24 rm -rf $OUTPATH/*
|
|
25 CL="python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 7 0"
|
|
26 # rgManQQ.py '$input_file' "$name" '$out_html' '$out_html.files_path' '$chrom_col' '$offset_col'
|
|
27 # '$pval_col'
|
|
28 #python /opt/galaxy/tools/rgenetics/rgManQQ.py /opt/galaxy/test-data/smallwgaP.xls rgManQQtest1
|
|
29 #/opt/galaxy/test-data/rgtestouts/rgManQQ/rgManQQtest1.html /opt/galaxy/test-data/rgtestouts/rgManQQ 1 2 5,7
|
|
30 echo "Testing $TOOL using $CL"
|
|
31 python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 7 0
|
|
32 ;;
|
|
33
|
|
34 'rgfakePhe')
|
|
35 TOOL="rgfakePhe"
|
|
36 NPRE=${TOOL}test1
|
|
37 OUTPATH="$OROOT/$TOOL"
|
|
38 rm -rf $OUTPATH/*
|
|
39 PSSCRIPT="$OUTPATH/script_file"
|
|
40 echo "{'pN':'normtest','pT':'rnorm','pP':\"{'Mean':'100', 'SD':'10'}\"}" > $PSSCRIPT
|
|
41 echo "{'pN':'cattest','pT':'cat','pP':\"{'values':'red,green,blue'}\"}" >> $PSSCRIPT
|
|
42 echo "{'pN':'uniftest','pT':'$f.series.phetype','pP':\"{'low':'1','hi':'100'}\"}" >> $PSSCRIPT
|
|
43 echo "{'pN':'gammatest','pT':'rgamma','pP':\"{'Alpha':'1', 'Beta':'0.1'}\"}" >> $PSSCRIPT
|
|
44 echo "{'pN':'poissontest','pT':'poisson','pP':\"{'lamb':'1.0',}\"}" >> $PSSCRIPT
|
|
45 echo "{'pN':'exptest','pT':'exponential','pP':\"{'Mean':'100.0',}\"}" >> $PSSCRIPT
|
|
46 echo "{'pN':'weibtest','pT':'weibull','pP':\"{'Alpha':'1.0', 'Beta':'0.1'}\"}" >> $PSSCRIPT
|
|
47 echo "now doing $TOOL"
|
|
48 python $TOOLPATH/$TOOL.py ${INPATH}/tinywga $NPRE $NPRE.pphe $OUTPATH $PSSCRIPT
|
|
49 # <command interpreter="python">rgfakePhe.py '$infile1.extra_files_path/$infile1.metadata.base_name'
|
|
50 # "$title1" '$ppheout' '$ppheout.files_path' '$script_file'
|
|
51 #
|
|
52 ;;
|
|
53 'rgQC')
|
|
54
|
|
55 TOOL="rgQC"
|
|
56 NPRE=${TOOL}test1
|
|
57 echo "now doing $TOOL"
|
|
58 OUTPATH="$OROOT/$TOOL"
|
|
59 rm -rf $OUTPATH/*
|
|
60 CMD="python $TOOLPATH/$TOOL.py -i $INPATH/tinywga -o $NPRE -s ${OUTPATH}/${NPRE}.html -p $OUTPATH"
|
|
61 echo "doing $CMD"
|
|
62 $CMD
|
|
63 # rgQC.py -i '$input_file.extra_files_path/$input_file.metadata.base_name' -o "$out_prefix"
|
|
64 # -s '$html_file' -p '$html_file.files_path'
|
|
65 #
|
|
66 ;;
|
|
67
|
|
68 'rgGRR')
|
|
69 TOOL="rgGRR"
|
|
70 NPRE=${TOOL}test1
|
|
71 echo "now doing $TOOL"
|
|
72 OUTPATH="$OROOT/$TOOL"
|
|
73 rm -rf $OUTPATH/*
|
|
74 cmd="$TOOLPATH/$TOOL.py "$INPATH/tinywga" "tinywga" $OUTPATH/${NPRE}.html $OUTPATH "$NPRE" '100' '6' 'true'"
|
|
75 echo "Doing $cmd"
|
|
76 python $TOOLPATH/$TOOL.py "$INPATH/tinywga" "tinywga" $OUTPATH/${NPRE}.html $OUTPATH "$NPRE" '100' '6'
|
|
77 # rgGRR.py $i.extra_files_path/$i.metadata.base_name "$i.metadata.base_name"
|
|
78 #'$out_file1' '$out_file1.files_path' "$title" '$n' '$Z'
|
|
79 ;;
|
|
80 'rgLDIndep')
|
|
81 TOOL="rgLDIndep"
|
|
82 NPRE=${TOOL}test1
|
|
83 OUTPATH="$OROOT/$TOOL"
|
|
84 rm -rf $OUTPATH/*
|
|
85 python $TOOLPATH/$TOOL.py "$INPATH" "tinywga" "$NPRE" 1 1 0 0 1 1 $OUTPATH/${NPRE}.pbed $OUTPATH 10000 5000 0.1
|
|
86 #rgLDIndep.py '$input_file.extra_files_path' '$input_file.metadata.base_name' '$title' '$mind'
|
|
87 # '$geno' '$hwe' '$maf' '$mef' '$mei' '$out_file1'
|
|
88 #'$out_file1.files_path' '$window' '$step' '$r2'
|
|
89 ;;
|
|
90
|
|
91 'rgPedSub')
|
|
92 TOOL="rgPedSub"
|
|
93 NPRE=${TOOL}test1
|
|
94 OUTPATH="$OROOT/$TOOL"
|
|
95 rm -rf $OUTPATH/*
|
|
96 PSSCRIPT="$OUTPATH/pedsub.script"
|
|
97 echo "title~~~~$NPRE" > $PSSCRIPT
|
|
98 echo "output1~~~~${OUTPATH}/${NPRE}.lped" >> $PSSCRIPT
|
|
99 echo "outformat~~~~lped" >> $PSSCRIPT
|
|
100 echo "basename~~~~tinywga" >> $PSSCRIPT
|
|
101 echo "inped~~~~$INPATH/tinywga" >> $PSSCRIPT
|
|
102 echo "outdir~~~~$OUTPATH" >> $PSSCRIPT
|
|
103 echo "region~~~~" >> $PSSCRIPT
|
|
104 echo "relfilter~~~~all" >> $PSSCRIPT
|
|
105 echo "rslist~~~~rs2283802Xrs2267000Xrs16997606Xrs4820537Xrs3788347Xrs756632Xrs4820539Xrs2283804Xrs2267006Xrs4822363X" >> $PSSCRIPT
|
|
106 echo "now doing $TOOL"
|
|
107 python $TOOLPATH/$TOOL.py $PSSCRIPT
|
|
108 rm -rf $PSSCRIPT
|
|
109 ;;
|
|
110
|
|
111 'rgfakePhe')
|
|
112
|
|
113 TOOL="rgfakePhe"
|
|
114 NPRE=${TOOL}test1
|
|
115 OUTPATH="$OROOT/$TOOL"
|
|
116 rm -rf $OUTPATH/*
|
|
117 PSSCRIPT="$OUTPATH/script_file"
|
|
118 echo "{'pN':'normtest','pT':'rnorm','pP':\"{'Mean':'100', 'SD':'10'}\"}" > $PSSCRIPT
|
|
119 echo "{'pN':'cattest','pT':'cat','pP':\"{'values':'red,green,blue'}\"}" >> $PSSCRIPT
|
|
120 echo "{'pN':'uniftest','pT':'$f.series.phetype','pP':\"{'low':'1','hi':'100'}\"}" >> $PSSCRIPT
|
|
121 echo "{'pN':'gammatest','pT':'rgamma','pP':\"{'Alpha':'1', 'Beta':'0.1'}\"}" >> $PSSCRIPT
|
|
122 echo "{'pN':'poissontest','pT':'poisson','pP':\"{'lamb':'1.0',}\"}" >> $PSSCRIPT
|
|
123 echo "{'pN':'exptest','pT':'exponential','pP':\"{'Mean':'100.0',}\"}" >> $PSSCRIPT
|
|
124 echo "{'pN':'weibtest','pT':'weibull','pP':\"{'Alpha':'1.0', 'Beta':'0.1'}\"}" >> $PSSCRIPT
|
|
125 echo "now doing $TOOL"
|
|
126 python $TOOLPATH/$TOOL.py $PSSCRIPT
|
|
127 ;;
|
|
128
|
|
129 'rgClean')
|
|
130 TOOL="rgClean"
|
|
131 NPRE=${TOOL}test1
|
|
132 OUTPATH="$OROOT/$TOOL"
|
|
133 rm -rf $OUTPATH/*
|
|
134 python $TOOLPATH/$TOOL.py $INPATH "tinywga" "$NPRE" 1 1 0 0 1 1 $OUTPATH/${NPRE}.pbed $OUTPATH 0 0 0 0
|
|
135 # rgClean.py '$input_file.extra_files_path' '$input_file.metadata.base_name' '$title' '$mind'
|
|
136 # '$geno' '$hwe' '$maf' '$mef' '$mei' '$out_file1' '$out_file1.files_path'
|
|
137 # '${GALAXY_DATA_INDEX_DIR}/rg/bin/plink' '$relfilter' '$afffilter' '$sexfilter' '$fixaff'
|
|
138 #
|
|
139 ;;
|
|
140
|
|
141 'rgEigPCA')
|
|
142
|
|
143 TOOL="rgEigPCA"
|
|
144 NPRE=${TOOL}test1
|
|
145 OUTPATH="$OROOT/$TOOL"
|
|
146 rm -rf $OUTPATH/*
|
|
147 python $TOOLPATH/$TOOL.py "$INPATH/tinywga" "$NPRE" ${OUTPATH}/${NPRE}.html $OUTPATH 4 2 2 2 $OUTPATH/rgEigPCAtest1.txt
|
|
148 # rgEigPCA.py "$i.extra_files_path/$i.metadata.base_name" "$title" "$out_file1"
|
|
149 # "$out_file1.files_path" "$k" "$m" "$t" "$s" "$pca"
|
|
150 #
|
|
151 ;;
|
|
152
|
|
153 'rgfakePed')
|
|
154 TOOL="rgfakePed"
|
|
155 NPRE=${TOOL}test1
|
|
156 OUTPATH="$OROOT/$TOOL"
|
|
157 rm -rf $OUTPATH/*
|
|
158 echo "now doing $TOOL"
|
|
159 python $TOOLPATH/$TOOL.py --title "$NPRE" -o $OUTPATH/${NPRE}.lped -p $OUTPATH -c "20" -n "40" -s "10" -w "0" -v "0" -l "pbed" -d "T" -m "0" -M "0"
|
|
160 #rgfakePed.py --title '$title1'
|
|
161 # -o '$out_file1' -p '$out_file1.extra_files_path' -c '$ncases' -n '$ntotal'
|
|
162 # -s '$nsnp' -w '$lowmaf' -v '$missingValue' -l '$outFormat'
|
|
163 # -d '$mafdist' -m '$missingRate' -M '$mendelRate'
|
|
164 ;;
|
|
165
|
|
166 'rgHaploView')
|
|
167
|
|
168 TOOL="rgHaploView"
|
|
169 NPRE=${TOOL}test1
|
|
170 OUTPATH="$OROOT/$TOOL"
|
|
171 rm -rf $OUTPATH/*
|
|
172 CL="python $TOOLPATH/$TOOL.py '' 'rs2283802 rs2267000 rs16997606 rs4820537 rs3788347 rs756632 rs4820539 rs2283804 rs2267006 rs4822363' '$NPRE' $OUTPATH/${NPRE}.html '$INPATH' 'tinywga' 0.0 200000 'RSQ' 'lo' '2048' '$OUTPATH' 'noinfo' '0.8' 'YRI' $JARPATH/haploview.jar"
|
|
173 echo "Testing $TOOL using $CL"
|
|
174 python $TOOLPATH/$TOOL.py "" "rs2283802 rs2267000 rs16997606 rs4820537 rs3788347 rs756632 rs4820539 rs2283804 rs2267006 rs4822363" \
|
|
175 "$NPRE" $OUTPATH/${NPRE}.html "$INPATH" "tinywga" 0.0 200000 "RSQ" "lo" "2048" "$OUTPATH" "noinfo" "0.8" "YRI" $JARPATH/haploview.jar
|
|
176 # rgHaploView.py "$ucsc_region" "$rslist" "$title" "$output1"
|
|
177 # "$lhistIn.extra_files_path" "$lhistIn.metadata.base_name"
|
|
178 # "$minmaf" "$maxdist" "$ldtype" "$hires" "$memsize" "$output1.files_path"
|
|
179 # "$infoTrack" "$tagr2" "$hmpanel" ${GALAXY_DATA_INDEX_DIR}/rg/bin/haploview.jar
|
|
180 # note these statistical tools do NOT generate composite outputs
|
|
181 ;;
|
|
182
|
|
183 'rgGLM')
|
|
184 TOOL="rgGLM"
|
|
185 NPRE=${TOOL}test1
|
|
186 OUTPATH=$NORMALOROOT
|
|
187 python $TOOLPATH/$TOOL.py "$INPATH/tinywga" $INPATH/tinywga "$NPRE" "c1" "" $OUTPATH/${NPRE}_GLM.xls \
|
|
188 $OUTPATH/${NPRE}_GLM_log.txt "tinywga" "" "" "" 1 1 0 0 $OUTPATH/${NPRE}_GLM_topTable.gff
|
|
189 ## rgGLM.py '$i.extra_files_path/$i.metadata.base_name' '$phef.extra_files_path/$phef.metadata.base_name'
|
|
190 ## "$title1" '$predvar' '$covar' '$out_file1' '$logf' '$dbkey' '$i.metadata.base_name'
|
|
191 ## '$inter' '$cond' '$gender' '$mind' '$geno' '$maf' '$logistic' '$gffout'
|
|
192 ;;
|
|
193
|
|
194 'rgTDT')
|
|
195 TOOL="rgTDT"
|
|
196 NPRE=${TOOL}test1
|
|
197 OUTPATH=$NORMALOROOT
|
|
198 python $TOOLPATH/$TOOL.py -i "$INPATH/tinywga" -o "$NPRE" -r $OUTPATH/${NPRE}_TDT.xls \
|
|
199 -l $OUTPATH/${NPRE}_TDT_log.txt -g $OUTPATH/${NPRE}_TDT_topTable.gff
|
|
200 ## rgTDT.py -i '$infile.extra_files_path/$infile.metadata.base_name' -o '$title'
|
|
201 ## -r '$out_file1' -l '$logf' -x '${GALAXY_DATA_INDEX_DIR}/rg/bin/plink'
|
|
202 ## -g '$gffout'
|
|
203 ;;
|
|
204
|
|
205 'rgCaCo')
|
|
206 TOOL="rgCaCo"
|
|
207 NPRE=${TOOL}test1
|
|
208 OUTPATH=$NORMALOROOT
|
|
209 echo "now doing $TOOL"
|
|
210 python $TOOLPATH/rgCaCo.py $INPATH/tinywga "$NPRE" $OUTPATH/${NPRE}_CaCo.xls $OUTPATH/${NPRE}_CaCo_log.txt $OUTPATH $OUTPATH/${NPRE}_CaCo_topTable.gff
|
|
211 # rgCaCo.py '$i.extra_files_path/$i.metadata.base_name' "$name" '$out_file1' '$logf' '$logf.files_path' '$gffout'
|
|
212 ;;
|
|
213
|
|
214 'rgQQ')
|
|
215 TOOL="rgQQ"
|
|
216 echo "now doing $TOOL"
|
|
217 NPRE=${TOOL}test1
|
|
218 OUTPATH=$NORMALOROOT
|
|
219 CL="python $TOOLPATH/$TOOL.py "$INPATH/tinywga.pphe" "$NPRE" 1 3 $OUTPATH/$NPRE.pdf 8 10 "false" 1 $OUTPATH"
|
|
220 echo "running $TOOL using $CL"
|
|
221 python $TOOLPATH/$TOOL.py "$INPATH/tinywga.pphe" "$NPRE" 1 3 $OUTPATH/$NPRE.pdf 8 10 "false" 1 $OUTPATH
|
|
222 # rgQQ.py "$input1" "$name" $sample "$cols" $allqq $height $width $log $allqq.id $__new_file_path__
|
|
223 ;;
|
|
224 esac
|