Mercurial > repos > md-anderson-bioinformatics > heat_map_creation_advanced
comparison heatmap_advanced.sh @ 7:c5489978071a draft
Uploaded
author | insilico-bob |
---|---|
date | Tue, 28 Jan 2020 15:33:09 -0500 |
parents | 1f13d304ddbd |
children | c1be063b2454 |
comparison
equal
deleted
inserted
replaced
6:1f13d304ddbd | 7:c5489978071a |
---|---|
57 ctr=0 | 57 ctr=0 |
58 for i in "$@"; do | 58 for i in "$@"; do |
59 if [ $ctr -gt 1 ] | 59 if [ $ctr -gt 1 ] |
60 then | 60 then |
61 currParm=$(cut -d'|' -f1 <<< $i) | 61 currParm=$(cut -d'|' -f1 <<< $i) |
62 if [ $currParm != "matrix_files" ] && [ $currParm != "row_configuration" ] && [ $currParm != "col_configuration" ] && [ $currParm != "classification" ] && [ $currParm != "attribute" ] | 62 if [ $currParm != "matrix_files" ] && [ $currParm != "row_configuration" ] && [ $currParm != "col_configuration" ] && [ $currParm != "classification" ] && [ $currParm != "attribute" ] && [ $currParm != "chm_name" ] |
63 then | 63 then |
64 #Parse pipe-delimited parameter parameter | 64 #Parse pipe-delimited parameter parameter |
65 parmJson=$parmJson' "'$(cut -d'|' -f1 <<< $i)'":"'$(cut -d'|' -f2 <<< $i)'",' | 65 parmJson=$parmJson' "'$(cut -d'|' -f1 <<< $i)'":"'$(cut -d'|' -f2 <<< $i)'",' |
66 fi | |
67 if [ $currParm = "chm_name" ] | |
68 then | |
69 currVal=$(cut -d'|' -f2 <<< $i) | |
70 currEdit=$(echo "$currVal" | sed 's/\//_/g') | |
71 parmJson=$parmJson' "'$(cut -d'|' -f1 <<< $i)'":"'$currEdit'",' | |
66 fi | 72 fi |
67 if [ $currParm = "row_configuration" ] | 73 if [ $currParm = "row_configuration" ] |
68 then | 74 then |
69 rowOrder=$(cut -d'|' -f3 <<< $i) | 75 rowOrder=$(cut -d'|' -f3 <<< $i) |
70 rowDistance=$(cut -d'|' -f5 <<< $i) | 76 rowDistance=$(cut -d'|' -f5 <<< $i) |
316 if [ $currParm = "classification" ] | 322 if [ $currParm = "classification" ] |
317 then | 323 then |
318 classIter=$((classIter+1)) | 324 classIter=$((classIter+1)) |
319 className=$(cut -d'|' -f3 <<< $i) | 325 className=$(cut -d'|' -f3 <<< $i) |
320 #Parse pipe-delimited 3-part classification bar parameter | 326 #Parse pipe-delimited 3-part classification bar parameter |
321 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)'"' | 327 if [[ -z "$className" ]]; then |
328 className="covar"$classIter | |
329 fi | |
330 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)'"' | |
322 classCat=$(cut -d'|' -f7 <<< $i) | 331 classCat=$(cut -d'|' -f7 <<< $i) |
323 classColorType=$(cut -d'_' -f2 <<< $classCat) | 332 classColorType=$(cut -d'_' -f2 <<< $classCat) |
324 classJson=$classJson',' | 333 classJson=$classJson',' |
325 classHeight=$(cut -d'|' -f11 <<< $i) | 334 classHeight=$(cut -d'|' -f11 <<< $i) |
326 heightErrorVal=0 | 335 heightErrorVal=0 |
355 then | 364 then |
356 echo $output; | 365 echo $output; |
357 if [ `echo "$output" | grep -c "Inf in foreign function call"` -gt 0 ] | 366 if [ `echo "$output" | grep -c "Inf in foreign function call"` -gt 0 ] |
358 then | 367 then |
359 echo ""; | 368 echo ""; |
360 echo "NOTE 1: This error can occur when a covariate file has inadvertently been selected as an Input Matrix. Check your Input Matrix entry."; | 369 echo ""; |
361 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."; | 370 echo "R CLUSTERING: Error in clustering the matrix provided (View Details stdout). " |
371 echo "Note: This error can occur when:" | |
372 echo " 1. There is invalid numeric data in the matrix provided. Try using Matrix Manipulation tools to fix invalid data."; | |
373 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."; | |
374 echo " 3. A covariate file has inadvertently been selected as an Input Matrix. Check your Input Matrix entry."; | |
362 fi | 375 fi |
363 exit $rc; | 376 exit $rc; |
364 fi | 377 fi |
365 | 378 |
366 #Call java program to generate NGCHM viewer files. | 379 #Call java program to generate NGCHM viewer files. |