From 25b843f6bbacb1937bdb960777b73acbece64115 Mon Sep 17 00:00:00 2001
From: ziejd2
Date: Wed, 24 Feb 2021 14:36:59 -0600
Subject: GENENET8 update
---
sourcecodes/network_layout_inv_example.php | 666 -----------------------------
1 file changed, 666 deletions(-)
delete mode 100644 sourcecodes/network_layout_inv_example.php
(limited to 'sourcecodes/network_layout_inv_example.php')
diff --git a/sourcecodes/network_layout_inv_example.php b/sourcecodes/network_layout_inv_example.php
deleted file mode 100644
index 076832b6..00000000
--- a/sourcecodes/network_layout_inv_example.php
+++ /dev/null
@@ -1,666 +0,0 @@
-
-
Error: Unable to display your network structure.
-
-5 && $node<=7)
-{
- $width=150;
- $height=120;
- $font=12;
-
-}
-else if($node>7 && $node<=10)
-{
- $width=110;
- $height=85;
- $font=10;
-}
-else
-{
- $width=80;
- $height=60;
- $font=8;
-}
-*/
- $width=150;
- $height=150;
- $font=12;
-
-$r_index=$node+2;
-
-for($i=0;$i<$node;$i++)
-{
-$datamat=explode("\t",$str_arrmat[$r_index]);
-$data_read[$i][0]=trim($datamat[0]); //name
-$data_read[$i][1]=trim($datamat[1]); //datatype
-$col_in=2;
-$r_index+=4;
- if($datamat[1]==1) //type=coninuous
- {
- for($j=1;$j<=101;$j++)
- {
- $datamat=explode("\t",$str_arrmat[$r_index]);
- $data_read[$i][$col_in]=trim($datamat[0]); //x data
- // echo $data_read[$i][$col_in];
- // echo ' ';
-
- $col_in++;
- $data_read[$i][$col_in]=trim($datamat[1]); //y data
- // echo $data_read[$i][$col_in];
- // echo ' ';
-
- $col_in++;
- $r_index++; // increment to point next data
- // echo "
";
- }
- }
- if($datamat[1]>1) //type=descrete
- {
- $iter=$datamat[1];
- for($j=1;$j<=$iter;$j++)
- {
- $datamat=explode("\t",$str_arrmat[$r_index]);
- $data_read[$i][$col_in]=trim($datamat[0]); //x data
- $data_read[$i][$col_in]=levelmap($data_read[$i][$col_in],$data_read[$i][0],$levelmap);
-
- // echo $data_read[$i][$col_in];
- // echo ' ';
-
- $col_in++;
- $data_read[$i][$col_in]=trim($datamat[1]); //y data
- // echo $data_read[$i][$col_in];
- //echo ' ';
-
- $col_in++;
- $r_index++; // increment to point next data
- //echo "
";
- }
- }
-
-}
-
-
-
-
-////////////////////////////////////////////////Graphviz data read////////////////////////////////////////////////////////////////////////////////
-$grv=$dir.$keyval."graphviz.txt";
-$line=shell_exec('/usr/bin/dot -Tplain -y '.$grv);
-
-
-//$grfilename=$keyval."graphviz.txt";
-//$cmd="/usr/bin/dot -Tplain -y $grfilename";
-//$line=system($cmd);
-
-
-//shell_exec('/usr/bin/dot -Tpng -o /var/www/html/compbio/BNW/graphviz.png /var/www/html/compbio/BNW/graphviz.txt');
-$str_arrname=array();
-$str_arrname=explode("\n",$line);
-$data=array();
-$ID_data=array();
-$i=0;
-$ii=0;
-foreach($str_arrname as $row)
-{
- $i++;
- if($i>1)
- {
-
- $data=explode(" ",$row);
- $j=0;
- $k=0;
- $flag=0;
- foreach($data as $cell)
- {
-
- $j++;
-
- $cell=trim($cell);
- //echo $cell;
- //echo ' ';
- if($j==1 && $cell=="node")
- {
- $flag=1;
- }
-
- if($j>1 && $j<5 && $flag==1)
- {
- //echo $cell;
- //echo ' ';
- if($j==2)
- $ID_data[$ii][$k]=$cell;
- else
- $ID_data[$ii][$k]=round($cell/10*900);
- // echo $ID_data[$ii][$k];
- //echo ' ';
-
- $k++;
- }
- }
-
- if($flag==1)
- {
- $ID_data[$ii][3]=$ID_data[$ii][1]+100;
- $ID_data[$ii][4]=$ID_data[$ii][2]+150;
- $ID_data[$ii][5]=$ID_data[$ii][1]+100;
- $ID_data[$ii][6]=$ID_data[$ii][2];
- $ii++;
- //echo "
";
- }
- // echo "
";
-
- }
-}
-
-$nnode=$ii;
-$edge_data=array();
-
-$i=0;
-$ii=0;
-
-foreach($str_arrname as $row)
-{
- $i++;
- if($i>1)
- {
-
- $data=explode(" ",$row);
- $j=0;
-
- $flag=0;
- $number_of_point=0;
- $index=0;
- foreach($data as $cell)
- {
- $j++;
- $cell=trim($cell);
-
- if($j==1 && $cell=="edge")
- {
- $flag=1;
- }
-
- if($j==2 && $flag==1)
- {
-
- for($k=0;$k<$nnode;$k++)
- {
- if($cell==$ID_data[$k][0])
- {
- $edge_data[$ii][0]=$ID_data[$k][3];
- $edge_data[$ii][1]=$ID_data[$k][4];
- }
-
- }
-
- }
- else if($j==3 && $flag==1)
- {
- for($k=0;$k<$nnode;$k++)
- {
- if($cell==$ID_data[$k][0])
- {
- $edge_data[$ii][2]=$ID_data[$k][5];
- $edge_data[$ii][3]=$ID_data[$k][6];
- }
-
- }
-
- }
- else if($j==4 && $flag==1)
- {
- $edge_data[$ii][4]=$cell;
- $number_of_point=$cell*2;
- $index=5;
- }
- else if($j>4 && $number_of_point>0 && $flag==1)
- {
- if(($j%2)!=0)
- $edge_data[$ii][$index]=round($cell/10*900)+60;//+30+30;
- else
- $edge_data[$ii][$index]=round($cell/10*900)+48;//+18+30;
-
- $number_of_point--;
- $index++;
- }
-
-
-
- }
- if($flag==1)
- {
- $ii++;
- //echo "
";
- }
-
- }
-}
-
-
-$nedges=$ii;
-
-?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
cgit 1.4.1