Mercurial > repos > md-anderson-bioinformatics > heat_map_creation_advanced
diff heatmap_advanced.sh @ 1:603f99d9e776 draft
Version 2.2.1 embedded viewer
author | insilico-bob |
---|---|
date | Tue, 05 Dec 2017 14:59:26 -0500 |
parents | 8893ea2915cc |
children | 19382473a76b |
line wrap: on
line diff
--- a/heatmap_advanced.sh Tue Aug 08 14:01:05 2017 -0400 +++ b/heatmap_advanced.sh Tue Dec 05 14:59:26 2017 -0500 @@ -1,21 +1,35 @@ -echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} - -#run python to validate the input matrix and covariate files (if any) -#output="$(python ${11}/mda_heatmap_gen.py $@)" -output=$(python ${11}/mda_heatmap_gen.py "$@") -rc=$?; -echo $output; -if [ $rc != 0 ] -then - exit $rc; -fi +#echo "1: " $1 +#echo "2: " $2 +#echo "3: " $3 +#echo "4: " $4 +#echo "5: " $5 +#echo "6: " $6 +#echo "7: " $7 +#echo "8: " $8 +#echo "9: " $9 +#echo "10: " ${10} +#echo "11: " ${11} +#echo "12: " ${12} +#echo "13: " ${13} +#echo "14: " ${14} +#echo "15: " ${15} +#echo "16: " ${16} +#echo "17: " ${17} +#echo "18: " ${18} +#echo "19: " ${19} +#echo "20: " ${20} +#echo "21: " ${21} +#echo "22: " ${22} +#echo "23: " ${23} +#echo "23: " ${24} +#echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23} #create temp directory for row and col order and dendro files. -tdir=${11}/$(date +%y%m%d%M%S) +tdir=${12}/$(date +%y%m%d%M%S) echo $tdir mkdir $tdir #run R to cluster matrix -output="$(R --slave --vanilla --file=${11}/CHM_Advanced.R --args $3 $4 $5 $6 $7 $8 $9 $tdir/ROfile.txt $tdir/COfile.txt $tdir/RDfile.txt $tdir/CDfile.txt ${12} ${13} ${14} ${15} 2>&1)" +output="$(R --slave --vanilla --file=${12}/CHM_Advanced.R --args $4 $5 $6 $7 $8 $9 ${10} $tdir/ROfile.txt $tdir/COfile.txt $tdir/RDfile.txt $tdir/CDfile.txt ${13} ${14} ${15} ${16} 2>&1)" rc=$?; if [ $rc != 0 ] then @@ -24,35 +38,39 @@ 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."; fi exit $rc; fi - + #there are a variable number of triplicate parameters for classification bars count=0 classifications='' #if row cut was done, add that autogenerated classification -if [ ${12} -gt 1 ] +if [ ${13} -gt 1 ] then - classifications="Class $tdir/ROfile.txt.cut row_categorical" + classifications="Class $tdir/ROfile.txt.cut row_categorical color_plot" fi #if col cut was done, add that autogenerated classification -if [ ${13} -gt 1 ] +if [ ${14} -gt 1 ] then - classifications="$classifications Class $tdir/COfile.txt.cut col_categorical" + classifications="$classifications Class $tdir/COfile.txt.cut col_categorical color_plot" fi #now add the user provided classification files for i in "$@"; do - if [ $count -gt 15 ] + if [ $count -gt 20 ] then +# echo "class entry: " $i classifications=$classifications' '$i fi count=$((count+1)) done +#echo "classifications: " $classifications + #call java program to generate NGCHM viewer files. -java -jar ${11}/GalaxyMapGen.jar "${1}" "${2}" DataLayer1 $3 linear ${14} ${15} $4 $5 $6 $tdir/ROfile.txt $tdir/RDfile.txt $7 $8 $9 $tdir/COfile.txt $tdir/CDfile.txt ${10} "${16}" $classifications +java -jar ${12}/GalaxyMapGen.jar "${1}" "${2}" "${3}" DataLayer1 $4 linear ${15} ${16} $5 $6 $7 $tdir/ROfile.txt $tdir/RDfile.txt "${17}" "${19}" $8 $9 ${10} $tdir/COfile.txt $tdir/CDfile.txt "${18}" "${20}" ${11} "${21}" $classifications #clean up tempdir rm -rf $tdir