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