Mercurial > repos > pavlo-lutsik > rnbeads
comparison rnbeads_galaxy_wrapper.sh @ 13:d6cdc73fd57e draft
Uploaded
author | pavlo-lutsik |
---|---|
date | Sun, 21 Apr 2013 18:04:11 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
12:73e7d00a9a19 | 13:d6cdc73fd57e |
---|---|
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 $* | sed -e "s/.*--output-file=\(.*\)[$[[:blank:]]].*/\1/g"` | |
5 outdir=`echo $* | sed -e "s/.*--report-dir=\(.*\)[[:blank:]].*/\1/g"` | |
6 | |
7 | |
8 if [ -s /tmp/rnbeads.stderr ] | |
9 then | |
10 cat /tmp/rnbeads.stdout >&2 | |
11 cat $outdir/analysis.log >&2 | |
12 cat /tmp/rnbeads.stderr >&2 | |
13 exit 3 | |
14 else | |
15 echo "<html>\n<body>\n" >> $outfile | |
16 echo "<a href=\"index.html\">RnBeads report</a>\n" >> $outfile | |
17 echo "<br/><br/>\nOutput was generated during the execution:" >> $outfile | |
18 echo "<p>" >> outfile | |
19 cat /tmp/rnbeads.stdout >> $outfile | |
20 echo "</p>" >> $outfile | |
21 echo "</body>\n</html>" >> $outfile | |
22 exit 0 | |
23 fi |