diff heatmap_advanced.sh @ 7:c5489978071a draft

Uploaded
author insilico-bob
date Tue, 28 Jan 2020 15:33:09 -0500
parents 1f13d304ddbd
children c1be063b2454
line wrap: on
line diff
--- a/heatmap_advanced.sh	Thu Jun 20 11:36:53 2019 -0400
+++ b/heatmap_advanced.sh	Tue Jan 28 15:33:09 2020 -0500
@@ -59,11 +59,17 @@
 	if [ $ctr -gt 1 ]
 	then
 		currParm=$(cut -d'|' -f1 <<< $i)
-		if [ $currParm != "matrix_files" ] && [ $currParm != "row_configuration" ] && [ $currParm != "col_configuration" ] && [ $currParm != "classification" ] && [ $currParm != "attribute" ]
+		if [ $currParm != "matrix_files" ] && [ $currParm != "row_configuration" ] && [ $currParm != "col_configuration" ] && [ $currParm != "classification" ] && [ $currParm != "attribute" ] && [ $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)
@@ -318,7 +324,10 @@
 		classIter=$((classIter+1))
 		className=$(cut -d'|' -f3 <<< $i)
 		#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)'","'$(cut -d'|' -f8 <<< $i)'":"'$(cut -d'|' -f9 <<< $i)'","'$(cut -d'|' -f12 <<< $i)'":"'$(cut -d'|' -f13 <<< $i)'","'$(cut -d'|' -f14 <<< $i)'":"'$(cut -d'|' -f15 <<< $i)'"'
+		if [[ -z "$className" ]]; then
+		   className="covar"$classIter
+		fi
+		classJson=$classJson' {"'$(cut -d'|' -f2 <<< $i)'":"'$className'","'$(cut -d'|' -f4 <<< $i)'":"'$(cut -d'|' -f5 <<< $i)'","'$(cut -d'|' -f8 <<< $i)'":"'$(cut -d'|' -f9 <<< $i)'","'$(cut -d'|' -f12 <<< $i)'":"'$(cut -d'|' -f13 <<< $i)'","'$(cut -d'|' -f14 <<< $i)'":"'$(cut -d'|' -f15 <<< $i)'"'
 		classCat=$(cut -d'|' -f7 <<< $i)
 		classColorType=$(cut -d'_' -f2 <<< $classCat)
 		classJson=$classJson','
@@ -357,8 +366,12 @@
   if [ `echo "$output" | grep -c "Inf in foreign function call"` -gt 0 ]
   then
     echo "";
-    echo "NOTE 1: This error can occur when a covariate file has inadvertently been selected as an Input Matrix.  Check your Input Matrix entry.";
-    echo "NOTE 2: This error can occur when there is no variation in a data rows or columns in the input matrix.  Try a different distance measure or remove rows/columns without variation.";
+    echo "";
+    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