annotate rnbeads_galaxy_wrapper.sh @ 17:29a00b4066a7 draft

Uploaded
author pavlo-lutsik
date Sun, 21 Apr 2013 18:30:00 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
1 #!/bin/bash
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
2 Rscript --no-save $(dirname $(readlink -f $0))/RnBeadsGalaxy.R $* > /tmp/rnbeads.stdout 2>/tmp/rnbeads.stderr
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
3 #Rscript --no-save \$R_SCRIPTS_PATH/RnBeadsGalaxy.R $*
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
4 outfile=`echo $* | sed -e "s/.*--output-file=\(.*\)[[:blank:]].*/\1/g"`
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
5 #outdir=`echo $* | sed -e "s/.*--report-dir=\(.*\)[[:blank:]].*/\1/g"`
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
6
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
7
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
8 if [ -s /tmp/rnbeads.stderr ]
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
9 then
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
10 cat /tmp/rnbeads.stdout >&2
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
11 #cat $outdir/analysis.log >&2
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
12 cat /tmp/rnbeads.stderr >&2
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
13 exit 3
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
14 else
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
15 echo "<html>\n<body>\n" >> $outfile
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
16 echo "<a href=\"index.html\">RnBeads report</a>\n" >> $outfile
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
17 echo "<br/><br/>\nOutput was generated during the execution:" >> $outfile
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
18 echo "<p>" >> outfile
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
19 cat /tmp/rnbeads.stdout >> $outfile
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
20 echo "</p>" >> $outfile
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
21 echo "</body>\n</html>" >> $outfile
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
22 exit 0
29a00b4066a7 Uploaded
pavlo-lutsik
parents:
diff changeset
23 fi