diff report_clonality/r_wrapper.sh @ 40:106275b54470 draft

Uploaded
author davidvanzessen
date Tue, 30 May 2017 07:26:33 -0400
parents b6936fb52ab9
children 1d8728f3ff37
line wrap: on
line diff
--- a/report_clonality/r_wrapper.sh	Mon Apr 24 09:39:59 2017 -0400
+++ b/report_clonality/r_wrapper.sh	Tue May 30 07:26:33 2017 -0400
@@ -42,10 +42,14 @@
 	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
+		if [[ "$productive" != "0" ]] ; then
+			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
+		else
+			echo "<td colspan='4' style='background-color: red;'>No productive sequences!</td>" >> $2
+		fi
 done < $outputDir/productive_counting.txt
 echo "</table><br />" >> $2
 echo "Table showing the number and percentage of (unique) productive and unproductive sequences per donor and per replicate. <br />" >> $2