Mercurial > repos > md-anderson-bioinformatics > heat_map_creation
comparison heatmap.sh @ 41:8acca16f3921 draft
Uploaded
author | insilico-bob |
---|---|
date | Tue, 28 Jan 2020 15:32:19 -0500 |
parents | 8f8ab332a050 |
children | 2f57ac512f46 |
comparison
equal
deleted
inserted
replaced
40:8f8ab332a050 | 41:8acca16f3921 |
---|---|
40 ctr=0 | 40 ctr=0 |
41 for i in "$@"; do | 41 for i in "$@"; do |
42 if [ $ctr -gt 1 ] | 42 if [ $ctr -gt 1 ] |
43 then | 43 then |
44 currParm=$(cut -d'|' -f1 <<< $i) | 44 currParm=$(cut -d'|' -f1 <<< $i) |
45 if [ $currParm != "matrix_files" ] && [ $currParm != "row_configuration" ] && [ $currParm != "col_configuration" ] && [ $currParm != "classification" ] | 45 if [ $currParm != "matrix_files" ] && [ $currParm != "row_configuration" ] && [ $currParm != "col_configuration" ] && [ $currParm != "classification" ] && [ $currParm != "chm_name" ] |
46 then | 46 then |
47 #Parse pipe-delimited parameter parameter | 47 #Parse pipe-delimited parameter parameter |
48 parmJson=$parmJson' "'$(cut -d'|' -f1 <<< $i)'":"'$(cut -d'|' -f2 <<< $i)'",' | 48 parmJson=$parmJson' "'$(cut -d'|' -f1 <<< $i)'":"'$(cut -d'|' -f2 <<< $i)'",' |
49 fi | |
50 if [ $currParm = "chm_name" ] | |
51 then | |
52 currVal=$(cut -d'|' -f2 <<< $i) | |
53 currEdit=$(echo "$currVal" | sed 's/\//_/g') | |
54 parmJson=$parmJson' "'$(cut -d'|' -f1 <<< $i)'":"'$currEdit'",' | |
49 fi | 55 fi |
50 if [ $currParm = "row_configuration" ] | 56 if [ $currParm = "row_configuration" ] |
51 then | 57 then |
52 rowOrder=$(cut -d'|' -f3 <<< $i) | 58 rowOrder=$(cut -d'|' -f3 <<< $i) |
53 rowDistance=$(cut -d'|' -f5 <<< $i) | 59 rowDistance=$(cut -d'|' -f5 <<< $i) |
106 currParm=$(cut -d'|' -f1 <<< $i) | 112 currParm=$(cut -d'|' -f1 <<< $i) |
107 if [ $currParm = "classification" ] | 113 if [ $currParm = "classification" ] |
108 then | 114 then |
109 classIter=$((classIter+1)) | 115 classIter=$((classIter+1)) |
110 #Parse pipe-delimited 3-part classification bar parameter | 116 #Parse pipe-delimited 3-part classification bar parameter |
111 classJson=$classJson' {"'$(cut -d'|' -f2 <<< $i)'":"'$(cut -d'|' -f3 <<< $i)'","'$(cut -d'|' -f4 <<< $i)'":"'$(cut -d'|' -f5 <<< $i)'"' | 117 className=$(cut -d'|' -f3 <<< $i) |
118 if [[ -z "$className" ]]; then | |
119 className="covar"$classIter | |
120 fi | |
121 classJson=$classJson' {"'$(cut -d'|' -f2 <<< $i)'":"'$className'","'$(cut -d'|' -f4 <<< $i)'":"'$(cut -d'|' -f5 <<< $i)'"' | |
112 classCat=$(cut -d'|' -f7 <<< $i) | 122 classCat=$(cut -d'|' -f7 <<< $i) |
113 classColorType=$(cut -d'_' -f2 <<< $classCat) | 123 classColorType=$(cut -d'_' -f2 <<< $classCat) |
114 classJson=$classJson',' | 124 classJson=$classJson',' |
115 classJson=$classJson' "position":"'$(cut -d'_' -f1 <<< $classCat)'","color_map": {"type":"'$classColorType'"}}' | 125 classJson=$classJson' "position":"'$(cut -d'_' -f1 <<< $classCat)'","color_map": {"type":"'$classColorType'"}}' |
116 if [ $classIter -lt $classSize ] | 126 if [ $classIter -lt $classSize ] |
133 then | 143 then |
134 echo $output; | 144 echo $output; |
135 if [ `echo "$output" | grep -c "Inf in foreign function call"` -gt 0 ] | 145 if [ `echo "$output" | grep -c "Inf in foreign function call"` -gt 0 ] |
136 then | 146 then |
137 echo ""; | 147 echo ""; |
138 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."; | 148 echo "R CLUSTERING: Error in clustering the matrix provided (View Details - stdout). " |
139 echo "This error may also be caused when a covariate file has inadvertently been selected as an Input Matrix. Check your Input Matrix entry."; | 149 echo "Note: This error can occur when:" |
150 echo " 1. There is invalid numeric data in the matrix provided. Try using Matrix Manipulation tools to fix invalid data."; | |
151 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."; | |
152 echo " 3. A covariate file has inadvertently been selected as an Input Matrix. Check your Input Matrix entry."; | |
140 fi | 153 fi |
141 exit $rc; | 154 exit $rc; |
142 fi | 155 fi |
143 | 156 |
144 #call java program to generate NGCHM viewer files. | 157 #call java program to generate NGCHM viewer files. |