comparison heatmap_advanced.sh @ 2:19382473a76b draft

Uploaded
author insilico-bob
date Thu, 08 Feb 2018 14:47:49 -0500
parents 603f99d9e776
children 1f13d304ddbd
comparison
equal deleted inserted replaced
1:603f99d9e776 2:19382473a76b
22 #echo "22: " ${22} 22 #echo "22: " ${22}
23 #echo "23: " ${23} 23 #echo "23: " ${23}
24 #echo "23: " ${24} 24 #echo "23: " ${24}
25 #echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23} 25 #echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} ${15} ${16} ${17} ${18} ${19} ${20} ${21} ${22} ${23}
26 26
27 #get tool data and tool install directories
28 tooldir=$(cut -d';' -f1 <<< ${12})
29 tooldata=$(cut -d';' -f2 <<< ${12})
30
27 #create temp directory for row and col order and dendro files. 31 #create temp directory for row and col order and dendro files.
28 tdir=${12}/$(date +%y%m%d%M%S) 32 tdir=$tooldata/$(date +%y%m%d%M%S)
29 echo $tdir 33 echo $tdir
30 mkdir $tdir 34 mkdir $tdir
31 #run R to cluster matrix 35 #run R to cluster matrix
32 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)" 36 output="$(R --slave --vanilla --file=$tooldir/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)"
33 rc=$?; 37 rc=$?;
34 if [ $rc != 0 ] 38 if [ $rc != 0 ]
35 then 39 then
36 echo $output; 40 echo $output;
37 if [ `echo "$output" | grep -c "Inf in foreign function call"` -gt 0 ] 41 if [ `echo "$output" | grep -c "Inf in foreign function call"` -gt 0 ]
69 count=$((count+1)) 73 count=$((count+1))
70 done 74 done
71 #echo "classifications: " $classifications 75 #echo "classifications: " $classifications
72 76
73 #call java program to generate NGCHM viewer files. 77 #call java program to generate NGCHM viewer files.
74 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 78 java -jar $tooldir/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
75 #clean up tempdir 79 #clean up tempdir
76 rm -rf $tdir 80 rm -rf $tdir