comparison r_wrapper.sh @ 31:d26e8c208b5f draft

Uploaded
author davidvanzessen
date Fri, 08 Nov 2013 05:29:20 -0500
parents fb03be3fa862
children 46c5d9d396a5
comparison
equal deleted inserted replaced
30:bdf048a0b414 31:d26e8c208b5f
1 #!/bin/bash 1 #!/bin/bash
2 echo $1
3 echo $2
4 echo $3
5
6 inputFile=$1
7 outputFile=$2
8 outputDir=$3
2 dir="$(cd "$(dirname "$0")" && pwd)" 9 dir="$(cd "$(dirname "$0")" && pwd)"
3 Rscript --verbose $dir/RScript.r $1 "$2.png" 2>&1 10 mkdir $3
4 mv -f "$2.png" $2 11 Rscript --verbose $dir/RScript.r $inputFile $outputDir $outputDir 2>&1
12 echo "<html>" >> $2
13 echo "<img src='VPlot.png'/>" >> $2
14 echo "<img src='DPlot.png'/>" >> $2
15 echo "<img src='JPlot.png'/>" >> $2
5 16
17 samples=`cat $outputDir/samples.txt`
18 count=1
19 echo "<table border='1'>" >> $outputFile
20 for sample in $samples; do
21 echo "<tr><td colspan='3' height='100'></td>" >> $outputFile
22 echo "<tr><td colspan='3'><h1>$sample</h1></td></tr>" >> $outputFile
23 echo "<tr><td><h2>V-D Heatmap:</h2></td><td><h2>V-J Heatmap:</h2></td><td><h2>D-J Heatmap:</h2></td></tr><tr>" >> $outputFile
24 mv "$outputDir/HeatmapVD_$sample.png" "$outputDir/VD_$sample.png"
25 echo "<td><img src='VD_$sample.png'/></td>" >> $outputFile
26 mv "$outputDir/HeatmapVJ_$sample.png" "$outputDir/VJ_$sample.png"
27 echo "<td><img src='VJ_$sample.png'/></td>" >> $outputFile
28 mv "$outputDir/HeatmapDJ_$sample.png" "$outputDir/DJ_$sample.png"
29 echo "<td><img src='DJ_$sample.png'/></td></tr>" >> $outputFile
30 count=$((count+1))
31 done
32 echo "</table>" >> $outputFile
33
34 echo "</html>" >> $2
35