comparison rnbeads_galaxy_wrapper.sh @ 25:6f4321495d9d draft

Uploaded
author pavlo-lutsik
date Wed, 03 Jul 2013 04:35:40 -0400
parents bd8652fa984f
children
comparison
equal deleted inserted replaced
24:32a4b6c37946 25:6f4321495d9d
1 #!/bin/bash
2 Rscript --no-save $(dirname $(readlink -f $0))/RnBeadsGalaxy.R $* > /tmp/rnbeads.stdout 2>/tmp/rnbeads.stderr
3 #Rscript --no-save \$R_SCRIPTS_PATH/RnBeadsGalaxy.R $*
4 outfile=`echo $* | cut -d\ -f2 | sed -e "s/--output-file=//g"`
5 echo $outfile
6 #outdir=`echo $* | sed -e "s/.*--report-dir=\(.*\)[[:blank:]].*/\1/g"`
7
8
9 if [ -s /tmp/rnbeads.stderr ]
10 then
11 cat /tmp/rnbeads.stdout >&2
12 #cat $outdir/analysis.log >&2
13 cat /tmp/rnbeads.stderr >&2
14 exit 3
15 else
16 echo "<html><body>" >> $outfile
17 echo "<a href=\"index.html\">RnBeads report</a>" >> $outfile
18 echo "<br/><br/>Output was generated during the execution:<br/>" >> $outfile
19 echo "<pre>" >> outfile
20 cat /tmp/rnbeads.stdout |sed -e "s/$/<br\/>/g" >> $outfile
21 echo "</pre>" >> outfile
22 echo "</p>" >> $outfile
23 echo "</body></html>" >> $outfile
24 exit 0
25 fi