root/galaxy-central/tools/rgenetics/rgtest.sh

リビジョン 2, 8.7 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

  • 属性 svn:executable の設定値 *
行番号 
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?
4if test $# -lt 2
5then
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
10fi
11if [ $1 ]
12then
13  GALAXYROOT=$1
14else
15  GALAXYROOT=`pwd`
16fi
17if [ $2 ]
18then
19  OUTROOT=$2
20else
21  OUTROOT=`pwd`
22  OUTROOT="$OUTROOT/test-data"
23fi
24echo "using $GALAXYROOT as galaxyroot and $OUTROOT as outroot"
25# change this as needed for your local install
26INPATH="${GALAXYROOT}/test-data"
27JARPATH="${GALAXYROOT}/tool-data/shared/jars"
28TOOLPATH="${GALAXYROOT}/tools/rgenetics"
29OROOT="${OUTROOT}/test-data/rgtestouts"
30NORMALOROOT="${OUTROOT}/test-data"
31mkdir -p $OROOT
32rm -rf $OROOT/*
33# needed for testing - but tool versions should be bumped if this is rerun?
34TOOL="rgManQQ"
35NPRE=${TOOL}test1
36OUTPATH="$OROOT/$TOOL"
37mkdir $OUTPATH
38CL="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
43echo "Testing $TOOL using $CL"
44python $TOOLPATH/$TOOL.py "$INPATH/smallwgaP.xls" $NPRE ${OUTPATH}/${NPRE}.html $OUTPATH 1 2 7 0
45TOOL="rgfakePhe"
46NPRE=${TOOL}test1
47OUTPATH="$OROOT/$TOOL"
48mkdir $OUTPATH
49PSSCRIPT="$OUTPATH/script_file"
50echo "{'pN':'normtest','pT':'rnorm','pP':\"{'Mean':'100', 'SD':'10'}\"}" > $PSSCRIPT
51echo "{'pN':'cattest','pT':'cat','pP':\"{'values':'red,green,blue'}\"}" >> $PSSCRIPT
52echo "{'pN':'uniftest','pT':'$f.series.phetype','pP':\"{'low':'1','hi':'100'}\"}" >> $PSSCRIPT
53echo "{'pN':'gammatest','pT':'rgamma','pP':\"{'Alpha':'1', 'Beta':'0.1'}\"}" >> $PSSCRIPT
54echo "{'pN':'poissontest','pT':'poisson','pP':\"{'lamb':'1.0',}\"}" >> $PSSCRIPT
55echo "{'pN':'exptest','pT':'exponential','pP':\"{'Mean':'100.0',}\"}" >> $PSSCRIPT
56echo "{'pN':'weibtest','pT':'weibull','pP':\"{'Alpha':'1.0', 'Beta':'0.1'}\"}" >> $PSSCRIPT
57echo "now doing $TOOL"
58python $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#
63TOOL="rgQC"
64NPRE=${TOOL}test1
65echo "now doing $TOOL"
66OUTPATH="$OROOT/$TOOL"
67mkdir $OUTPATH
68python $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#
72TOOL="rgGRR"
73NPRE=${TOOL}test1
74echo "now doing $TOOL"
75OUTPATH="$OROOT/$TOOL"
76mkdir $OUTPATH
77CMD="python $TOOLPATH/$TOOL.py "$INPATH/tinywga" "tinywga" $OUTPATH/${NPRE}.html $OUTPATH "$NPRE" 100 6 true"
78echo "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#
83TOOL="rgLDIndep"
84NPRE=${TOOL}test1
85OUTPATH="$OROOT/$TOOL"
86mkdir $OUTPATH
87python $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'
91TOOL="rgPedSub"
92NPRE=${TOOL}test1
93OUTPATH="$OROOT/$TOOL"
94mkdir $OUTPATH
95PSSCRIPT="$OUTPATH/pedsub.script"
96echo "title~~~~$NPRE" > $PSSCRIPT
97echo "output1~~~~${OUTPATH}/${NPRE}.lped" >> $PSSCRIPT
98echo "outformat~~~~lped" >> $PSSCRIPT
99echo "basename~~~~tinywga" >> $PSSCRIPT
100echo "inped~~~~$INPATH/tinywga" >> $PSSCRIPT
101echo "outdir~~~~$OUTPATH" >> $PSSCRIPT
102echo "region~~~~" >> $PSSCRIPT
103echo "relfilter~~~~all" >> $PSSCRIPT
104echo "rslist~~~~rs2283802Xrs2267000Xrs16997606Xrs4820537Xrs3788347Xrs756632Xrs4820539Xrs2283804Xrs2267006Xrs4822363X" >> $PSSCRIPT
105echo "now doing $TOOL"
106python $TOOLPATH/$TOOL.py $PSSCRIPT
107rm -rf $PSSCRIPT
108#
109TOOL="rgfakePhe"
110NPRE=${TOOL}test1
111OUTPATH="$OROOT/$TOOL"
112mkdir $OUTPATH
113PSSCRIPT="$OUTPATH/script_file"
114echo "{'pN':'normtest','pT':'rnorm','pP':\"{'Mean':'100', 'SD':'10'}\"}" > $PSSCRIPT
115echo "{'pN':'cattest','pT':'cat','pP':\"{'values':'red,green,blue'}\"}" >> $PSSCRIPT
116echo "{'pN':'uniftest','pT':'$f.series.phetype','pP':\"{'low':'1','hi':'100'}\"}" >> $PSSCRIPT
117echo "{'pN':'gammatest','pT':'rgamma','pP':\"{'Alpha':'1', 'Beta':'0.1'}\"}" >> $PSSCRIPT
118echo "{'pN':'poissontest','pT':'poisson','pP':\"{'lamb':'1.0',}\"}" >> $PSSCRIPT
119echo "{'pN':'exptest','pT':'exponential','pP':\"{'Mean':'100.0',}\"}" >> $PSSCRIPT
120echo "{'pN':'weibtest','pT':'weibull','pP':\"{'Alpha':'1.0', 'Beta':'0.1'}\"}" >> $PSSCRIPT
121echo "now doing $TOOL"
122python $TOOLPATH/$TOOL.py $PSSCRIPT
123#
124echo "Now doing rgclean"
125TOOL="rgClean"
126NPRE=${TOOL}test1
127OUTPATH="$OROOT/$TOOL"
128mkdir $OUTPATH
129python $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#
134echo "Now doing rgEigPCA"
135TOOL="rgEigPCA"
136NPRE=${TOOL}test1
137OUTPATH="$OROOT/$TOOL"
138mkdir $OUTPATH
139python $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#
143TOOL="rgfakePed"
144NPRE=${TOOL}test1
145OUTPATH="$OROOT/$TOOL"
146mkdir $OUTPATH
147echo "now doing $TOOL"
148python $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#
154TOOL="rgHaploView"
155NPRE=${TOOL}test1
156OUTPATH="$OROOT/$TOOL"
157mkdir $OUTPATH
158echo "now doing $TOOL"
159python $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
166TOOL="rgGLM"
167NPRE=${TOOL}test1
168OUTPATH=$NORMALOROOT
169echo "now doing $TOOL"
170python $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#
176TOOL="rgTDT"
177NPRE=${TOOL}test1
178OUTPATH=$NORMALOROOT
179echo "now doing $TOOL"
180python $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#
186TOOL="rgCaCo"
187NPRE=${TOOL}test1
188OUTPATH=$NORMALOROOT
189echo "now doing $TOOL"
190python $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#
193TOOL="rgQQ"
194echo "now doing $TOOL"
195NPRE=${TOOL}test1
196OUTPATH=$NORMALOROOT
197CL="python $TOOLPATH/$TOOL.py "$INPATH/tinywga.pphe" "$NPRE" 1 3 $OUTPATH/$NPRE.pdf 8 10 "false" 1 $OUTPATH"
198echo "running $TOOL using $CL"
199python $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#
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。