about summary refs log tree commit diff
path: root/sourcecodes/layout_cyto.php
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-09-28 14:48:57 +0000
committerPjotr <wrk@bosa.lan>2026-09-28 14:51:45 +0000
commit7f460113cc9c7eca91935549c25d78a9393e0977 (patch)
treee9a05e98fdaf571cd15975c6a1e3e73727b84bf2 /sourcecodes/layout_cyto.php
parent8380798b1c60c9844b9952921a8a7361e2fb28cd (diff)
downloadgn-bnw-7f460113cc9c7eca91935549c25d78a9393e0977.tar.gz
container: deployment fixes for the Guix container/VM
Changes previously carried as bnw-container-paths.patch in
guix-bioinformatics, now applied to the source directly:

* unify data directories on /var/lib/genenet/bnw (was /tmp/bnw and
  ./data/ mixed)
* make the shell_exec paths __DIR__-relative and the example/octave
  helper scripts location-independent, so php-fpm can run them from
  any working directory
* use core-octave randn/exp instead of the statistics-package
  normrnd/normpdf (not available in the container's octave)
* nnodes: strtrim before strfind so the node count parses with the
  container's octave output
* python3 instead of a hardcoded /home/jziebart path
* add diag.php, a debug page showing the request and data state
* bn_genenet.php: serve the GeneNetwork (GN2) handshake server-side;
  the My_Gennenet POST is converted (commas -> tabs, semicolons ->
  newlines) in PHP and the prepared-data page is returned in ONE
  request.  This removes the raw-echo of  into a JavaScript
  string (an XSS hole on public deployments) and is backward
  compatible for GN2 (same POST, better response).
Diffstat (limited to 'sourcecodes/layout_cyto.php')
-rw-r--r--sourcecodes/layout_cyto.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/sourcecodes/layout_cyto.php b/sourcecodes/layout_cyto.php
index 0e512345..961179ff 100644
--- a/sourcecodes/layout_cyto.php
+++ b/sourcecodes/layout_cyto.php
@@ -17,15 +17,15 @@ include("header_new.inc");
 include("input_validate.php");
 $keyval=valid_keyval($_GET["My_key"]);
 
-$dir="./data/";
-//In this case, $dir is used by the json command so it is interpreted and turned into /tmp/bnw/ automatically
-//$dir="/tmp/bnw/";
+$dir="/var/lib/genenet/bnw/";
+//In this case, $dir is used by the json command so it is interpreted and turned into /var/lib/genenet/bnw/ automatically
+//$dir="/var/lib/genenet/bnw/";
 
 $input_json=$dir.$keyval."network.json";
 $output_png=$keyval."modified_network.png";
 
-//In this section, $dir is used by php, so we need to use /tmp/bnw
-$thrfile="/tmp/bnw/".$keyval."thr.txt";
+//In this section, $dir is used by php, so we need to use /var/lib/genenet/bnw
+$thrfile="/var/lib/genenet/bnw/".$keyval."thr.txt";
 if(file_exists($thrfile))
   {
     $thr=file_get_contents("$thrfile");
@@ -368,7 +368,7 @@ $('#pos_slide').change(function (e) {
  <li><a id="addEdge" href="#">Add edge between selected nodes</a></li>
     <li><a id="deleteEdge" href="#">Remove selected edges</a></li>
 <?php
-    $filename1="/tmp/bnw/".$keyval."structure_input_temp.txt";
+    $filename1="/var/lib/genenet/bnw/".$keyval."structure_input_temp.txt";
 if(file_exists($filename1))
   {?>
  <li><a id="weightFilter" href="#">Filter edges by weight:</a>