Mercurial > repos > md-anderson-bioinformatics > heat_map_creation_advanced
changeset 7:c5489978071a draft
Uploaded
author | insilico-bob |
---|---|
date | Tue, 28 Jan 2020 15:33:09 -0500 |
parents | 1f13d304ddbd |
children | c1be063b2454 |
files | GalaxyMapGen.jar heatmap_advanced.sh mda_advanced_heatmap_gen.xml mda_heatmap_viz.zip |
diffstat | 4 files changed, 56 insertions(+), 40 deletions(-) [+] |
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
--- a/mda_advanced_heatmap_gen.xml Thu Jun 20 11:36:53 2019 -0400 +++ b/mda_advanced_heatmap_gen.xml Tue Jan 28 15:33:09 2020 -0500 @@ -26,14 +26,12 @@ <repeat name="matrices" title="Heat Map Matrices"> <param name="dataLayer" type="data" format="Tabular" label="Input Data Matrix" help="Tab delimited text file with row labels, column labels, and data."/> <param name="dataLayerName" size="40" type="text" value="Data_Layer_name" label="Data Layer Name" help="Name for data layer (no spaces)."> - <sanitizer> - <valid> - <add preset="string.printable"/> + <sanitizer> + <valid initial="string.printable"> <remove value="""/> <remove value="'"/> - <remove value=" "/> </valid> - </sanitizer> + </sanitizer> </param> <param name="summarymethod" type="select" label="Data Summarization Method" help="For large matrices, the selected method is used to aggregate data values in the summary view."> <option value="average">Average</option> @@ -73,23 +71,19 @@ </param> </repeat> <param name="hmname" size="40" type="text" value="Heat_Map_name" label="Heat Map Name" help="Short Name for heat map (no spaces)."/> - <sanitizer> - <valid> - <add preset="string.printable"/> + <sanitizer> + <valid initial="string.printable"> <remove value="""/> <remove value="'"/> - <remove value=" "/> </valid> - </sanitizer> + </sanitizer> <param name="hmdesc" size="100" optional="true" type="text" value="Heat_Map_description" label="Heat Map Description" help="Longer description of the heat map contents."/> - <sanitizer> - <valid> - <add preset="string.printable"/> + <sanitizer> + <valid initial="string.printable"> <remove value="""/> <remove value="'"/> - <remove value=" "/> </valid> - </sanitizer> + </sanitizer> <param name="summaryDisplayWidth" type="select" label="Summary Display Width %" help="Sets the percentage of the viewer display of the summary panel."> <option value="50">50%</option> <option value="10">10%</option> @@ -183,6 +177,8 @@ <param name="rowDistanceMeasure" type="text" size="0" hidden="true" value="n/a"/> <param name="rowAgglomerationMethod" type="text" size="0" hidden="true" value="n/a"/> <param name="rowDendroCut" type="text" size="0" hidden="true" value="0"/> + <param name="rowDendroShow" type="text" size="0" hidden="true" value="ALL"/> + <param name="rowDendroHeight" type="text" size="0" hidden="true" value="0"/> <conditional name="rcutrows"> <param name="raddcuts" type="select" label="Add row gap(s)" help="To separate portions of the heat map with gaps, select a gap method."> <option value="none">None</option> @@ -200,6 +196,8 @@ <param name="rowDistanceMeasure" type="text" size="0" hidden="true" value="n/a"/> <param name="rowAgglomerationMethod" type="text" size="0" hidden="true" value="n/a"/> <param name="rowDendroCut" type="text" size="0" hidden="true" value="0"/> + <param name="rowDendroShow" type="text" size="0" hidden="true" value="ALL"/> + <param name="rowDendroHeight" type="text" size="0" hidden="true" value="0"/> <conditional name="rcutrows"> <param name="raddcuts" type="select" label="Add row gap(s)" help="To separate portions of the heat map with gaps, select a gap method."> <option value="none">None</option> @@ -318,6 +316,8 @@ <param name="columnDistanceMeasure" type="text" size="0" hidden="true" value="n/a"/> <param name="columnAgglomerationMethod" type="text" size="0" hidden="true" value="n/a"/> <param name="colDendroCut" type="text" size="0" hidden="true" value="0"/> + <param name="columnDendroShow" type="text" size="0" hidden="true" value="ALL"/> + <param name="columnDendroHeight" type="text" size="0" hidden="true" value="0"/> <conditional name="ccutrows"> <param name="caddcuts" type="select" label="Add column gap(s)" help="To separate portions of the heat map with gaps, select a gap method."> <option value="none">None</option> @@ -335,6 +335,8 @@ <param name="columnDistanceMeasure" type="text" size="0" hidden="true" value="n/a"/> <param name="columnAgglomerationMethod" type="text" size="0" hidden="true" value="n/a"/> <param name="colDendroCut" type="text" size="0" hidden="true" value="0"/> + <param name="columnDendroShow" type="text" size="0" hidden="true" value="ALL"/> + <param name="columnDendroHeight" type="text" size="0" hidden="true" value="0"/> <conditional name="ccutrows"> <param name="caddcuts" type="select" label="Add column gap(s)" help="To separate portions of the heat map with gaps, select a gap method."> <option value="none">None</option> @@ -373,17 +375,22 @@ </param> <repeat name="operations" title="Covariate Bars"> <param name="class_name" size="25" type="text" value="" label="Covariate Name" help="Covariate heat map display label."> - <sanitizer> - <valid> - <add preset="string.printable"/> + <sanitizer> + <valid initial="string.printable"> <remove value="""/> <remove value="'"/> - <remove value=" "/> </valid> - </sanitizer> + </sanitizer> + </param> + <param name="repeatinput" type="data" format="Tabular" label="Covariate File" help="Tab delimited text file with row or column label and covariate value on each line."/> + <param name="classHeight" size="10" type="text" value="15" label="Covariate Display Height" help="Set the display height for column covariates and width for row covariates."> + <sanitizer> + <valid initial="string.digits"> + <remove value="""/> + <remove value="'"/> + </valid> + </sanitizer> </param> - <param name="repeatinput" type="data" format="Tabular" label="Covariate File" help="Tab delimited text file with row or column label and covariate value on each line."/> - <param name="classHeight" size="10" type="text" value="15" label="Covariate Display Height" help="Set the display height for column covariates and width for row covariates."/> <conditional name="cattype"> <param name="cat" type="select" label="Covariate Type" help="Identify the covariate as belonging to rows or columns and containing categorical or continuous values."> <option value="row_discrete" >Row Categorical</option> @@ -459,24 +466,20 @@ </repeat> <repeat name="hm_attribute" title="Heat Map Attributes"> <param name="attrbute_key" size="50" type="text" value="" label="Heat Map Attribute Key" help="For map level attributes. Enter the key (no spaces)."> - <sanitizer invalid_char="_"> - <valid initial=""> - <add preset="string.letters"/> - <add preset="string.digits"/> + <sanitizer> + <valid initial="string.printable"> + <remove value="""/> + <remove value="'"/> </valid> - <mapping initial=""> - </mapping> - </sanitizer> + </sanitizer> </param> <param name="attrbute_value" size="50" type="text" label="Heat Map Attributes Value" help="For map level attributes. Enter the value (no spaces)."> - <sanitizer invalid_char="_"> - <valid initial=""> - <add preset="string.letters"/> - <add preset="string.digits"/> + <sanitizer> + <valid initial="string.printable"> + <remove value="""/> + <remove value="'"/> </valid> - <mapping initial=""> - </mapping> - </sanitizer> + </sanitizer> </param> </repeat> </inputs>