Mercurial > repos > pavlo-lutsik > rnbeads
comparison rnbeads_galaxy_wrapper.sh @ 19:bd8652fa984f draft
Uploaded
author | pavlo-lutsik |
---|---|
date | Mon, 22 Apr 2013 10:56:32 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
18:ef3f7c36409a | 19:bd8652fa984f |
---|---|
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 |