7
|
1 #!/bin/bash
|
|
2
|
|
3 newsign=$1
|
|
4 html=$2
|
|
5 ref=$3
|
|
6
|
|
7 output_dir=${html%%.*}_files
|
|
8
|
|
9 matrix=${newsign%.*}_files/NMF/Files/MatrixW-Normto100.txt
|
|
10
|
|
11 mkdir $output_dir
|
|
12
|
|
13 Rscript --no-save $SCRIPT_PATH/R/compareSignature_Galaxy.r $ref $matrix $output_dir 2>&1
|
|
14
|
|
15 # Convert the image into png format
|
|
16 cd $output_dir
|
|
17
|
|
18 echo "<html><body>" >> $html
|
|
19 echo "<center> <h2> Cosine similarity comparison </h2> </center>" >> $html
|
|
20
|
|
21 echo "<table>" >> $html
|
|
22 echo "<tr> <td> <center> <br/> <a href="Similarity_Matrix.txt">Similarity_Matrix.txt</a> </center> </td> </tr>" >> $html
|
|
23 echo "<tr>" >> $html
|
|
24 echo "<td><a href="Similarity_Matrix.png">" >> $html
|
|
25 echo "<img width="1000" src="Similarity_Matrix.png" /></a></td>" >> $html
|
|
26 echo "</tr>" >> $html
|
|
27 echo "</table>" >> $html
|
|
28
|
|
29 exit 0
|