diff heatmap.sh @ 41:8acca16f3921 draft

Uploaded
author insilico-bob
date Tue, 28 Jan 2020 15:32:19 -0500
parents 8f8ab332a050
children 2f57ac512f46
line wrap: on
line diff
--- a/heatmap.sh	Thu Jun 20 11:39:46 2019 -0400
+++ b/heatmap.sh	Tue Jan 28 15:32:19 2020 -0500
@@ -42,11 +42,17 @@
 	if [ $ctr -gt 1 ]
 	then
 		currParm=$(cut -d'|' -f1 <<< $i)
-		if [ $currParm != "matrix_files" ] && [ $currParm != "row_configuration" ] && [ $currParm != "col_configuration" ] && [ $currParm != "classification" ]
+		if [ $currParm != "matrix_files" ] && [ $currParm != "row_configuration" ] && [ $currParm != "col_configuration" ] && [ $currParm != "classification" ] && [ $currParm != "chm_name" ]
 		then
 			#Parse pipe-delimited parameter parameter
 			parmJson=$parmJson' "'$(cut -d'|' -f1 <<< $i)'":"'$(cut -d'|' -f2 <<< $i)'",'
 	  	fi
+		if [ $currParm = "chm_name" ]
+		then
+			currVal=$(cut -d'|' -f2 <<< $i)
+			currEdit=$(echo "$currVal"  | sed 's/\//_/g')		
+			parmJson=$parmJson' "'$(cut -d'|' -f1 <<< $i)'":"'$currEdit'",'
+	  	fi
 		if [ $currParm = "row_configuration" ]
 		then
 			rowOrder=$(cut -d'|' -f3 <<< $i)
@@ -108,7 +114,11 @@
 	then
 		classIter=$((classIter+1))
 		#Parse pipe-delimited 3-part classification bar parameter
-		classJson=$classJson' {"'$(cut -d'|' -f2 <<< $i)'":"'$(cut -d'|' -f3 <<< $i)'","'$(cut -d'|' -f4 <<< $i)'":"'$(cut -d'|' -f5 <<< $i)'"'
+		className=$(cut -d'|' -f3 <<< $i)
+		if [[ -z "$className" ]]; then
+		   className="covar"$classIter
+		fi
+		classJson=$classJson' {"'$(cut -d'|' -f2 <<< $i)'":"'$className'","'$(cut -d'|' -f4 <<< $i)'":"'$(cut -d'|' -f5 <<< $i)'"'
 		classCat=$(cut -d'|' -f7 <<< $i)
 		classColorType=$(cut -d'_' -f2 <<< $classCat)
 		classJson=$classJson','
@@ -135,8 +145,11 @@
   if [ `echo "$output" | grep -c "Inf in foreign function call"` -gt 0 ]
   then
     echo "";
-    echo "Note: This error can occur when there is no variation in a row or column.  Try a different distance measure or remove rows/columns without variation.";
-    echo "This error may also be caused when a covariate file has inadvertently been selected as an Input Matrix.  Check your Input Matrix entry.";
+    echo "R CLUSTERING: Error in clustering the matrix provided (View Details - stdout).   "
+    echo "Note: This error can occur when:"
+    echo "   1. There is invalid numeric data in the matrix provided. Try using Matrix Manipulation tools to fix invalid data.";
+    echo "   2. There is no variation in a row or column in the matrix.  Try a different distance measure or remove rows/columns without variation using Matrix Manipulation tools.";
+    echo "   3. A covariate file has inadvertently been selected as an Input Matrix.  Check your Input Matrix entry.";
   fi
   exit $rc;
 fi