diff r_wrapper.sh @ 15:c6d0ee9b3d91 draft

Uploaded
author davidvanzessen
date Thu, 04 Dec 2014 10:53:23 -0500
parents 24a80d4eff0c
children 8bdf54f37286
line wrap: on
line diff
--- a/r_wrapper.sh	Fri Nov 14 04:15:43 2014 -0500
+++ b/r_wrapper.sh	Thu Dec 04 10:53:23 2014 -0500
@@ -19,7 +19,21 @@
 cp $dir/script.js $outputDir
 cp $dir/jquery-1.11.0.min.js $outputDir
 samples=`cat $outputDir/samples.txt`
-echo "<html><center><h1><a href='index.html'>Click here for the results</a></h1>Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)</center></html>" > $2
+echo "<html><center><h1><a href='index.html'>Click here for the results</a></h1>Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)<br />" > $2
+echo "<table border = 1>" >> $2
+echo "<thead><tr><th>Sample/Replicate</th><th>All</th><th>Productive</th><th>Unique Productive</th><th>Unproductive</th><th>Unique Unproductive</th></tr></thead>" >> $2
+while IFS=, read sample all productive perc_prod productive_unique perc_prod_un unproductive perc_unprod unproductive_unique perc_unprod_un
+	do
+		echo "<tr><td>$sample</td>" >> $2
+		echo "<td>$all</td>" >> $2
+		echo "<td>$productive (%${perc_prod})</td>" >> $2
+		echo "<td>$productive_unique (%${perc_prod_un})</td>" >> $2
+		echo "<td>$unproductive (%${perc_unprod})</td>" >> $2
+		echo "<td>$unproductive_unique (%${perc_unprod_un})</td></tr>" >> $2
+done < $outputDir/productive_counting.txt
+echo "</table border></center></html>" >> $2
+
+echo "productive_counting.txt"
 echo "<html><head><title>Report on:" >> $outputFile
 for sample in $samples; do
 	echo " $sample" >> $outputFile