You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(267) |
Nov
(344) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(23) |
Feb
(15) |
Mar
(16) |
Apr
(388) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
From: <tw...@us...> - 2002-11-06 16:39:01
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv24056 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl edit_atree2.pl edit_atree1.html Log Message: Improved layout, new delete, edit UI Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.20 retrieving revision 1.1.2.21 diff -C2 -d -r1.1.2.20 -r1.1.2.21 *** analysis_tree_lib.pl 5 Nov 2002 21:14:45 -0000 1.1.2.20 --- analysis_tree_lib.pl 6 Nov 2002 16:38:58 -0000 1.1.2.21 *************** *** 294,298 **** } my $table_width = 75 * $tmax; ! $html = "<table width=\"$table_width\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">"; for(my $xx=0; $xx<=$#table; $xx++) { --- 294,298 ---- } my $table_width = 75 * $tmax; ! $html = "<table width=\"$table_width\" border=\"0\" cellpadding=\"0\" cellspacing=\"4\">"; for(my $xx=0; $xx<=$#table; $xx++) { *************** *** 316,328 **** $html .= " <td width=\"75\" bgcolor=\"$colors[$xx][$yy]\"> - <input type=\"radio\" name=\"node_number\" value=\"$node\"> <input type=\"hidden\" name=\"name_$node\" value=\"$tree[$node][0]\"> ! <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\"> ! <div align=\"center\">($node) $tree[$node][0]\n"; if ($node > 0) # UI prevents root deletion, and so does code in edit_atree2.pl { ! $html .="<input type=\"submit\" name=\"delete_$node\" value=\"Delete\">"; } ! $html .= "</div></td>\n"; } } --- 316,330 ---- $html .= " <td width=\"75\" bgcolor=\"$colors[$xx][$yy]\"> <input type=\"hidden\" name=\"name_$node\" value=\"$tree[$node][0]\"> ! <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\">"; if ($node > 0) # UI prevents root deletion, and so does code in edit_atree2.pl { ! # $html .="<input type=\"submit\" name=\"delete_$node\" value=\"Delete\">"; ! $html .="<input type=\"image\" border=\"0\" name=\"delete_$node\" src=\"../graphics/trash.gif\" width=\"25\" height=\"25\">\n"; ! } ! $html .= "($node)<input type=\"image\" border=\"0\" name=\"edit_$node\" src=\"../graphics/pencil.gif\" width=\"25\" height=\"25\"><br> ! <div align=\"center\"><font size=\"-1\">$tree[$node][0]<br><input type=\"radio\" name=\"node_number\" value=\"$node\">\n"; ! $html .= "</font></div></td>\n"; } } Index: edit_atree2.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/edit_atree2.pl,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** edit_atree2.pl 5 Nov 2002 21:14:46 -0000 1.1.2.3 --- edit_atree2.pl 6 Nov 2002 16:38:58 -0000 1.1.2.4 *************** *** 33,41 **** foreach my $key (keys(%ch)) { if ($key =~ m/name_(\d+)/) { $tree[$1][0] = $ch{$key}; $tree[$1][1] = $ch{"parent_$1"}; - write_log("parse CGI key:$key $1: $tree[$1][0],$tree[$1][1]"); } } --- 33,41 ---- foreach my $key (keys(%ch)) { + # write_log("parse CGI key:$key"); if ($key =~ m/name_(\d+)/) { $tree[$1][0] = $ch{$key}; $tree[$1][1] = $ch{"parent_$1"}; } } *************** *** 53,59 **** # write_log("Adding $tmax: $tree[$tmax][0],$tree[$tmax][1]"); } ! elsif(exists($ch{"delete_$active_node"})) { ! # the node_number radio button has to be @tree = delete_node($active_node,\@tree); } --- 53,65 ---- # write_log("Adding $tmax: $tree[$tmax][0],$tree[$tmax][1]"); } ! if (exists($ch{change})) { ! $tree[$active_node][0] = $ch{select_node}; ! } ! elsif(exists($ch{"delete_$active_node\.x"})) ! { ! # input type=image sends .x and .y because (apparently) I didn't ask for an image map. ! # Just use the .x ! # The node_number radio button has to be clicked to set $active_node @tree = delete_node($active_node,\@tree); } Index: edit_atree1.html =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/edit_atree1.html,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** edit_atree1.html 5 Nov 2002 19:25:43 -0000 1.1.2.3 --- edit_atree1.html 6 Nov 2002 16:38:58 -0000 1.1.2.4 *************** *** 15,20 **** <br> <br> ! <input type=submit name="add" value="Add Node"> ! {select_node} </form> <br> --- 15,31 ---- <br> <br> ! <table border="0"> ! <tr> ! <td> </td><td><input type=submit name="add" value="Add Node"></td> ! </tr> ! ! <tr> ! <td>{select_node}</td><td> </td> ! </tr> ! ! <tr> ! <td> </td><td><input type=submit name="change" value="Change Node"></td> ! </tr> ! </table> </form> <br> |
From: <tw...@us...> - 2002-11-05 21:14:49
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv28384 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl edit_atree2.pl Log Message: Fixed passes, fixed delete. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.19 retrieving revision 1.1.2.20 diff -C2 -d -r1.1.2.19 -r1.1.2.20 *** analysis_tree_lib.pl 5 Nov 2002 19:25:43 -0000 1.1.2.19 --- analysis_tree_lib.pl 5 Nov 2002 21:14:45 -0000 1.1.2.20 *************** *** 319,325 **** <input type=\"hidden\" name=\"name_$node\" value=\"$tree[$node][0]\"> <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\"> ! <div align=\"center\">($node) $tree[$node][0] ! <input type=\"submit\" name=\"delete_$node\" value=\"Delete\"> ! </div></td>\n"; } } --- 319,328 ---- <input type=\"hidden\" name=\"name_$node\" value=\"$tree[$node][0]\"> <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\"> ! <div align=\"center\">($node) $tree[$node][0]\n"; ! if ($node > 0) # UI prevents root deletion, and so does code in edit_atree2.pl ! { ! $html .="<input type=\"submit\" name=\"delete_$node\" value=\"Delete\">"; ! } ! $html .= "</div></td>\n"; } } Index: edit_atree2.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/edit_atree2.pl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** edit_atree2.pl 5 Nov 2002 19:25:43 -0000 1.1.2.2 --- edit_atree2.pl 5 Nov 2002 21:14:46 -0000 1.1.2.3 *************** *** 51,55 **** $tree[$tmax][0] = $ch{select_node}; $tree[$tmax][1] = $active_node; ! write_log("Adding $tmax: $tree[$tmax][0],$tree[$tmax][1]"); } elsif(exists($ch{"delete_$active_node"})) --- 51,55 ---- $tree[$tmax][0] = $ch{select_node}; $tree[$tmax][1] = $active_node; ! # write_log("Adding $tmax: $tree[$tmax][0],$tree[$tmax][1]"); } elsif(exists($ch{"delete_$active_node"})) *************** *** 67,70 **** --- 67,74 ---- my $s_node; my @nstack; + if ($node == 0) + { + return @tree; # don't allow deletion of the root of the tree; + } push(@nstack, $node); my $lc = 0; *************** *** 73,82 **** $s_node = pop(@nstack); $tree[$s_node][1] = (-1); # deleted. ! write_log("deleting $s_node\n"); for(my $xx=0; $xx<=$#tree; $xx++) { if ($tree[$xx][1] == $s_node) { ! write_log("xx:$xx s_node:$s_node pushing: $xx stack size:$#nstack\n"); push(@nstack, $xx); } --- 77,86 ---- $s_node = pop(@nstack); $tree[$s_node][1] = (-1); # deleted. ! # write_log("deleting $s_node\n"); for(my $xx=0; $xx<=$#tree; $xx++) { if ($tree[$xx][1] == $s_node) { ! # write_log("xx:$xx s_node:$s_node pushing: $xx stack size:$#nstack\n"); push(@nstack, $xx); } *************** *** 88,91 **** --- 92,116 ---- } } + for(my $xx=0; $xx<=$#tree; $xx++) + { + if ($tree[$xx][1] == -1) + { + if ($xx < $#tree) + { + for(my $yy=$xx+1; $yy<=$#tree; $yy++) + { + my $temp = $yy-1; + $tree[$yy-1][0] = $tree[$yy][0]; + $tree[$yy-1][1] = $tree[$yy][1]; + if ($tree[$yy][1] >= $xx) + { + $tree[$yy-1][1]--; + } + } + } + $#tree--; # remove the last, now unused, node of the tree. + } + } + return @tree; } |
From: <tw...@us...> - 2002-11-05 19:25:48
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv16706 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl edit_atree2.pl edit_atree1.html Log Message: Fix pass2, add delete Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.18 retrieving revision 1.1.2.19 diff -C2 -d -r1.1.2.18 -r1.1.2.19 *** analysis_tree_lib.pl 4 Nov 2002 21:32:07 -0000 1.1.2.18 --- analysis_tree_lib.pl 5 Nov 2002 19:25:43 -0000 1.1.2.19 *************** *** 79,87 **** # Layout children of generation $xx, and special case the root. # Need to layout children of parent nodes so siblings are together. ! $col += int(($m_width[0]/2)+0.5); $table[$row][$col] = 0; @{$loc{0}} = ($row, $col); # Also put node's location into the %loc hash $row+=2; my $offset; my $siblings; for(my $xx=0; $xx<=$#generation; $xx++) --- 79,88 ---- # Layout children of generation $xx, and special case the root. # Need to layout children of parent nodes so siblings are together. ! $col += int(($m_width[0]/2)); $table[$row][$col] = 0; @{$loc{0}} = ($row, $col); # Also put node's location into the %loc hash $row+=2; my $offset; + my $cumu_pos; my $siblings; for(my $xx=0; $xx<=$#generation; $xx++) *************** *** 104,114 **** next; } for(my $cc=0; $cc<=$#{$children[$parent]}; $cc++) { $node = $children[$parent][$cc]; - $siblings = $#{$children[$parent]}+1; $offset = int(($loc{$parent}[1] - ($m_width[$parent]/2)) + ($m_width[$node]/2)); ! print "node:$node wn:$m_width[$node] wp:$m_width[$parent] l:$loc{$parent}[1] o:$offset\n"; ! if ($col < $offset) { $col = $offset; --- 105,119 ---- next; } + # + # There might be a space saving optimization here + # by checking row-2,col-1, and if nothing is there + # then decrement $col. + # for(my $cc=0; $cc<=$#{$children[$parent]}; $cc++) { $node = $children[$parent][$cc]; $offset = int(($loc{$parent}[1] - ($m_width[$parent]/2)) + ($m_width[$node]/2)); ! $cumu_pos = $col + int((($m_width[$node])/2)); ! if ($cumu_pos < $offset) { $col = $offset; *************** *** 116,124 **** else { ! $col += int((($m_width[$node])/2)); } $table[$row][$col] = $node; @{$loc{$node}} = ($row, $col); # Also put node's location into the %loc hash $col += int((($m_width[$node])/2)+0.5); # Better to add the fraction on the right. } } --- 121,131 ---- else { ! $col = $cumu_pos } + # print "n$node o$offset c$col "; $table[$row][$col] = $node; @{$loc{$node}} = ($row, $col); # Also put node's location into the %loc hash $col += int((($m_width[$node])/2)+0.5); # Better to add the fraction on the right. + # print "fc$col\n"; } } *************** *** 204,208 **** for(my $tc=0; $tc<=$#tree; $tc++) { ! print OUT "$tree[$tc][0],$tree[$tc][1]\n"; } close(IN); --- 211,218 ---- for(my $tc=0; $tc<=$#tree; $tc++) { ! if ($tree[$tc][1] >= 0) ! { ! print OUT "$tree[$tc][0],$tree[$tc][1]\n"; ! } } close(IN); *************** *** 300,308 **** else { ! $html .= "<td width=\"75\" bgcolor=\"$colors[$xx][$yy]\"> ! <input type=\"radio\" name=\"add_node\" value=\"$node\"> ! <input type=\"hidden\" name=\"node_$node\" value=\"$tree[$node][0]\"> ! <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\"> ! <div align=\"center\">($node) $tree[$node][0]</div></td>\n"; } } --- 310,325 ---- else { ! # ! # If any of these change, then corresponding changes have to be made ! # to edit_atree1.pl and edit_atree2.pl ! # ! $html .= " ! <td width=\"75\" bgcolor=\"$colors[$xx][$yy]\"> ! <input type=\"radio\" name=\"node_number\" value=\"$node\"> ! <input type=\"hidden\" name=\"name_$node\" value=\"$tree[$node][0]\"> ! <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\"> ! <div align=\"center\">($node) $tree[$node][0] ! <input type=\"submit\" name=\"delete_$node\" value=\"Delete\"> ! </div></td>\n"; } } Index: edit_atree2.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/edit_atree2.pl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** edit_atree2.pl 1 Nov 2002 16:30:48 -0000 1.1.2.1 --- edit_atree2.pl 5 Nov 2002 19:25:43 -0000 1.1.2.2 *************** *** 33,48 **** foreach my $key (keys(%ch)) { ! if ($key =~ m/node_(\d+)/) { $tree[$1][0] = $ch{$key}; $tree[$1][1] = $ch{"parent_$1"}; ! write_log("$1: $tree[$1][0],$tree[$1][1]"); } } - my $tmax = $#tree; - $tmax++; - $tree[$tmax][0] = $ch{select_node}; - $tree[$tmax][1] = $ch{add_node}; - write_log("$tmax: $tree[$tmax][0],$tree[$tmax][1]"); return @tree; } --- 33,91 ---- foreach my $key (keys(%ch)) { ! if ($key =~ m/name_(\d+)/) { $tree[$1][0] = $ch{$key}; $tree[$1][1] = $ch{"parent_$1"}; ! write_log("parse CGI key:$key $1: $tree[$1][0],$tree[$1][1]"); ! } ! } ! my $active_node; ! if (exists($ch{node_number})) ! { ! $active_node = $ch{node_number}; ! } ! if (exists($ch{add})) ! { ! my $tmax = $#tree; ! $tmax++; ! $tree[$tmax][0] = $ch{select_node}; ! $tree[$tmax][1] = $active_node; ! write_log("Adding $tmax: $tree[$tmax][0],$tree[$tmax][1]"); ! } ! elsif(exists($ch{"delete_$active_node"})) ! { ! # the node_number radio button has to be ! @tree = delete_node($active_node,\@tree); ! } ! return @tree; ! } ! ! sub delete_node ! { ! my $node = $_[0]; ! my @tree = @{$_[1]}; ! my $s_node; ! my @nstack; ! push(@nstack, $node); ! my $lc = 0; ! while($#nstack >= 0) ! { ! $s_node = pop(@nstack); ! $tree[$s_node][1] = (-1); # deleted. ! write_log("deleting $s_node\n"); ! for(my $xx=0; $xx<=$#tree; $xx++) ! { ! if ($tree[$xx][1] == $s_node) ! { ! write_log("xx:$xx s_node:$s_node pushing: $xx stack size:$#nstack\n"); ! push(@nstack, $xx); ! } ! $lc++; ! if ($lc > 100) ! { ! die "inf. loop\n"; ! } } } return @tree; } Index: edit_atree1.html =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/edit_atree1.html,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** edit_atree1.html 1 Nov 2002 22:01:42 -0000 1.1.2.2 --- edit_atree1.html 5 Nov 2002 19:25:43 -0000 1.1.2.3 *************** *** 15,19 **** <br> <br> ! <input type=submit name="submit" value="Add Node"> {select_node} </form> --- 15,19 ---- <br> <br> ! <input type=submit name="add" value="Add Node"> {select_node} </form> |
From: <tw...@us...> - 2002-11-05 14:37:24
|
Update of /cvsroot/genex/genex-server In directory usw-pr-cvs1:/tmp/cvs-serv19166 Modified Files: Tag: Rel-1_0_1-branch INSTALL Log Message: Updates. Index: INSTALL =================================================================== RCS file: /cvsroot/genex/genex-server/INSTALL,v retrieving revision 1.14.2.15 retrieving revision 1.14.2.16 diff -C2 -d -r1.14.2.15 -r1.14.2.16 *** INSTALL 3 Jul 2002 18:41:43 -0000 1.14.2.15 --- INSTALL 5 Nov 2002 14:37:20 -0000 1.14.2.16 *************** *** 104,115 **** Required Applications ===================== ! * Postgres (>=7.1) => http://www.postgresql.org - If not installing from source, a sequence of RedHat RPMs that has been - reported by Ron Ophir to work is: - 1) postgresql-libs-7.1.1-0.7 - 2) postgresql-7.1.1-0.7 - 3) postgresql-server-7.1.1-0.7 - 4) postgresql-devel Debian deb packages for PostgreSQL include: --- 104,116 ---- Required Applications ===================== ! * Postgres (>=7.2) => http://www.postgresql.org ! ! The following link has the latest installation instructions: ! ! http://www.us.postgresql.org/users-lounge/docs/7.2/postgres/installation.html ! ! * pay close attention to the instructions if you are upgrading from a previous version of postgresql. If you have data that ! must be migrated to the new version you must follow specific steps before running the upgrade. Debian deb packages for PostgreSQL include: |
From: <tw...@us...> - 2002-11-05 14:36:15
|
Update of /cvsroot/genex/genex-server In directory usw-pr-cvs1:/tmp/cvs-serv18627 Modified Files: Tag: Rel-1_0_1-branch genex_schema.sql Log Message: Jodi adds tables for analysis tree Index: genex_schema.sql =================================================================== RCS file: /cvsroot/genex/genex-server/genex_schema.sql,v retrieving revision 1.3.2.11 retrieving revision 1.3.2.12 diff -C2 -d -r1.3.2.11 -r1.3.2.12 *** genex_schema.sql 1 Oct 2002 13:53:48 -0000 1.3.2.11 --- genex_schema.sql 5 Nov 2002 14:36:09 -0000 1.3.2.12 *************** *** 2186,2190 **** --- 2186,2194 ---- create table "file_info" ( "fi_pk" integer DEFAULT nextval('pk_seq'::text) NOT NULL, + "node_fk" integer, "file_name" character varying(128) NOT NULL, + "timestamp" character varying(128), + "owner" character varying(128), + "use_as_input" boolean, "comments" text, "checksum" character varying(128) *************** *** 2962,2977 **** --- 2966,3158 ---- + --ANALYSIS TABLES + --GeneX analysis requirements call for an additional 5 tables in the database. + + + CREATE SEQUENCE "analysis_anal_pk_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + + REVOKE ALL on "analysis_anal_pk_seq" from PUBLIC; + GRANT ALL on "analysis_anal_pk_seq" to "genex"; + GRANT SELECT on "analysis_anal_pk_seq" to "readonly"; + + + CREATE SEQUENCE "filetypes_ft_pk_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + + REVOKE ALL on "filetypes_ft_pk_seq" from PUBLIC; + GRANT ALL on "filetypes_ft_pk_seq" to "genex"; + GRANT SELECT on "filetypes_ft_pk_seq" to "readonly"; + + + CREATE SEQUENCE "user_parameter_names_upn_pk_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + REVOKE ALL on "user_parameter_names_upn_pk_seq" from PUBLIC; + GRANT ALL on "user_parameter_names_upn_pk_seq" to "genex"; + GRANT SELECT on "user_parameter_names_upn_pk_seq" to "readonly"; + CREATE SEQUENCE "sys_parameter_names_spn_pk_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + REVOKE ALL on "sys_parameter_names_spn_pk_seq" from PUBLIC; + GRANT ALL on "sys_parameter_names_spn_pk_seq" to "genex"; + GRANT SELECT on "sys_parameter_names_spn_pk_seq" to "readonly"; + CREATE SEQUENCE "user_parameter_values_upv_pk" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + REVOKE ALL on "user_parameter_values_upv_pk" from PUBLIC; + GRANT ALL on "user_parameter_values_upv_pk" to "genex"; + GRANT SELECT on "user_parameter_values_upv_pk" to "readonly"; + CREATE SEQUENCE "sys_parameter_values_spv_pk" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ; + REVOKE ALL on "sys_parameter_values_spv_pk" from PUBLIC; + GRANT ALL on "sys_parameter_values_spv_pk" to "genex"; + GRANT SELECT on "sys_parameter_values_spv_pk" to "readonly"; + --Table: analysis + --This table stores the information on the different kinds of analyses that can be run by the system. It is populated when researchers upload an analysis. + CREATE TABLE "analysis" ( + "anal_pk" integer DEFAULT nextval('analysis_anal_pk_seq'::text) NOT NULL, + "name" character varying(128), + "cmdstr" text + ) without OIDs; + REVOKE ALL on "analysis" from PUBLIC; + GRANT ALL on "analysis" to "genex"; + GRANT SELECT on "analysis" to "readonly"; + + --Table: user_parameter_names + --This table was created as a solution to having analysis.userparameternames as an array data type. + + CREATE TABLE "user_parameter_names" ( + "upn_pk" integer DEFAULT nextval('user_parameter_names_upn_pk_seq'::text) NOT NULL, + "anal_fk" integer, + "up_name" character varying(128), + "up_display_name" character varying(128), + "up_type" character varying(128), + "up_default" character varying(128) + ) without OIDs; + + + REVOKE ALL on "user_parameter_names" from PUBLIC; + + + --Table: sys_parameter_names + --This table was created as a solution to having analysis.sysparameternames as an array data type. + + CREATE TABLE "sys_parameter_names" ( + "spn_pk" integer DEFAULT nextval('sys_parameter_names_spn_pk_seq'::text) NOT NULL, + "anal_fk" integer, + "sp_name" character varying(128), + "sp_type" character varying(128), + "sp_default" character varying(128) + ) without OIDs; + + + REVOKE ALL on "sys_parameter_names" from PUBLIC; + GRANT ALL on "sys_parameter_names" to "genex"; + GRANT SELECT on "sys_parameter_names" to "readonly"; + + --Linking Table: analysis_ft_input_link + --This linking table was created due to a many to many relationship between the input files of the analysis table and the filetypes table. + + CREATE TABLE "analysis_ft_input_link" ( + "anal_fk" integer, + "ft_fk" integer + ) without OIDs; + + REVOKE ALL on "analysis_ft_input_link" from PUBLIC; + GRANT ALL on "analysis_ft_input_link" to "genex"; + GRANT SELECT on "analysis_ft_input_link" to "readonly"; + + + --Linking Table: analysis_ft_output_link + --This linking table was created due to a many to many relationship between the output files of the analysis table and the filetypes table. + + CREATE TABLE "analysis_ft_output_link" ( + "anal_fk" integer, + "ft_fk" integer + ) without OIDs; + + REVOKE ALL on "analysis_ft_output_link" from PUBLIC; + GRANT ALL on "analysis_ft_output_link" to "genex"; + GRANT SELECT on "analysis_ft_output_link" to "readonly"; + + + --Table: filetypes + --This table stores all distinct file types for which we would like to type check. Analysis can specify acceptable file types for input and output files. + + CREATE TABLE "filetypes" ( + "ft_pk" integer DEFAULT nextval('filetypes_ft_pk_seq'::text) NOT NULL, + "name" character varying(128), + "extension" character varying(128), + "comment" text + ) without OIDs; + + REVOKE ALL on "filetypes" from PUBLIC; + GRANT ALL on "filetypes" to "genex"; + GRANT SELECT on "filetypes" to "readonly"; + + + --Table: Tree + --This table stores analysis trees - groups of analysis nodes that are run in sequence. + + CREATE TABLE "tree" ( + "tree_pk" integer DEFAULT nextval('pk_seq'::text) NOT NULL, + "name" character varying(128), + "owner" character varying(128), + "fi_fk" integer + ) without OIDs; + + REVOKE ALL on "tree" from PUBLIC; + GRANT ALL on "tree" to "genex"; + GRANT SELECT on "tree" to "readonly"; + + + --Table: node + --Nodes are actual instances of analyses that should be run. They contain all information necessary to run the analysis. + + CREATE TABLE "node" ( + "node_pk" integer DEFAULT nextval('pk_seq'::text) NOT NULL, + "tree_fk" integer, + "anal_fk" integer, + "parent_key" integer + ) without OIDs; + + REVOKE ALL on "node" from PUBLIC; + GRANT ALL on "node" to "genex"; + GRANT SELECT on "node" to "readonly"; + + --Table: user_paramter_values + --This table was created to eliminate the need for an array data type for the node.userparametervalues field. + + CREATE TABLE "user_parameter_values" ( + "upv_pk" integer DEFAULT nextval('user_parameter_values_upv_pk'::text) NOT NULL, + "node_fk" integer, + "upn_fk" integer, + "up_value" character varying(128) + ) without OIDs; + + + REVOKE ALL on "user_parameter_values" from PUBLIC; + GRANT ALL on "user_parameter_values" to "genex"; + GRANT SELECT on "user_parameter_values" to "readonly"; + + --Table: sys_parameter_values + --This table was created to eliminate the need for an array data type for the node.sysparametervalues field. + + + CREATE TABLE "sys_parameter_values" ( + "spv_pk" integer DEFAULT nextval('sys_parameter_values_spv_pk'::text) NOT NULL, + "node_fk" integer, + "spn_fk" integer, + "sp_value" character varying(128) + ) without OIDs; + + + REVOKE ALL on "sys_parameter_values" from PUBLIC; + GRANT ALL on "sys_parameter_values" to "genex"; + GRANT SELECT on "sys_parameter_values" to "readonly"; |
From: <tw...@us...> - 2002-11-04 21:32:10
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv21872 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: testing space filling. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.17 retrieving revision 1.1.2.18 diff -C2 -d -r1.1.2.17 -r1.1.2.18 *** analysis_tree_lib.pl 4 Nov 2002 20:00:39 -0000 1.1.2.17 --- analysis_tree_lib.pl 4 Nov 2002 21:32:07 -0000 1.1.2.18 *************** *** 35,38 **** --- 35,39 ---- my $row; my $col; + my %zero_children; $row = 0; *************** *** 46,70 **** $m_width[$node] = 0; my $cc; - # print "$node: "; for($cc=0; $cc<=$#{$children[$node]}; $cc++) { ! # ! # Space filling optimization: For generations ! #if ($cc > 1 && $m_width[$children[$node][$cc]] > 1) ! #{ ! # $m_width[$node] += ($m_width[$children[$node][$cc]]-1); ! #} ! #else ! #{ ! $m_width[$node] += ($m_width[$children[$node][$cc]]); ! #} ! # my $num = $m_width[$children[$node][$cc]]; ! # print "c$children[$node][$cc] m$m_width[$children[$node][$cc]], "; } ! if ($m_width[$node] == 0) { $m_width[$node] = 1; } - # print "mw$node: $m_width[$node]\n"; } } --- 47,59 ---- $m_width[$node] = 0; my $cc; for($cc=0; $cc<=$#{$children[$node]}; $cc++) { ! my $chw = ($m_width[$children[$node][$cc]]); ! $m_width[$node] += $chw; } ! if ($m_width[$node] < 1) { $m_width[$node] = 1; } } } *************** *** 102,106 **** for(my $yy=0; $yy<=$#{$table[$row-2]}; $yy++) { ! if (defined($table[$row-2][$yy])) { $parent = $table[$row-2][$yy]; --- 91,100 ---- for(my $yy=0; $yy<=$#{$table[$row-2]}; $yy++) { ! # ! # Layout children in the order of the parents generation is layed out. ! # We always want to build a generation from the left, and just using @generation ! # won't meet that requirement. ! # ! if (defined($table[$row-2][$yy])) { $parent = $table[$row-2][$yy]; *************** *** 115,119 **** $siblings = $#{$children[$parent]}+1; $offset = int(($loc{$parent}[1] - ($m_width[$parent]/2)) + ($m_width[$node]/2)); ! print "node:$node w:$m_width[$parent] l:$loc{$parent}[1] o:$offset\n"; if ($col < $offset) { --- 109,113 ---- $siblings = $#{$children[$parent]}+1; $offset = int(($loc{$parent}[1] - ($m_width[$parent]/2)) + ($m_width[$node]/2)); ! print "node:$node wn:$m_width[$node] wp:$m_width[$parent] l:$loc{$parent}[1] o:$offset\n"; if ($col < $offset) { *************** *** 125,132 **** } $table[$row][$col] = $node; ! @{$loc{$node}} = ($row, $col); # Also put node's location into the %loc hash ! $col += int((($m_width[$node])/2)+0.5); } - # $col++; } $row+=2; --- 119,125 ---- } $table[$row][$col] = $node; ! @{$loc{$node}} = ($row, $col); # Also put node's location into the %loc hash ! $col += int((($m_width[$node])/2)+0.5); # Better to add the fraction on the right. } } $row+=2; |
From: <tw...@us...> - 2002-11-04 20:00:44
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv14219 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: pass2 recoded to take parent generation ordering into account Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.16 retrieving revision 1.1.2.17 diff -C2 -d -r1.1.2.16 -r1.1.2.17 *** analysis_tree_lib.pl 4 Nov 2002 18:45:41 -0000 1.1.2.16 --- analysis_tree_lib.pl 4 Nov 2002 20:00:39 -0000 1.1.2.17 *************** *** 49,53 **** for($cc=0; $cc<=$#{$children[$node]}; $cc++) { ! $m_width[$node] += $m_width[$children[$node][$cc]]; # subtract one for parent # my $num = $m_width[$children[$node][$cc]]; # print "c$children[$node][$cc] m$m_width[$children[$node][$cc]], "; --- 49,62 ---- for($cc=0; $cc<=$#{$children[$node]}; $cc++) { ! # ! # Space filling optimization: For generations ! #if ($cc > 1 && $m_width[$children[$node][$cc]] > 1) ! #{ ! # $m_width[$node] += ($m_width[$children[$node][$cc]]-1); ! #} ! #else ! #{ ! $m_width[$node] += ($m_width[$children[$node][$cc]]); ! #} # my $num = $m_width[$children[$node][$cc]]; # print "c$children[$node][$cc] m$m_width[$children[$node][$cc]], "; *************** *** 90,93 **** --- 99,157 ---- { $col = 0; + #for(my $yy= 0; $yy<=$#{$generation[$xx]}; $yy++) + for(my $yy=0; $yy<=$#{$table[$row-2]}; $yy++) + { + if (defined($table[$row-2][$yy])) + { + $parent = $table[$row-2][$yy]; + } + else + { + next; + } + for(my $cc=0; $cc<=$#{$children[$parent]}; $cc++) + { + $node = $children[$parent][$cc]; + $siblings = $#{$children[$parent]}+1; + $offset = int(($loc{$parent}[1] - ($m_width[$parent]/2)) + ($m_width[$node]/2)); + print "node:$node w:$m_width[$parent] l:$loc{$parent}[1] o:$offset\n"; + if ($col < $offset) + { + $col = $offset; + } + else + { + $col += int((($m_width[$node])/2)); + } + $table[$row][$col] = $node; + @{$loc{$node}} = ($row, $col); # Also put node's location into the %loc hash + $col += int((($m_width[$node])/2)+0.5); + } + # $col++; + } + $row+=2; + } + } + + sub pass2_old + { + my $row; + my $col; + + $row = 0; + $col = 0; + my $node; + my $parent; + # Layout children of generation $xx, and special case the root. + # Need to layout children of parent nodes so siblings are together. + $col += int(($m_width[0]/2)+0.5); + $table[$row][$col] = 0; + @{$loc{0}} = ($row, $col); # Also put node's location into the %loc hash + $row+=2; + my $offset; + my $siblings; + for(my $xx=0; $xx<=$#generation; $xx++) + { + $col = 0; for(my $yy= 0; $yy<=$#{$generation[$xx]}; $yy++) { *************** *** 101,105 **** # $m_width[$children[$generation[$xx][0]][0]]/2; print "node:$node w:$m_width[$parent] l:$loc{$parent}[1] o:$offset\n"; ! if ($col < $offset) { $col = $offset; --- 165,169 ---- # $m_width[$children[$generation[$xx][0]][0]]/2; print "node:$node w:$m_width[$parent] l:$loc{$parent}[1] o:$offset\n"; ! if ($col==0) { $col = $offset; |
From: <tw...@us...> - 2002-11-04 18:45:44
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv16741 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: Fixed connection Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.15 retrieving revision 1.1.2.16 diff -C2 -d -r1.1.2.15 -r1.1.2.16 *** analysis_tree_lib.pl 4 Nov 2002 16:17:56 -0000 1.1.2.15 --- analysis_tree_lib.pl 4 Nov 2002 18:45:41 -0000 1.1.2.16 *************** *** 127,132 **** # print_generation_info(); ! tile(); # creates @table, @loc ! tile_pass2(); # modifies @table, @loc fixing mis-aligned zeroth row nodes tile_color(); # reads @table, creates @colors tile_connect(); # modifies @table adding img tags, reads @loc --- 127,134 ---- # print_generation_info(); ! #tile(); # creates @table, @loc ! #tile_pass2(); # modifies @table, @loc fixing mis-aligned zeroth row nodes ! pass1(); # creates @table, @loc ! pass2(); # modifies @table, @loc fixing mis-aligned zeroth row nodes tile_color(); # reads @table, creates @colors tile_connect(); # modifies @table adding img tags, reads @loc *************** *** 141,145 **** { my @tree = @{$_[0]}; ! open(OUT, "> /var/genres/twl/tree.txt"); for(my $tc=0; $tc<=$#tree; $tc++) { --- 143,148 ---- { my @tree = @{$_[0]}; ! my $fn = "/var/genres/twl8n/tree.txt"; ! open(OUT, "> $fn") || die "Canont write $fn\n"; for(my $tc=0; $tc<=$#tree; $tc++) { *************** *** 151,155 **** sub read_db { ! open(IN, "< /var/genres/twl/tree.txt"); my $tc = 0; while(my $temp = <IN>) --- 154,159 ---- sub read_db { ! my $fn = "/var/genres/twl8n/tree.txt"; ! open(IN, "< $fn") || die "Cannot read $fn\n";; my $tc = 0; while(my $temp = <IN>) *************** *** 288,306 **** if ($py < ($yy-1)) { ! $table[$xx+2][$yy-1] = "<img src=\"../graphics/74.gif\">"; for(my $pp=2; $py < $yy-$pp; $pp++) { # if it already contains an img 74.gif then replace with 7374.gif ! if ($table[$xx+2][$yy-$pp] =~ m/74\.gif/) { ! $table[$xx+2][$yy-$pp] = "<img src=\"../graphics/7374.gif\">"; } else { ! $table[$xx+2][$yy-$pp] = "<img src=\"../graphics/73.gif\">"; } } } ! $table[$xx+1][$yy] = "<img src=\"../graphics/05a.gif\">"; } elsif ($py >= ($yy+1)) --- 292,310 ---- if ($py < ($yy-1)) { ! $table[$xx-2][$yy-1] = "<img src=\"../graphics/74.gif\">"; for(my $pp=2; $py < $yy-$pp; $pp++) { # if it already contains an img 74.gif then replace with 7374.gif ! if ($table[$xx-2][$yy-$pp] =~ m/74\.gif/) { ! $table[$xx-2][$yy-$pp] = "<img src=\"../graphics/7374.gif\">"; } else { ! $table[$xx-2][$yy-$pp] = "<img src=\"../graphics/73.gif\">"; } } } ! $table[$xx-1][$yy] = "<img src=\"../graphics/05a.gif\">"; } elsif ($py >= ($yy+1)) *************** *** 308,333 **** if ($py > ($yy+1)) { ! if ($table[$xx+2][$yy+1] =~ m/img/) { ! $table[$xx+2][$yy+1] = "<img src=\"../graphics/7336.gif\">"; } else { ! $table[$xx+2][$yy+1] = "<img src=\"../graphics/36.gif\">"; } for(my $pp=2; $py > $yy+$pp; $pp++) { # if we already have image 36.gif then replace with 7336.gif ! if ($table[$xx+2][$yy+$pp] =~ m/36\.gif/) { ! $table[$xx+2][$yy+$pp] = "<img src=\"../graphics/7336.gif\">"; } else { ! $table[$xx+2][$yy+$pp] = "<img src=\"../graphics/73.gif\">"; } } } ! $table[$xx+1][$yy] = "<img src=\"../graphics/25a.gif\">"; } } --- 312,337 ---- if ($py > ($yy+1)) { ! if ($table[$xx-2][$yy+1] =~ m/img/) { ! $table[$xx-2][$yy+1] = "<img src=\"../graphics/7336.gif\">"; } else { ! $table[$xx-2][$yy+1] = "<img src=\"../graphics/36.gif\">"; } for(my $pp=2; $py > $yy+$pp; $pp++) { # if we already have image 36.gif then replace with 7336.gif ! if ($table[$xx-2][$yy+$pp] =~ m/36\.gif/) { ! $table[$xx-2][$yy+$pp] = "<img src=\"../graphics/7336.gif\">"; } else { ! $table[$xx-2][$yy+$pp] = "<img src=\"../graphics/73.gif\">"; } } } ! $table[$xx-1][$yy] = "<img src=\"../graphics/25a.gif\">"; } } |
From: <tw...@us...> - 2002-11-04 16:18:01
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv20970 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: rewrote tiling alg. with an improved two pass system Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.14 retrieving revision 1.1.2.15 diff -C2 -d -r1.1.2.14 -r1.1.2.15 *** analysis_tree_lib.pl 1 Nov 2002 22:01:38 -0000 1.1.2.14 --- analysis_tree_lib.pl 4 Nov 2002 16:17:56 -0000 1.1.2.15 *************** *** 46,55 **** $m_width[$node] = 0; my $cc; ! print "$node: "; for($cc=0; $cc<=$#{$children[$node]}; $cc++) { $m_width[$node] += $m_width[$children[$node][$cc]]; # subtract one for parent # my $num = $m_width[$children[$node][$cc]]; ! print "c$children[$node][$cc] m$m_width[$children[$node][$cc]], "; } if ($m_width[$node] == 0) --- 46,55 ---- $m_width[$node] = 0; my $cc; ! # print "$node: "; for($cc=0; $cc<=$#{$children[$node]}; $cc++) { $m_width[$node] += $m_width[$children[$node][$cc]]; # subtract one for parent # my $num = $m_width[$children[$node][$cc]]; ! # print "c$children[$node][$cc] m$m_width[$children[$node][$cc]], "; } if ($m_width[$node] == 0) *************** *** 57,66 **** $m_width[$node] = 1; } ! # if ($cc > 1) ! # { ! # print "cc: $cc "; ! # $m_width[$node] += ($cc); ! # } ! print "mw$node: $m_width[$node]\n"; } } --- 57,61 ---- $m_width[$node] = 1; } ! # print "mw$node: $m_width[$node]\n"; } } *************** *** 77,81 **** sub pass2 { - return ; my $row; my $col; --- 72,75 ---- *************** *** 83,93 **** $row = 0; $col = 0; for(my $xx=0; $xx<=$#generation; $xx++) { ! for(my $yy= 0; $yy<=$#{$generation[$yy]}; $yy++) { ! $col += int(($m_width[$xx]/2)-0.5); ! $table[$row][$col] = $generation[$xx][$yy]; ! $col += int(($m_width[$xx]/2)); } $row+=2; --- 77,118 ---- $row = 0; $col = 0; + my $node; + my $parent; + # Layout children of generation $xx, and special case the root. + # Need to layout children of parent nodes so siblings are together. + $col += int(($m_width[0]/2)+0.5); + $table[$row][$col] = 0; + @{$loc{0}} = ($row, $col); # Also put node's location into the %loc hash + $row+=2; + my $offset; + my $siblings; for(my $xx=0; $xx<=$#generation; $xx++) { ! $col = 0; ! for(my $yy= 0; $yy<=$#{$generation[$xx]}; $yy++) { ! $parent = $generation[$xx][$yy]; ! for(my $cc=0; $cc<=$#{$children[$parent]}; $cc++) ! { ! $node = $children[$parent][$cc]; ! $siblings = $#{$children[$parent]}+1; ! # old $offset = ((int((($m_width[$parent])))) - $loc{$parent}[1])/$siblings; ! $offset = int(($loc{$parent}[1] - ($m_width[$parent]/2)) + ($m_width[$node]/2)); ! # $m_width[$children[$generation[$xx][0]][0]]/2; ! print "node:$node w:$m_width[$parent] l:$loc{$parent}[1] o:$offset\n"; ! if ($col < $offset) ! { ! $col = $offset; ! } ! else ! { ! $col += int((($m_width[$node])/2)); ! } ! $table[$row][$col] = $node; ! @{$loc{$node}} = ($row, $col); # Also put node's location into the %loc hash ! # print "$node ($row,$col) (x:$xx,y$yy)\n"; ! $col += int((($m_width[$node])/2)+0.5); ! } ! # $col++; } $row+=2; *************** *** 116,120 **** { my @tree = @{$_[0]}; ! open(OUT, "> /var/genres/twl8n/tree.txt"); for(my $tc=0; $tc<=$#tree; $tc++) { --- 141,145 ---- { my @tree = @{$_[0]}; ! open(OUT, "> /var/genres/twl/tree.txt"); for(my $tc=0; $tc<=$#tree; $tc++) { *************** *** 126,130 **** sub read_db { ! open(IN, "< /var/genres/twl8n/tree.txt"); my $tc = 0; while(my $temp = <IN>) --- 151,155 ---- sub read_db { ! open(IN, "< /var/genres/twl/tree.txt"); my $tc = 0; while(my $temp = <IN>) *************** *** 190,194 **** my $html; my $tmax = 0; ! for(my $xx=($#table); $xx>=0; $xx--) { if ($#{$table[$xx]} > $tmax) --- 215,219 ---- my $html; my $tmax = 0; ! for(my $xx=0; $xx<=$#table; $xx++) { if ($#{$table[$xx]} > $tmax) *************** *** 199,203 **** my $table_width = 75 * $tmax; $html = "<table width=\"$table_width\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">"; ! for(my $xx=($#table); $xx>=0; $xx--) { # make sure the row is 75 pixels tall. --- 224,228 ---- my $table_width = 75 * $tmax; $html = "<table width=\"$table_width\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">"; ! for(my $xx=0; $xx<=$#table; $xx++) { # make sure the row is 75 pixels tall. *************** *** 238,242 **** my $px; my $py; ! for(my $xx=($#table); $xx>=0; $xx--) { if ($#{$table[$xx]} > $tmax) --- 263,267 ---- my $px; my $py; ! for(my $xx=0; $xx<=$#table; $xx++) { if ($#{$table[$xx]} > $tmax) *************** *** 245,249 **** } } ! for(my $xx=($#table); $xx>=0; $xx--) { for(my $yy=0; $yy<=$tmax; $yy++) --- 270,274 ---- } } ! for(my $xx=0; $xx<=$#table; $xx++) { for(my $yy=0; $yy<=$tmax; $yy++) *************** *** 257,261 **** if ($py == $yy) { ! $table[$xx+1][$yy] = "<img src=\"../graphics/15a.gif\">"; } elsif ($py <= ($yy-1)) --- 282,286 ---- if ($py == $yy) { ! $table[$xx-1][$yy] = "<img src=\"../graphics/15a.gif\">"; } elsif ($py <= ($yy-1)) *************** *** 545,554 **** for(my $xx=0; $xx<=$#children; $xx++) { ! print "Children $xx: "; ! for(my $yy=0; $yy<=$#{$children[$xx]}; $yy++) { ! print "($xx,$yy) $children[$xx][$yy] "; } - print "\n"; } print "\n"; --- 570,582 ---- for(my $xx=0; $xx<=$#children; $xx++) { ! if ($#{$children[$xx]} >= 0) { ! print "Children $xx: "; ! for(my $yy=0; $yy<=$#{$children[$xx]}; $yy++) ! { ! print "($xx,$yy) $children[$xx][$yy] "; ! } ! print "\n"; } } print "\n"; *************** *** 571,575 **** sub print_ascii_tree { ! print " 0 1 2 3 4 5 6 7 8 9\n"; for(my $xx=$#table; $xx>=0; $xx--) { --- 599,603 ---- sub print_ascii_tree { ! print " 0 1 2 3 4 5 6 7 8 91011121314151617181920\n"; for(my $xx=$#table; $xx>=0; $xx--) { |
From: <jas...@us...> - 2002-11-02 06:21:34
|
Update of /cvsroot/genex/genex-server/DB/curated_data In directory usw-pr-cvs1:/tmp/cvs-serv14983 Removed Files: contact-ncgr.xml contact-noble.xml Log Message: cruft --- contact-ncgr.xml DELETED --- --- contact-noble.xml DELETED --- |
Update of /cvsroot/genex/genex-server/site/graphics In directory usw-pr-cvs1:/tmp/cvs-serv2262 Added Files: Tag: Rel-1_0_1-branch 05a.gif 15a.gif 25a.gif 36.gif 7336.gif 7374.gif 73.gif 74.gif white.gif Log Message: analysis tree drawing connector graphics. --- NEW FILE: 05a.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 15a.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 25a.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 36.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 7336.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 7374.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 73.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: 74.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: white.gif --- (This appears to be a binary file; contents omitted.) |
From: <tw...@us...> - 2002-11-01 22:01:47
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv1039 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl edit_atree1.html Log Message: write a new generation size pass. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -C2 -d -r1.1.2.13 -r1.1.2.14 *** analysis_tree_lib.pl 1 Nov 2002 16:30:48 -0000 1.1.2.13 --- analysis_tree_lib.pl 1 Nov 2002 22:01:38 -0000 1.1.2.14 *************** *** 11,14 **** --- 11,15 ---- my @table; my @colors; + my @m_width; sub select_node *************** *** 25,47 **** } ! sub old_main { ! read_db(); ! analyze_tree(); ! # print_tree_info(); ! # print_children_info(); ! # print_generation_info(); ! ! tile(); # creates @table ! tile_pass2(); # modifies @table fixing mis-aligned zeroth row nodes ! tile_color(); # reads @table, creates @colors ! tile_connect(); # modifies @table adding img tags ! my $html = render_html(); # reads @table, @colors ! ! open(OUT, "> /home/twl8n/public_html/test.html"); ! print OUT "<html><body>$html</body></html>\n"; ! close(OUT); ! print_ascii_tree(); } --- 26,96 ---- } ! ! # ! # find max width for each family. ! # $m_width[$xx] = max; where $node is the index into @tree. ! # ! sub pass1 { ! my $row; ! my $col; ! $row = 0; ! $col = 0; ! for(my $xx=$#generation; $xx>=0; $xx--) ! { ! my $yy; ! for ($yy = 0; $yy<=$#{$generation[$xx]}; $yy++) ! { ! my $node = $generation[$xx][$yy]; ! $m_width[$node] = 0; ! my $cc; ! print "$node: "; ! for($cc=0; $cc<=$#{$children[$node]}; $cc++) ! { ! $m_width[$node] += $m_width[$children[$node][$cc]]; # subtract one for parent ! # my $num = $m_width[$children[$node][$cc]]; ! print "c$children[$node][$cc] m$m_width[$children[$node][$cc]], "; ! } ! if ($m_width[$node] == 0) ! { ! $m_width[$node] = 1; ! } ! # if ($cc > 1) ! # { ! # print "cc: $cc "; ! # $m_width[$node] += ($cc); ! # } ! print "mw$node: $m_width[$node]\n"; ! } ! } ! } ! ! ! # ! # Place parent at 1/2 of the child's generation width ! # Need a pass to group children of a generation by family. ! # If a node has no children, then it doesn't count in the spacing of ! # the next generation, and its col is just col+1. ! # If a node has children, then place the node in the middle of the subsequent generation, ! # ! sub pass2 ! { ! return ; ! my $row; ! my $col; ! ! $row = 0; ! $col = 0; ! for(my $xx=0; $xx<=$#generation; $xx++) ! { ! for(my $yy= 0; $yy<=$#{$generation[$yy]}; $yy++) ! { ! $col += int(($m_width[$xx]/2)-0.5); ! $table[$row][$col] = $generation[$xx][$yy]; ! $col += int(($m_width[$xx]/2)); ! } ! $row+=2; ! } } *************** *** 169,173 **** <input type=\"hidden\" name=\"node_$node\" value=\"$tree[$node][0]\"> <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\"> ! <div align=\"center\">$tree[$node][0]</div></td>\n"; } } --- 218,222 ---- <input type=\"hidden\" name=\"node_$node\" value=\"$tree[$node][0]\"> <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\"> ! <div align=\"center\">($node) $tree[$node][0]</div></td>\n"; } } *************** *** 299,303 **** my $kid_count = $#{$children[$node]} +1; $gen_max = 0; # highest column number of my children; used to align parent above sibling columns ! if ($row >= 2) # only check this after we've layed out at least on generation { # remember we increment row by two, leaving room for tile connectors for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) --- 348,352 ---- my $kid_count = $#{$children[$node]} +1; $gen_max = 0; # highest column number of my children; used to align parent above sibling columns ! if ($row >= 2) # only check this after we've layed out at least one generation { # remember we increment row by two, leaving room for tile connectors for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) Index: edit_atree1.html =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/edit_atree1.html,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** edit_atree1.html 1 Nov 2002 16:30:48 -0000 1.1.2.1 --- edit_atree1.html 1 Nov 2002 22:01:42 -0000 1.1.2.2 *************** *** 14,18 **** {atree} <br> <br> ! <loop> </loop><br> <input type=submit name="submit" value="Add Node"> {select_node} --- 14,18 ---- {atree} <br> <br> ! <br> <input type=submit name="submit" value="Add Node"> {select_node} |
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv26679 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Added Files: Tag: Rel-1_0_1-branch edit_atree2.pl edit_atree1.pl edit_atree1.html Log Message: web page adding, displaying the tree. --- NEW FILE: edit_atree2.pl --- #!/usr/bin/perl use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); require "./sessionlib.pl"; require "./analysis_tree_lib.pl"; main: { my $q = new CGI; my $message; my $dbh = new_connection(); my $us_fk = get_us_fk($dbh); my @tree = read_tree($q); write_db(\@tree); my $url = index_url(); # see sessionlib.pl $url =~ s/(.*)\/.*/$1\/edit_atree1.pl/; print "Location: $url?message=$message\n\n"; $dbh->disconnect(); } sub read_tree { my $q = $_[0]; my %ch = $q->Vars(); my @tree; foreach my $key (keys(%ch)) { if ($key =~ m/node_(\d+)/) { $tree[$1][0] = $ch{$key}; $tree[$1][1] = $ch{"parent_$1"}; write_log("$1: $tree[$1][0],$tree[$1][1]"); } } my $tmax = $#tree; $tmax++; $tree[$tmax][0] = $ch{select_node}; $tree[$tmax][1] = $ch{add_node}; write_log("$tmax: $tree[$tmax][0],$tree[$tmax][1]"); return @tree; } --- NEW FILE: edit_atree1.pl --- #!/usr/bin/perl use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); require "./sessionlib.pl"; require "./analysis_tree_lib.pl"; main: { my $q = new CGI; my $sty_pk = $q->param("sty_pk"); my $dbh = new_connection(); my $us_fk = get_us_fk($dbh); read_db(); my $atree = render_at(); my $select_node = select_node(); (my $all_html) = readtemplate("edit_atree1.html"); $all_html =~ s/{message}//s; $all_html =~ s/{select_node}/$select_node/sg; $all_html =~ s/{atree}/$atree/sg; print "Content-type: text/html\n\n$all_html"; $dbh->disconnect(); } --- NEW FILE: edit_atree1.html --- <html><head><title>Update Experimental Conditions</title></head> <body bgcolor="#FFFFFF"> <table width="600" border=0 cellpadding=0 cellspacing=0> <tr><td align=top><img src="../graphics/genex_logo.jpg" align="left">GeneX Experimental Conditions Update<br><br> <a href="./">Return to Genex Member Home</a><br><br clear=all><br> </td> </tr> </table> <br> <font color="#FF0000">{message}</font> <br> <form action="edit_atree2.pl" method=POST> {atree} <br> <br> <loop> </loop><br> <input type=submit name="submit" value="Add Node"> {select_node} </form> <br> * Please complete these fields. This information is required before your analysis will run.<br> </body> </html> Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.12 retrieving revision 1.1.2.13 diff -C2 -d -r1.1.2.12 -r1.1.2.13 *** analysis_tree_lib.pl 31 Oct 2002 20:49:33 -0000 1.1.2.12 --- analysis_tree_lib.pl 1 Nov 2002 16:30:48 -0000 1.1.2.13 *************** *** 3,7 **** use strict; - my @tree; my @parent; --- 3,6 ---- *************** *** 13,79 **** my @colors; ! main: { ! read_db(); ! analyze_tree(); ! print "\n"; ! for(my $xx=0; $xx<=$#parent; $xx++) ! { ! if ($xx == 0) ! { ! print "\"$tree[$xx][0]\" is the root. "; ! } ! else ! { ! print "\"$tree[$xx][0]\"'s parent is \"$tree[$parent[$xx]][0]\". "; ! } ! my $num_children = $#{$children[$xx]}+1; ! if ($num_children > 0) ! { ! if ($num_children == 1) ! { ! print "$num_children child. "; ! } ! else ! { ! print "$num_children children. "; ! } ! foreach my $child (@{$children[$xx]}) ! { ! print "\"$tree[$child][0]\" "; ! } ! } ! else ! { ! print "No children. "; ! } ! print "\n"; ! } ! print "\n"; ! ! for(my $xx=0; $xx<=$#children; $xx++) ! { ! print "Children $xx: "; ! for(my $yy=0; $yy<=$#{$children[$xx]}; $yy++) ! { ! print "($xx,$yy) $children[$xx][$yy] "; ! } ! print "\n"; ! } ! print "\n"; ! for(my $xx=0; $xx<=$#generation; $xx++) { ! print "Generation $xx: "; ! for(my $yy=0; $yy<=$#{$generation[$xx]}; $yy++) ! { ! print "($xx,$yy) $generation[$xx][$yy] "; ! } ! print "\n"; } ! print "\n"; tile(); # creates @table ! tile_pass2(); # modifies @table fixing mis-aligned nodes tile_color(); # reads @table, creates @colors tile_connect(); # modifies @table adding img tags --- 12,38 ---- my @colors; ! sub select_node { ! my @test_names = ("Choose Hybs", "Quality Control", "Stat Analysis", "Westfall & Young", "R Cluster", "QA2", "GO", "TreeView", "XCluster", "Test", "NNormal", "ProcA", "Cluster2", "Cyber T", "Subset", "StatMatch", "PVal", "Multi"); ! my $select_str = "<select name=\"select_node\">\n"; ! for(my $xx = 0; $xx<=$#test_names; $xx++) { ! $select_str .= "<option value=\"$test_names[$xx]\">$test_names[$xx]</option>\n"; } ! $select_str .= "</select>\n"; ! return $select_str; ! } + sub old_main + { + read_db(); + analyze_tree(); + # print_tree_info(); + # print_children_info(); + # print_generation_info(); + tile(); # creates @table ! tile_pass2(); # modifies @table fixing mis-aligned zeroth row nodes tile_color(); # reads @table, creates @colors tile_connect(); # modifies @table adding img tags *************** *** 84,114 **** close(OUT); ! print " 0 1 2 3 4 5 6 7 8 9\n"; ! for(my $xx=$#table; $xx>=0; $xx--) { ! if ($xx > 9) { print "$xx";} ! else { print "$xx "; } ! for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) ! { ! if ($table[$xx][$yy] < 10) { print " ";} ! if (defined($table[$xx][$yy])) ! { ! if ($table[$xx][$yy] =~ m/img/) ! { ! print "i"; ! } ! else ! { ! print "$table[$xx][$yy]"; ! } ! } ! else ! { ! print " "; ! } ! } ! print "\n"; } } --- 43,110 ---- close(OUT); ! print_ascii_tree(); ! } ! ! sub render_at ! { ! analyze_tree(); # reads @tree, created @parent, @children, @generation ! # print_tree_info(); ! # print_children_info(); ! # print_generation_info(); ! ! tile(); # creates @table, @loc ! tile_pass2(); # modifies @table, @loc fixing mis-aligned zeroth row nodes ! tile_color(); # reads @table, creates @colors ! tile_connect(); # modifies @table adding img tags, reads @loc ! my $html = render_html(); # reads @table, @colors ! ! # print_ascii_tree(); ! ! return $html; ! } ! ! sub write_db ! { ! my @tree = @{$_[0]}; ! open(OUT, "> /var/genres/twl8n/tree.txt"); ! for(my $tc=0; $tc<=$#tree; $tc++) { ! print OUT "$tree[$tc][0],$tree[$tc][1]\n"; } + close(IN); + } + + sub read_db + { + open(IN, "< /var/genres/twl8n/tree.txt"); + my $tc = 0; + while(my $temp = <IN>) + { + ($tree[$tc][0], $tree[$tc][1]) = split(',',$temp); + $tc++; + } + close(IN); + if (1 == 0) + { + @{$tree[0]} = ("Choose Hybs", 0); # root has itself as parent + @{$tree[1]} = ("Quality Control", 0); + @{$tree[2]} = ("Stat Analysis", 1); + @{$tree[3]} = ("Westfall & Young", 1); + @{$tree[4]} = ("R Cluster", 3); + @{$tree[5]} = ("QA2", 2); + @{$tree[6]} = ("GO", 3); + @{$tree[7]} = ("TreeView", 2); + @{$tree[8]} = ("XCluster", 2); + @{$tree[9]} = ("Test", 6); + @{$tree[10]} = ("NNormal", 7); + @{$tree[11]} = ("ProcA", 9); + @{$tree[13]} = ("Cluster2", 3); + @{$tree[12]} = ("Cyber T", 0); + @{$tree[13]} = ("Subset", 12); + @{$tree[14]} = ("StatMatch", 13); + @{$tree[15]} = ("PVal" , 3); + @{$tree[16]} = ("Multi", 3); + } } *************** *** 124,128 **** if (defined($table[$xx][$yy])) { ! if ($parent[$table[$xx][$yy]] != $prev_parent) { # print "p: $parent[$table[$xx][$yy]] pp: $prev_parent\n"; --- 120,125 ---- if (defined($table[$xx][$yy])) { ! # special case for the root ! if (($parent[$table[$xx][$yy]] != $prev_parent) || ($table[$xx][$yy] == 0)) { # print "p: $parent[$table[$xx][$yy]] pp: $prev_parent\n"; *************** *** 131,140 **** } $colors[$xx][$yy] = $choices[$gc%5]; ! # print "$xx, $yy: $colors[$xx][$yy]\n"; } } ! $gc++ # increment every time we change a row, since the generation changes as well. } - } --- 128,136 ---- } $colors[$xx][$yy] = $choices[$gc%5]; ! # print "$xx, $yy: " . $gc%5 . " $colors[$xx][$yy]\n"; } } ! # $gc++ # increment every time we change a row, since the generation changes as well. } } *************** *** 157,172 **** { # make sure the row is 75 pixels tall. ! $html .= "\n<tr><td><img src=\"white.gif\" width=\"5\" height=\"75\"></td>\n"; for(my $yy=0; $yy<=$tmax; $yy++) { if (defined($table[$xx][$yy])) { ! if ($table[$xx][$yy] =~ m/img/) { ! $html .= "<td width=\"75\">$table[$xx][$yy]</td>\n"; } else { ! $html .= "<td width=\"75\" bgcolor=\"$colors[$xx][$yy]\"><div align=\"center\">$tree[$table[$xx][$yy]][0]</div></td>\n"; } } --- 153,173 ---- { # make sure the row is 75 pixels tall. ! $html .= "\n<tr><td><img src=\"../graphics/white.gif\" width=\"5\" height=\"75\"></td>\n"; for(my $yy=0; $yy<=$tmax; $yy++) { if (defined($table[$xx][$yy])) { ! my $node = $table[$xx][$yy]; ! if ($node =~ m/img/) { ! $html .= "<td width=\"75\">$node</td>\n"; } else { ! $html .= "<td width=\"75\" bgcolor=\"$colors[$xx][$yy]\"> ! <input type=\"radio\" name=\"add_node\" value=\"$node\"> ! <input type=\"hidden\" name=\"node_$node\" value=\"$tree[$node][0]\"> ! <input type=\"hidden\" name=\"parent_$node\" value=\"$parent[$node]\"> ! <div align=\"center\">$tree[$node][0]</div></td>\n"; } } *************** *** 204,211 **** $px = $loc{$parent}[0]; $py = $loc{$parent}[1]; ! print "$xx, $yy $table[$xx][$yy] parent: $px $py\n"; if ($py == $yy) { ! $table[$xx+1][$yy] = "<img src=\"15a.gif\">"; } elsif ($py <= ($yy-1)) --- 205,212 ---- $px = $loc{$parent}[0]; $py = $loc{$parent}[1]; ! # print "$xx, $yy $table[$xx][$yy] parent: $px $py\n"; if ($py == $yy) { ! $table[$xx+1][$yy] = "<img src=\"../graphics/15a.gif\">"; } elsif ($py <= ($yy-1)) *************** *** 213,217 **** if ($py < ($yy-1)) { ! $table[$xx+2][$yy-1] = "<img src=\"74.gif\">"; for(my $pp=2; $py < $yy-$pp; $pp++) { --- 214,218 ---- if ($py < ($yy-1)) { ! $table[$xx+2][$yy-1] = "<img src=\"../graphics/74.gif\">"; for(my $pp=2; $py < $yy-$pp; $pp++) { *************** *** 219,231 **** if ($table[$xx+2][$yy-$pp] =~ m/74\.gif/) { ! $table[$xx+2][$yy-$pp] = "<img src=\"7374.gif\">"; } else { ! $table[$xx+2][$yy-$pp] = "<img src=\"73.gif\">"; } } } ! $table[$xx+1][$yy] = "<img src=\"05a.gif\">"; } elsif ($py >= ($yy+1)) --- 220,232 ---- if ($table[$xx+2][$yy-$pp] =~ m/74\.gif/) { ! $table[$xx+2][$yy-$pp] = "<img src=\"../graphics/7374.gif\">"; } else { ! $table[$xx+2][$yy-$pp] = "<img src=\"../graphics/73.gif\">"; } } } ! $table[$xx+1][$yy] = "<img src=\"../graphics/05a.gif\">"; } elsif ($py >= ($yy+1)) *************** *** 235,243 **** if ($table[$xx+2][$yy+1] =~ m/img/) { ! $table[$xx+2][$yy+1] = "<img src=\"7336.gif\">"; } else { ! $table[$xx+2][$yy+1] = "<img src=\"36.gif\">"; } for(my $pp=2; $py > $yy+$pp; $pp++) --- 236,244 ---- if ($table[$xx+2][$yy+1] =~ m/img/) { ! $table[$xx+2][$yy+1] = "<img src=\"../graphics/7336.gif\">"; } else { ! $table[$xx+2][$yy+1] = "<img src=\"../graphics/36.gif\">"; } for(my $pp=2; $py > $yy+$pp; $pp++) *************** *** 246,258 **** if ($table[$xx+2][$yy+$pp] =~ m/36\.gif/) { ! $table[$xx+2][$yy+$pp] = "<img src=\"7336.gif\">"; } else { ! $table[$xx+2][$yy+$pp] = "<img src=\"73.gif\">"; } } } ! $table[$xx+1][$yy] = "<img src=\"25a.gif\">"; } } --- 247,259 ---- if ($table[$xx+2][$yy+$pp] =~ m/36\.gif/) { ! $table[$xx+2][$yy+$pp] = "<img src=\"../graphics/7336.gif\">"; } else { ! $table[$xx+2][$yy+$pp] = "<img src=\"../graphics/73.gif\">"; } } } ! $table[$xx+1][$yy] = "<img src=\"../graphics/25a.gif\">"; } } *************** *** 349,366 **** my $kid_min = 0; $gen_max = 0; ! for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) { ! for(my $cc=0; $cc<=$#{$children[0]}; $cc++) { ! if (($table[$row-2][$gg] > 0) && ($kid_min == 0)) ! { ! $kid_min = $table[$row-2][$gg]; ! } ! if (($table[$row-2][$gg] == $children[0][$cc]) && ($gg > $gen_max)) { ! $gen_max = $gg; } } } my $gen_diff = $gen_max - $kid_min; $col = $kid_min + int(($gen_diff/2)+0.5); # If $node has children, center above them --- 350,374 ---- my $kid_min = 0; $gen_max = 0; ! if ($#table >= 2) { ! for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) { ! for(my $cc=0; $cc<=$#{$children[0]}; $cc++) { ! if (($table[$row-2][$gg] > 0) && ($kid_min == 0)) ! { ! $kid_min = $table[$row-2][$gg]; ! } ! if (($table[$row-2][$gg] == $children[0][$cc]) && ($gg > $gen_max)) ! { ! $gen_max = $gg; ! } } } } + else + { + $gen_max = 1; + } my $gen_diff = $gen_max - $kid_min; $col = $kid_min + int(($gen_diff/2)+0.5); # If $node has children, center above them *************** *** 369,376 **** } ! # This has correct x and y axis sub tile_pass2 { ! for(my $yy=0; $yy<$#table; $yy+=2) { for(my $xx=$#{$table[$yy]}; $xx>=0; $xx--) --- 377,391 ---- } ! # ! # This has correct x and y axis (reversed in @table), unlike most (or all) of the code above. ! # This moves the zeroth row, which can get ! # mis-aligned because there is no subsequent generation. ! # Applying this fix to any row except the zeroth row causes problems. ! # sub tile_pass2 { ! # Instead of looping, just do the zeroth row. ! # for(my $yy=0; $yy<$#table; $yy+=2) ! my $yy = 0; { for(my $xx=$#{$table[$yy]}; $xx>=0; $xx--) *************** *** 393,396 **** --- 408,412 ---- while(($parent_x > $node_x) && (!defined($table[$yy][$node_x+1]))) { + # print "$table[$yy][$node_x] p_x: $parent_x n_x: $node_x\n"; $table[$yy][$node_x+1] = $table[$yy][$node_x]; $loc{$table[$yy][$node_x]}[1] = $node_x+1; *************** *** 404,439 **** } - - - - sub read_db - { - # id,name,parent - # 1,"get data",0 - # 2,"Quality Control",1 - # 3,"Stat Analysis",2 - # 4,"Westfall & Young",2 - - @{$tree[0]} = ("Choose Hybs", 0); # root has itself as parent - @{$tree[1]} = ("Quality Control", 0); - @{$tree[2]} = ("Stat Analysis", 1); - @{$tree[3]} = ("Westfall & Young", 1); - @{$tree[4]} = ("R Cluster", 3); - @{$tree[5]} = ("QA2", 2); - @{$tree[6]} = ("GO", 3); - @{$tree[7]} = ("TreeView", 2); - @{$tree[8]} = ("XCluster", 2); - @{$tree[9]} = ("Test", 6); - @{$tree[10]} = ("NNormal", 7); - @{$tree[11]} = ("ProcA", 9); - @{$tree[13]} = ("Cluster2", 3); - @{$tree[12]} = ("Cyber T", 0); - @{$tree[13]} = ("Subset", 12); - @{$tree[14]} = ("StatMatch", 13); - @{$tree[15]} = ("PVal" , 13); - @{$tree[16]} = ("Multi", 13); - return (@tree,2); - } - sub analyze_tree { --- 420,423 ---- *************** *** 454,457 **** --- 438,442 ---- $node2g{0} = 0; push(@{$generation[$node2g{0}]}, 0); + $parent[0] = 0; for($xx = 0; $xx<=$#tree; $xx++) { *************** *** 460,464 **** if ($tree[$yy][1] == $xx) { ! print "$xx $tree[$xx][0] is parent of $tree[$yy][0] $tree[$yy][1]\n"; $parent[$yy] = $xx; # we can only have one parent push(@{$children[$xx]}, $yy); # add self to parent's children list --- 445,449 ---- if ($tree[$yy][1] == $xx) { ! # print "$xx $tree[$xx][0] is parent of $tree[$yy][0] $tree[$yy][1]\n"; $parent[$yy] = $xx; # we can only have one parent push(@{$children[$xx]}, $yy); # add self to parent's children list *************** *** 468,484 **** } } - # - # number of children - # who is my child?? - # } ! sub draw_sibs { ! my @tree = @{$_[0]}; ! foreach my $tree_pk (@tree) { ! } } --- 453,550 ---- } } } + sub print_tree_info + { + for(my $xx=0; $xx<=$#parent; $xx++) + { + if ($xx == 0) + { + print "\"$tree[$xx][0]\" is the root. "; + } + else + { + print "\"$tree[$xx][0]\"'s parent is \"$tree[$parent[$xx]][0]\". "; + } + my $num_children = $#{$children[$xx]}+1; + if ($num_children > 0) + { + if ($num_children == 1) + { + print "$num_children child. "; + } + else + { + print "$num_children children. "; + } + foreach my $child (@{$children[$xx]}) + { + print "\"$tree[$child][0]\" "; + } + } + else + { + print "No children. "; + } + print "\n"; + } + print "\n"; + } ! sub print_children_info { ! for(my $xx=0; $xx<=$#children; $xx++) { ! print "Children $xx: "; ! for(my $yy=0; $yy<=$#{$children[$xx]}; $yy++) ! { ! print "($xx,$yy) $children[$xx][$yy] "; ! } ! print "\n"; ! } ! print "\n"; ! } ! ! sub print_generation_info ! { ! for(my $xx=0; $xx<=$#generation; $xx++) ! { ! print "Generation $xx: "; ! for(my $yy=0; $yy<=$#{$generation[$xx]}; $yy++) ! { ! print "($xx,$yy) $generation[$xx][$yy] "; ! } ! print "\n"; ! } ! print "\n"; ! } ! ! sub print_ascii_tree ! { ! print " 0 1 2 3 4 5 6 7 8 9\n"; ! for(my $xx=$#table; $xx>=0; $xx--) ! { ! if ($xx > 9) { print "$xx";} ! else { print "$xx "; } ! for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) ! { ! if ($table[$xx][$yy] < 10) { print " ";} ! if (defined($table[$xx][$yy])) ! { ! if ($table[$xx][$yy] =~ m/img/) ! { ! print "i"; ! } ! else ! { ! print "$table[$xx][$yy]"; ! } ! } ! else ! { ! print " "; ! } ! } ! print "\n"; } } |
From: <tw...@us...> - 2002-10-31 20:49:37
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv3669 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: Fixed a problem with a second pass. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -C2 -d -r1.1.2.11 -r1.1.2.12 *** analysis_tree_lib.pl 31 Oct 2002 18:50:47 -0000 1.1.2.11 --- analysis_tree_lib.pl 31 Oct 2002 20:49:33 -0000 1.1.2.12 *************** *** 74,78 **** print "\n"; ! tile(); # creates @table; tile_color(); # reads @table, creates @colors tile_connect(); # modifies @table adding img tags --- 74,79 ---- print "\n"; ! tile(); # creates @table ! tile_pass2(); # modifies @table fixing mis-aligned nodes tile_color(); # reads @table, creates @colors tile_connect(); # modifies @table adding img tags *************** *** 83,90 **** close(OUT); ! print " 0 1 2 3 4 5 6 7 8 9\n"; for(my $xx=$#table; $xx>=0; $xx--) { ! print "$xx"; for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) { --- 84,92 ---- close(OUT); ! print " 0 1 2 3 4 5 6 7 8 9\n"; for(my $xx=$#table; $xx>=0; $xx--) { ! if ($xx > 9) { print "$xx";} ! else { print "$xx "; } for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) { *************** *** 129,133 **** } $colors[$xx][$yy] = $choices[$gc%5]; ! print "$xx, $yy: $colors[$xx][$yy]\n"; } } --- 131,135 ---- } $colors[$xx][$yy] = $choices[$gc%5]; ! # print "$xx, $yy: $colors[$xx][$yy]\n"; } } *************** *** 151,158 **** } my $table_width = 75 * $tmax; ! $html = "<table width=\"$table_width\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\">"; for(my $xx=($#table); $xx>=0; $xx--) { ! $html .= "\n<tr>\n"; for(my $yy=0; $yy<=$tmax; $yy++) { --- 153,161 ---- } my $table_width = 75 * $tmax; ! $html = "<table width=\"$table_width\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">"; for(my $xx=($#table); $xx>=0; $xx--) { ! # make sure the row is 75 pixels tall. ! $html .= "\n<tr><td><img src=\"white.gif\" width=\"5\" height=\"75\"></td>\n"; for(my $yy=0; $yy<=$tmax; $yy++) { *************** *** 170,174 **** else { ! $html .= "<td width=\"75\"><img src=\"white.gif\" width=\"75\" height=\"75\"></td>\n"; } } --- 173,177 ---- else { ! $html .= "<td width=\"75\"> </td>\n"; } } *************** *** 201,205 **** $px = $loc{$parent}[0]; $py = $loc{$parent}[1]; ! print "$xx $yy: $table[$xx][$yy] $px $py\n"; if ($py == $yy) { --- 204,208 ---- $px = $loc{$parent}[0]; $py = $loc{$parent}[1]; ! print "$xx, $yy $table[$xx][$yy] parent: $px $py\n"; if ($py == $yy) { *************** *** 366,369 **** --- 369,409 ---- } + # This has correct x and y axis + sub tile_pass2 + { + for(my $yy=0; $yy<$#table; $yy+=2) + { + for(my $xx=$#{$table[$yy]}; $xx>=0; $xx--) + { + if (defined($table[$yy][$xx])) + { + # get parent's x coord + my $parent_node = $parent[$table[$yy][$xx]]; + my $parent_x; + my $node_x = $xx; + for(my $zz=0; $zz<=$#{$table[$yy+2]}; $zz++) + { + if ($table[$yy+2][$zz] == $parent_node) + { + $parent_x = $zz; + last; + } + } + # loop, moving to x+1 while x+1 < parent_x and as long as x+1 is an empty tile. + while(($parent_x > $node_x) && (!defined($table[$yy][$node_x+1]))) + { + $table[$yy][$node_x+1] = $table[$yy][$node_x]; + $loc{$table[$yy][$node_x]}[1] = $node_x+1; + undef($table[$yy][$node_x]); # will this work? + $node_x++; + } + } + } + } + + } + + + sub read_db *************** *** 384,393 **** @{$tree[7]} = ("TreeView", 2); @{$tree[8]} = ("XCluster", 2); ! @{$tree[9]} = ("Test", 8); ! @{$tree[10]} = ("NNormal", 9); @{$tree[11]} = ("ProcA", 9); ! @{$tree[13]} = ("Cluster2", 9); @{$tree[12]} = ("Cyber T", 0); ! return (@tree,2); } --- 424,436 ---- @{$tree[7]} = ("TreeView", 2); @{$tree[8]} = ("XCluster", 2); ! @{$tree[9]} = ("Test", 6); ! @{$tree[10]} = ("NNormal", 7); @{$tree[11]} = ("ProcA", 9); ! @{$tree[13]} = ("Cluster2", 3); @{$tree[12]} = ("Cyber T", 0); ! @{$tree[13]} = ("Subset", 12); ! @{$tree[14]} = ("StatMatch", 13); ! @{$tree[15]} = ("PVal" , 13); ! @{$tree[16]} = ("Multi", 13); return (@tree,2); } |
From: <tw...@us...> - 2002-10-31 18:50:52
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv18061 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: colors, spacer for col height, the rest of the arrows, some comments. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.10 retrieving revision 1.1.2.11 diff -C2 -d -r1.1.2.10 -r1.1.2.11 *** analysis_tree_lib.pl 31 Oct 2002 16:10:17 -0000 1.1.2.10 --- analysis_tree_lib.pl 31 Oct 2002 18:50:47 -0000 1.1.2.11 *************** *** 10,13 **** --- 10,15 ---- my @generation; my %loc; + my @table; + my @colors; main: *************** *** 72,78 **** print "\n"; ! my @table = tile(); ! @table = tile_connect(\@table); ! my $html = render_html(\@table); open(OUT, "> /home/twl8n/public_html/test.html"); --- 74,81 ---- print "\n"; ! tile(); # creates @table; ! tile_color(); # reads @table, creates @colors ! tile_connect(); # modifies @table adding img tags ! my $html = render_html(); # reads @table, @colors open(OUT, "> /home/twl8n/public_html/test.html"); *************** *** 108,115 **** } sub render_html { ! my @table = @{$_[0]}; ! my $html = '<table width="760" border="1" cellpadding="3" cellspacing="0">'; my $tmax = 0; for(my $xx=($#table); $xx>=0; $xx--) --- 111,145 ---- } + sub tile_color + { + my @choices = ("#FFCCFF", "#FFCCCC", "#CCFFFF", "#CCFFCC", "#CCCCFF"); + my $gc = 0; # generation counter; + my $prev_parent = -1; # parent of the previous table entry + for(my $xx = 0; $xx<=$#table; $xx++) + { + for(my $yy = 0; $yy<=$#{$table[$xx]}; $yy++) + { + if (defined($table[$xx][$yy])) + { + if ($parent[$table[$xx][$yy]] != $prev_parent) + { + # print "p: $parent[$table[$xx][$yy]] pp: $prev_parent\n"; + $gc++; + $prev_parent = $parent[$table[$xx][$yy]]; + } + $colors[$xx][$yy] = $choices[$gc%5]; + print "$xx, $yy: $colors[$xx][$yy]\n"; + } + } + $gc++ # increment every time we change a row, since the generation changes as well. + } + + } + sub render_html { ! # @table is a global ! ! my $html; my $tmax = 0; for(my $xx=($#table); $xx>=0; $xx--) *************** *** 120,123 **** --- 150,155 ---- } } + my $table_width = 75 * $tmax; + $html = "<table width=\"$table_width\" border=\"1\" cellpadding=\"3\" cellspacing=\"0\">"; for(my $xx=($#table); $xx>=0; $xx--) { *************** *** 129,142 **** if ($table[$xx][$yy] =~ m/img/) { ! $html .= "<td>$table[$xx][$yy]</td>\n"; } else { ! $html .= "<td>$tree[$table[$xx][$yy]][0]</td>\n"; } } else { ! $html .= "<td> <br><br></td>\n"; } } --- 161,174 ---- if ($table[$xx][$yy] =~ m/img/) { ! $html .= "<td width=\"75\">$table[$xx][$yy]</td>\n"; } else { ! $html .= "<td width=\"75\" bgcolor=\"$colors[$xx][$yy]\"><div align=\"center\">$tree[$table[$xx][$yy]][0]</div></td>\n"; } } else { ! $html .= "<td width=\"75\"><img src=\"white.gif\" width=\"75\" height=\"75\"></td>\n"; } } *************** *** 149,153 **** sub tile_connect { ! my @table = @{$_[0]}; my $tmax = 0; my $px; --- 181,185 ---- sub tile_connect { ! # @table is a global my $tmax = 0; my $px; *************** *** 179,182 **** --- 211,226 ---- { $table[$xx+2][$yy-1] = "<img src=\"74.gif\">"; + for(my $pp=2; $py < $yy-$pp; $pp++) + { + # if it already contains an img 74.gif then replace with 7374.gif + if ($table[$xx+2][$yy-$pp] =~ m/74\.gif/) + { + $table[$xx+2][$yy-$pp] = "<img src=\"7374.gif\">"; + } + else + { + $table[$xx+2][$yy-$pp] = "<img src=\"73.gif\">"; + } + } } $table[$xx+1][$yy] = "<img src=\"05a.gif\">"; *************** *** 186,190 **** if ($py > ($yy+1)) { ! $table[$xx+2][$yy+1] = "<img src=\"36.gif\">"; } $table[$xx+1][$yy] = "<img src=\"25a.gif\">"; --- 230,253 ---- if ($py > ($yy+1)) { ! if ($table[$xx+2][$yy+1] =~ m/img/) ! { ! $table[$xx+2][$yy+1] = "<img src=\"7336.gif\">"; ! } ! else ! { ! $table[$xx+2][$yy+1] = "<img src=\"36.gif\">"; ! } ! for(my $pp=2; $py > $yy+$pp; $pp++) ! { ! # if we already have image 36.gif then replace with 7336.gif ! if ($table[$xx+2][$yy+$pp] =~ m/36\.gif/) ! { ! $table[$xx+2][$yy+$pp] = "<img src=\"7336.gif\">"; ! } ! else ! { ! $table[$xx+2][$yy+$pp] = "<img src=\"73.gif\">"; ! } ! } } $table[$xx+1][$yy] = "<img src=\"25a.gif\">"; *************** *** 193,197 **** } } - return @table; } --- 256,259 ---- *************** *** 208,215 **** sub tile { my $row = 0; my $col = 0; ! my @table; ! my $gen_carry; for(my $xx=$#generation; $xx > 0; $xx--) { --- 270,277 ---- sub tile { + # @table is a global my $row = 0; my $col = 0; ! my $gen_max; for(my $xx=$#generation; $xx > 0; $xx--) { *************** *** 217,225 **** my $kid_total; $kid_total = 0; - $gen_carry = 0; for(my $yy=0; $yy<=$#{$generation[$xx-1]}; $yy++) { my $num_children = $#{$children[$generation[$xx-1][$yy]]}; ! print "num_c:$num_children of $generation[$xx-1][$yy] "; if ($num_children < 0) { --- 279,289 ---- my $kid_total; $kid_total = 0; for(my $yy=0; $yy<=$#{$generation[$xx-1]}; $yy++) { my $num_children = $#{$children[$generation[$xx-1][$yy]]}; ! # If there are no children, the $num_children will be -1 since ! # it is an array index. If so, we still have to increment the ! # column for the current generation (children) to leave a blank ! # column below parents without children. if ($num_children < 0) { *************** *** 230,285 **** my $node = $children[$generation[$xx-1][$yy]][$nc]; my $kid_count = $#{$children[$node]} +1; ! $gen_carry = 0; ! if ($row >= 2) ! { for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) { for(my $cc=0; $cc<=$#{$children[$node]}; $cc++) { ! if (($table[$row-2][$gg] == $children[$node][$cc]) && ($gg > $gen_carry)) { ! $gen_carry = $gg; } } } } ! #my $temp = "$node (nc: $nc kc: $kid_count gc: $gen_carry kt: $kid_total) $col, "; ! my $gen_diff = $gen_carry - $kid_total; if ($gen_diff < 0) { $gen_diff = 0; } ! $col = $kid_total + int(($gen_diff/2)+0.5); # If $node has children, center above them ! #$temp .= "$col, "; ! $table[$row][$col] = $node; ! @{$loc{$node}} = ($row, $col); ! print "(xx:$xx, yy:$yy, nc:$nc, gd:$gen_diff) $row, $col: $node\n"; if ($kid_count > 0) { ! $kid_total += $kid_count; } else { ! $kid_total++; # at least one for the parent } ! if ($kid_total < $gen_carry) { ! $kid_total = $gen_carry + 1; } - #$temp .= "$col (kt: $kid_total)"; - #print "$temp\n"; } - # - # If we added a node, col was ++, but if not, - # we still need to ++ col due to the parent. - # - if ($num_children < 0) {$col++; } - # $gen_carry = $kid_total; } ! $row+=2; ! # $gen_carry = $kid_total; } my $kid_min = 0; ! $gen_carry = 0; for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) { --- 294,349 ---- my $node = $children[$generation[$xx-1][$yy]][$nc]; my $kid_count = $#{$children[$node]} +1; ! $gen_max = 0; # highest column number of my children; used to align parent above sibling columns ! if ($row >= 2) # only check this after we've layed out at least on generation ! { # remember we increment row by two, leaving room for tile connectors for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) { for(my $cc=0; $cc<=$#{$children[$node]}; $cc++) { ! if (($table[$row-2][$gg] == $children[$node][$cc]) && ($gg > $gen_max)) { ! $gen_max = $gg; } } } } ! # How much of the previous row is just my children ($gen_diff) ! # Don't allow negative numbers. The answer is always at least zero. ! my $gen_diff = $gen_max - $kid_total; if ($gen_diff < 0) { $gen_diff = 0; } ! $col = $kid_total + int(($gen_diff/2)+0.5); # If $node has children, center above them ! $table[$row][$col] = $node; # Actually write the node into @table ! @{$loc{$node}} = ($row, $col); # Also put node's location into the %loc hash ! # track number of kids for the next iteration ! # at least one for the parent; if there is at least one kid, it lines up ! # with the parent, but if zero kids, then we still need ! # one column below the parent if ($kid_count > 0) { ! $kid_total += $kid_count; } else { ! $kid_total++; } ! # The columns need to account for the children's generation, and we need to at least ! # be beyond the last col of the children's generation. ! if ($kid_total < $gen_max) { ! $kid_total = $gen_max + 1; } } } ! $row+=2; # Increment by two in order to leave a blank row for the connector tiles. } + # + # Fix the root node. We have to repeat most of what happens above, + # but with some hard coded values. + # my $kid_min = 0; ! $gen_max = 0; for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) { *************** *** 290,306 **** $kid_min = $table[$row-2][$gg]; } ! if (($table[$row-2][$gg] == $children[0][$cc]) && ($gg > $gen_carry)) { ! $gen_carry = $gg; } } } ! my $gen_diff = $gen_carry - $kid_min; ! print "gd: $gen_diff km: $kid_min\n"; ! $col = $kid_min + int(($gen_diff/2)+0.5); # If $node has children, center above them ! # print "zero at $row $col\n"; ! $table[$row][$col] = 0; ! @{$loc{0}} = ($row, $col); ! return @table; } --- 354,367 ---- $kid_min = $table[$row-2][$gg]; } ! if (($table[$row-2][$gg] == $children[0][$cc]) && ($gg > $gen_max)) { ! $gen_max = $gg; } } } ! my $gen_diff = $gen_max - $kid_min; ! $col = $kid_min + int(($gen_diff/2)+0.5); # If $node has children, center above them ! $table[$row][$col] = 0; # root's entry in @table ! @{$loc{0}} = ($row, $col); # root's entry in %loc } *************** *** 318,331 **** @{$tree[2]} = ("Stat Analysis", 1); @{$tree[3]} = ("Westfall & Young", 1); ! @{$tree[4]} = ("R Cluster", 2); ! @{$tree[5]} = ("QA2", 0); ! @{$tree[6]} = ("GO", 5); ! @{$tree[7]} = ("TreeView", 5); ! @{$tree[8]} = ("XCluster", 5); @{$tree[9]} = ("Test", 8); ! @{$tree[10]} = ("NNormal", 3); ! @{$tree[11]} = ("ProcA", 3); ! @{$tree[13]} = ("Cluster2", 3); ! @{$tree[12]} = ("Cyber T", 1); return (@tree,2); --- 379,392 ---- @{$tree[2]} = ("Stat Analysis", 1); @{$tree[3]} = ("Westfall & Young", 1); ! @{$tree[4]} = ("R Cluster", 3); ! @{$tree[5]} = ("QA2", 2); ! @{$tree[6]} = ("GO", 3); ! @{$tree[7]} = ("TreeView", 2); ! @{$tree[8]} = ("XCluster", 2); @{$tree[9]} = ("Test", 8); ! @{$tree[10]} = ("NNormal", 9); ! @{$tree[11]} = ("ProcA", 9); ! @{$tree[13]} = ("Cluster2", 9); ! @{$tree[12]} = ("Cyber T", 0); return (@tree,2); |
From: <tw...@us...> - 2002-10-31 16:10:25
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv13207 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: Parent nodes without children accounted for in children's generation. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.9 retrieving revision 1.1.2.10 diff -C2 -d -r1.1.2.9 -r1.1.2.10 *** analysis_tree_lib.pl 30 Oct 2002 20:09:14 -0000 1.1.2.9 --- analysis_tree_lib.pl 31 Oct 2002 16:10:17 -0000 1.1.2.10 *************** *** 221,224 **** --- 221,229 ---- { my $num_children = $#{$children[$generation[$xx-1][$yy]]}; + print "num_c:$num_children of $generation[$xx-1][$yy] "; + if ($num_children < 0) + { + $kid_total++; + } for(my $nc=0; $nc<=$num_children; $nc++) { *************** *** 249,253 **** $table[$row][$col] = $node; @{$loc{$node}} = ($row, $col); ! print "($xx, $yy, $nc, $gen_diff) $row, $col: $node\n"; if ($kid_count > 0) { --- 254,258 ---- $table[$row][$col] = $node; @{$loc{$node}} = ($row, $col); ! print "(xx:$xx, yy:$yy, nc:$nc, gd:$gen_diff) $row, $col: $node\n"; if ($kid_count > 0) { *************** *** 318,325 **** @{$tree[7]} = ("TreeView", 5); @{$tree[8]} = ("XCluster", 5); ! @{$tree[9]} = ("Test", 3); @{$tree[10]} = ("NNormal", 3); @{$tree[11]} = ("ProcA", 3); ! @{$tree[13]} = ("Cluster2", 12); @{$tree[12]} = ("Cyber T", 1); --- 323,330 ---- @{$tree[7]} = ("TreeView", 5); @{$tree[8]} = ("XCluster", 5); ! @{$tree[9]} = ("Test", 8); @{$tree[10]} = ("NNormal", 3); @{$tree[11]} = ("ProcA", 3); ! @{$tree[13]} = ("Cluster2", 3); @{$tree[12]} = ("Cyber T", 1); |
From: <tw...@us...> - 2002-10-30 20:09:18
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv29633 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: tile connectors. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.8 retrieving revision 1.1.2.9 diff -C2 -d -r1.1.2.8 -r1.1.2.9 *** analysis_tree_lib.pl 30 Oct 2002 18:53:23 -0000 1.1.2.8 --- analysis_tree_lib.pl 30 Oct 2002 20:09:14 -0000 1.1.2.9 *************** *** 9,12 **** --- 9,13 ---- my %node2g; my @generation; + my %loc; main: *************** *** 72,76 **** my @table = tile(); ! my $html = render_html(\@table); --- 73,77 ---- my @table = tile(); ! @table = tile_connect(\@table); my $html = render_html(\@table); *************** *** 88,92 **** if (defined($table[$xx][$yy])) { ! print "$table[$xx][$yy]"; } else --- 89,100 ---- if (defined($table[$xx][$yy])) { ! if ($table[$xx][$yy] =~ m/img/) ! { ! print "i"; ! } ! else ! { ! print "$table[$xx][$yy]"; ! } } else *************** *** 103,115 **** { my @table = @{$_[0]}; ! my $html = '<table width="760" border="0" cellpadding="3" cellspacing="0">'; ! for(my $xx=($#table+1); $xx>=0; $xx--) { $html .= "\n<tr>\n"; ! for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) { if (defined($table[$xx][$yy])) { ! $html .= "<td>$tree[$table[$xx][$yy]][0]</td>\n"; } else --- 111,138 ---- { my @table = @{$_[0]}; ! my $html = '<table width="760" border="1" cellpadding="3" cellspacing="0">'; ! my $tmax = 0; ! for(my $xx=($#table); $xx>=0; $xx--) ! { ! if ($#{$table[$xx]} > $tmax) ! { ! $tmax = $#{$table[$xx]}; ! } ! } ! for(my $xx=($#table); $xx>=0; $xx--) { $html .= "\n<tr>\n"; ! for(my $yy=0; $yy<=$tmax; $yy++) { if (defined($table[$xx][$yy])) { ! if ($table[$xx][$yy] =~ m/img/) ! { ! $html .= "<td>$table[$xx][$yy]</td>\n"; ! } ! else ! { ! $html .= "<td>$tree[$table[$xx][$yy]][0]</td>\n"; ! } } else *************** *** 124,127 **** --- 147,199 ---- } + sub tile_connect + { + my @table = @{$_[0]}; + my $tmax = 0; + my $px; + my $py; + for(my $xx=($#table); $xx>=0; $xx--) + { + if ($#{$table[$xx]} > $tmax) + { + $tmax = $#{$table[$xx]}; + } + } + for(my $xx=($#table); $xx>=0; $xx--) + { + for(my $yy=0; $yy<=$tmax; $yy++) + { + if ($table[$xx][$yy] > 0) + { + my $parent = $parent[$table[$xx][$yy]]; + $px = $loc{$parent}[0]; + $py = $loc{$parent}[1]; + print "$xx $yy: $table[$xx][$yy] $px $py\n"; + if ($py == $yy) + { + $table[$xx+1][$yy] = "<img src=\"15a.gif\">"; + } + elsif ($py <= ($yy-1)) + { + if ($py < ($yy-1)) + { + $table[$xx+2][$yy-1] = "<img src=\"74.gif\">"; + } + $table[$xx+1][$yy] = "<img src=\"05a.gif\">"; + } + elsif ($py >= ($yy+1)) + { + if ($py > ($yy+1)) + { + $table[$xx+2][$yy+1] = "<img src=\"36.gif\">"; + } + $table[$xx+1][$yy] = "<img src=\"25a.gif\">"; + } + } + } + } + return @table; + } + # # Starting with highest generation, put children into the current row. *************** *** 158,165 **** for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) { - # print "t: $table[$row-2][$gg]\n"; for(my $cc=0; $cc<=$#{$children[$node]}; $cc++) { - # print "c: $children[$node][$cc]\n"; if (($table[$row-2][$gg] == $children[$node][$cc]) && ($gg > $gen_carry)) { --- 230,235 ---- *************** *** 169,173 **** } } ! my $temp = "$node (nc: $nc kc: $kid_count gc: $gen_carry kt: $kid_total) $col, "; my $gen_diff = $gen_carry - $kid_total; if ($gen_diff < 0) --- 239,243 ---- } } ! #my $temp = "$node (nc: $nc kc: $kid_count gc: $gen_carry kt: $kid_total) $col, "; my $gen_diff = $gen_carry - $kid_total; if ($gen_diff < 0) *************** *** 176,183 **** } $col = $kid_total + int(($gen_diff/2)+0.5); # If $node has children, center above them ! # $kid_total = $gen_carry; ! # if ($col < $kid_total) { $col = $kid_total; } # Start one col beyond previous node's children ! $temp .= "$col, "; $table[$row][$col] = $node; print "($xx, $yy, $nc, $gen_diff) $row, $col: $node\n"; if ($kid_count > 0) --- 246,252 ---- } $col = $kid_total + int(($gen_diff/2)+0.5); # If $node has children, center above them ! #$temp .= "$col, "; $table[$row][$col] = $node; + @{$loc{$node}} = ($row, $col); print "($xx, $yy, $nc, $gen_diff) $row, $col: $node\n"; if ($kid_count > 0) *************** *** 193,198 **** $kid_total = $gen_carry + 1; } ! $temp .= "$col (kt: $kid_total)"; ! print "$temp\n"; } # --- 262,267 ---- $kid_total = $gen_carry + 1; } ! #$temp .= "$col (kt: $kid_total)"; ! #print "$temp\n"; } # *************** *** 227,230 **** --- 296,300 ---- # print "zero at $row $col\n"; $table[$row][$col] = 0; + @{$loc{0}} = ($row, $col); return @table; } |
From: <tw...@us...> - 2002-10-30 18:53:26
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv11363 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: checkpoint Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -C2 -d -r1.1.2.7 -r1.1.2.8 *** analysis_tree_lib.pl 30 Oct 2002 18:31:17 -0000 1.1.2.7 --- analysis_tree_lib.pl 30 Oct 2002 18:53:23 -0000 1.1.2.8 *************** *** 153,160 **** my $node = $children[$generation[$xx-1][$yy]][$nc]; my $kid_count = $#{$children[$node]} +1; - - # This is wrong. Need to center above how the children are distributed - # in the table, and that depends on subsequent generations. This really needs - # some kind of max_kid_col_count/2 $gen_carry = 0; if ($row >= 2) --- 153,156 ---- *************** *** 175,185 **** my $temp = "$node (nc: $nc kc: $kid_count gc: $gen_carry kt: $kid_total) $col, "; my $gen_diff = $gen_carry - $kid_total; ! $col = $kid_total + int(($gen_diff+0.5)/2); # If $node has children, center above them ! ! if ($col < $kid_total) { $col = $kid_total; } # Start one col beyond previous node's children $temp .= "$col, "; - # $gen_carry = $col+1; $table[$row][$col] = $node; ! print "($xx, $yy, $nc) $row, $col: $node\n"; if ($kid_count > 0) { --- 171,184 ---- my $temp = "$node (nc: $nc kc: $kid_count gc: $gen_carry kt: $kid_total) $col, "; my $gen_diff = $gen_carry - $kid_total; ! if ($gen_diff < 0) ! { ! $gen_diff = 0; ! } ! $col = $kid_total + int(($gen_diff/2)+0.5); # If $node has children, center above them ! # $kid_total = $gen_carry; ! # if ($col < $kid_total) { $col = $kid_total; } # Start one col beyond previous node's children $temp .= "$col, "; $table[$row][$col] = $node; ! print "($xx, $yy, $nc, $gen_diff) $row, $col: $node\n"; if ($kid_count > 0) { *************** *** 190,196 **** $kid_total++; # at least one for the parent } $temp .= "$col (kt: $kid_total)"; print "$temp\n"; - # $col++; # we added a node, inc column } # --- 189,198 ---- $kid_total++; # at least one for the parent } + if ($kid_total < $gen_carry) + { + $kid_total = $gen_carry + 1; + } $temp .= "$col (kt: $kid_total)"; print "$temp\n"; } # *************** *** 242,246 **** @{$tree[3]} = ("Westfall & Young", 1); @{$tree[4]} = ("R Cluster", 2); ! @{$tree[5]} = ("Cyber T", 1); @{$tree[6]} = ("GO", 5); @{$tree[7]} = ("TreeView", 5); --- 244,248 ---- @{$tree[3]} = ("Westfall & Young", 1); @{$tree[4]} = ("R Cluster", 2); ! @{$tree[5]} = ("QA2", 0); @{$tree[6]} = ("GO", 5); @{$tree[7]} = ("TreeView", 5); *************** *** 249,253 **** @{$tree[10]} = ("NNormal", 3); @{$tree[11]} = ("ProcA", 3); ! @{$tree[12]} = ("QA2", 0); return (@tree,2); --- 251,256 ---- @{$tree[10]} = ("NNormal", 3); @{$tree[11]} = ("ProcA", 3); ! @{$tree[13]} = ("Cluster2", 12); ! @{$tree[12]} = ("Cyber T", 1); return (@tree,2); |
From: <tw...@us...> - 2002-10-30 18:31:22
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv27808 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: checkpoint. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.6 retrieving revision 1.1.2.7 diff -C2 -d -r1.1.2.6 -r1.1.2.7 *** analysis_tree_lib.pl 30 Oct 2002 15:05:34 -0000 1.1.2.6 --- analysis_tree_lib.pl 30 Oct 2002 18:31:17 -0000 1.1.2.7 *************** *** 9,12 **** --- 9,13 ---- my %node2g; my @generation; + main: { *************** *** 72,75 **** --- 73,82 ---- my @table = tile(); + my $html = render_html(\@table); + + open(OUT, "> /home/twl8n/public_html/test.html"); + print OUT "<html><body>$html</body></html>\n"; + close(OUT); + print " 0 1 2 3 4 5 6 7 8 9\n"; for(my $xx=$#table; $xx>=0; $xx--) *************** *** 79,83 **** { if ($table[$xx][$yy] < 10) { print " ";} ! if ($table[$xx][$yy]) { print "$table[$xx][$yy]"; --- 86,90 ---- { if ($table[$xx][$yy] < 10) { print " ";} ! if (defined($table[$xx][$yy])) { print "$table[$xx][$yy]"; *************** *** 93,96 **** --- 100,127 ---- } + sub render_html + { + my @table = @{$_[0]}; + my $html = '<table width="760" border="0" cellpadding="3" cellspacing="0">'; + for(my $xx=($#table+1); $xx>=0; $xx--) + { + $html .= "\n<tr>\n"; + for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) + { + if (defined($table[$xx][$yy])) + { + $html .= "<td>$tree[$table[$xx][$yy]][0]</td>\n"; + } + else + { + $html .= "<td> <br><br></td>\n"; + } + } + $html .= "</tr>\n"; + } + $html .= "</table>\n"; + return $html; + } + # # Starting with highest generation, put children into the current row. *************** *** 108,111 **** --- 139,143 ---- my $col = 0; my @table; + my $gen_carry; for(my $xx=$#generation; $xx > 0; $xx--) { *************** *** 113,116 **** --- 145,149 ---- my $kid_total; $kid_total = 0; + $gen_carry = 0; for(my $yy=0; $yy<=$#{$generation[$xx-1]}; $yy++) { *************** *** 120,129 **** my $node = $children[$generation[$xx-1][$yy]][$nc]; my $kid_count = $#{$children[$node]} +1; ! # my $temp = "$node (nc: $nc kc: $kid_count kt: $kid_total) $col, "; ! $col += int(($kid_count/2)-0.5); # If $node has children, center above them if ($col < $kid_total) { $col = $kid_total; } # Start one col beyond previous node's children ! # $temp .= "$col, "; $table[$row][$col] = $node; ! # print "($xx, $yy, $nc) $row, $col: $node\n"; if ($kid_count > 0) { --- 153,185 ---- my $node = $children[$generation[$xx-1][$yy]][$nc]; my $kid_count = $#{$children[$node]} +1; ! ! # This is wrong. Need to center above how the children are distributed ! # in the table, and that depends on subsequent generations. This really needs ! # some kind of max_kid_col_count/2 ! $gen_carry = 0; ! if ($row >= 2) ! { ! for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) ! { ! # print "t: $table[$row-2][$gg]\n"; ! for(my $cc=0; $cc<=$#{$children[$node]}; $cc++) ! { ! # print "c: $children[$node][$cc]\n"; ! if (($table[$row-2][$gg] == $children[$node][$cc]) && ($gg > $gen_carry)) ! { ! $gen_carry = $gg; ! } ! } ! } ! } ! my $temp = "$node (nc: $nc kc: $kid_count gc: $gen_carry kt: $kid_total) $col, "; ! my $gen_diff = $gen_carry - $kid_total; ! $col = $kid_total + int(($gen_diff+0.5)/2); # If $node has children, center above them ! if ($col < $kid_total) { $col = $kid_total; } # Start one col beyond previous node's children ! $temp .= "$col, "; ! # $gen_carry = $col+1; $table[$row][$col] = $node; ! print "($xx, $yy, $nc) $row, $col: $node\n"; if ($kid_count > 0) { *************** *** 134,140 **** $kid_total++; # at least one for the parent } ! # $temp .= "$col (kt: $kid_total)"; ! # print "$temp\n"; ! $col++; # we added a node, inc column } # --- 190,196 ---- $kid_total++; # at least one for the parent } ! $temp .= "$col (kt: $kid_total)"; ! print "$temp\n"; ! # $col++; # we added a node, inc column } # *************** *** 143,153 **** # if ($num_children < 0) {$col++; } } ! $row++; } ! #my $num_children = $#{$children[$generation[1][0]]}; ! #$col = int(($num_children/2)+0.5); ! $col = int(($#{$table[1]}/2)+0.5); ! $table[$row][$col] = 1; return @table; } --- 199,228 ---- # if ($num_children < 0) {$col++; } + # $gen_carry = $kid_total; } ! $row+=2; ! # $gen_carry = $kid_total; } ! my $kid_min = 0; ! $gen_carry = 0; ! for(my $gg=0; $gg<=$#{$table[$row-2]}; $gg++) ! { ! for(my $cc=0; $cc<=$#{$children[0]}; $cc++) ! { ! if (($table[$row-2][$gg] > 0) && ($kid_min == 0)) ! { ! $kid_min = $table[$row-2][$gg]; ! } ! if (($table[$row-2][$gg] == $children[0][$cc]) && ($gg > $gen_carry)) ! { ! $gen_carry = $gg; ! } ! } ! } ! my $gen_diff = $gen_carry - $kid_min; ! print "gd: $gen_diff km: $kid_min\n"; ! $col = $kid_min + int(($gen_diff/2)+0.5); # If $node has children, center above them ! # print "zero at $row $col\n"; ! $table[$row][$col] = 0; return @table; } *************** *** 170,177 **** @{$tree[6]} = ("GO", 5); @{$tree[7]} = ("TreeView", 5); ! @{$tree[8]} = ("XCluster", 1); @{$tree[9]} = ("Test", 3); @{$tree[10]} = ("NNormal", 3); ! @{$tree[11]} = ("ProcA", 7); return (@tree,2); --- 245,253 ---- @{$tree[6]} = ("GO", 5); @{$tree[7]} = ("TreeView", 5); ! @{$tree[8]} = ("XCluster", 5); @{$tree[9]} = ("Test", 3); @{$tree[10]} = ("NNormal", 3); ! @{$tree[11]} = ("ProcA", 3); ! @{$tree[12]} = ("QA2", 0); return (@tree,2); *************** *** 195,199 **** # $node2g{0} = 0; ! # push(@{$generation[$node2g{0}]}, 1); for($xx = 0; $xx<=$#tree; $xx++) { --- 271,275 ---- # $node2g{0} = 0; ! push(@{$generation[$node2g{0}]}, 0); for($xx = 0; $xx<=$#tree; $xx++) { *************** *** 206,210 **** push(@{$children[$xx]}, $yy); # add self to parent's children list $node2g{$yy} = $node2g{$parent[$yy]} + 1; ! push(@{$generation[$node2g{$yy}-1]}, $yy); } } --- 282,286 ---- push(@{$children[$xx]}, $yy); # add self to parent's children list $node2g{$yy} = $node2g{$parent[$yy]} + 1; ! push(@{$generation[$node2g{$yy}]}, $yy); } } *************** *** 225,226 **** --- 301,304 ---- } } + + 1; |
From: <tw...@us...> - 2002-10-30 15:05:39
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv14340 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: Another special case, expanded display to 2 char field width. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -C2 -d -r1.1.2.5 -r1.1.2.6 *** analysis_tree_lib.pl 30 Oct 2002 14:42:53 -0000 1.1.2.5 --- analysis_tree_lib.pl 30 Oct 2002 15:05:34 -0000 1.1.2.6 *************** *** 72,81 **** my @table = tile(); ! print " 0123456789\n"; ! for(my $xx=0; $xx<=$#table; $xx++) { print "$xx"; for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) { if ($table[$xx][$yy]) { --- 72,82 ---- my @table = tile(); ! print " 0 1 2 3 4 5 6 7 8 9\n"; ! for(my $xx=$#table; $xx>=0; $xx--) { print "$xx"; for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) { + if ($table[$xx][$yy] < 10) { print " ";} if ($table[$xx][$yy]) { *************** *** 119,130 **** my $node = $children[$generation[$xx-1][$yy]][$nc]; my $kid_count = $#{$children[$node]} +1; ! my $temp = "$node (nc: $nc kc: $kid_count kt: $kid_total) $col, "; ! # $col += int(($nc/2)+0.5); ! if ($col < $kid_total) { $col = $kid_total; } ! $temp .= "$col, "; $table[$row][$col] = $node; ! print "($xx, $yy, $nc) $row, $col: $node\n"; ! # $col += int(($kid_count/2)+0.5); ! # $col += $kid_total; if ($kid_count > 0) { --- 120,129 ---- my $node = $children[$generation[$xx-1][$yy]][$nc]; my $kid_count = $#{$children[$node]} +1; ! # my $temp = "$node (nc: $nc kc: $kid_count kt: $kid_total) $col, "; ! $col += int(($kid_count/2)-0.5); # If $node has children, center above them ! if ($col < $kid_total) { $col = $kid_total; } # Start one col beyond previous node's children ! # $temp .= "$col, "; $table[$row][$col] = $node; ! # print "($xx, $yy, $nc) $row, $col: $node\n"; if ($kid_count > 0) { *************** *** 135,143 **** $kid_total++; # at least one for the parent } ! $temp .= "$col (kt: $kid_total)"; ! print "$temp\n"; $col++; # we added a node, inc column } - # $kid_total++; # # If we added a node, col was ++, but if not, --- 134,141 ---- $kid_total++; # at least one for the parent } ! # $temp .= "$col (kt: $kid_total)"; ! # print "$temp\n"; $col++; # we added a node, inc column } # # If we added a node, col was ++, but if not, *************** *** 170,177 **** @{$tree[4]} = ("R Cluster", 2); @{$tree[5]} = ("Cyber T", 1); ! @{$tree[6]} = ("GO", 3); ! @{$tree[7]} = ("TreeView", 2); @{$tree[8]} = ("XCluster", 1); @{$tree[9]} = ("Test", 3); return (@tree,2); --- 168,177 ---- @{$tree[4]} = ("R Cluster", 2); @{$tree[5]} = ("Cyber T", 1); ! @{$tree[6]} = ("GO", 5); ! @{$tree[7]} = ("TreeView", 5); @{$tree[8]} = ("XCluster", 1); @{$tree[9]} = ("Test", 3); + @{$tree[10]} = ("NNormal", 3); + @{$tree[11]} = ("ProcA", 7); return (@tree,2); |
From: <tw...@us...> - 2002-10-30 14:42:56
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv31187 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: Improved logic. Seems to work. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -C2 -d -r1.1.2.4 -r1.1.2.5 *** analysis_tree_lib.pl 29 Oct 2002 22:26:39 -0000 1.1.2.4 --- analysis_tree_lib.pl 30 Oct 2002 14:42:53 -0000 1.1.2.5 *************** *** 110,113 **** --- 110,115 ---- { $col = 0; + my $kid_total; + $kid_total = 0; for(my $yy=0; $yy<=$#{$generation[$xx-1]}; $yy++) { *************** *** 116,131 **** { my $node = $children[$generation[$xx-1][$yy]][$nc]; ! my $kid_count = $#{$children[$node]}; ! $col += int(($nc/2)+0.5); $table[$row][$col] = $node; print "($xx, $yy, $nc) $row, $col: $node\n"; ! $col += int(($kid_count/2)+0.5); } ! $col++; } $row++; } ! my $num_children = $#{$children[$generation[1][0]]}; ! $col = int(($num_children/2)+0.5); $table[$row][$col] = 1; return @table; --- 118,154 ---- { my $node = $children[$generation[$xx-1][$yy]][$nc]; ! my $kid_count = $#{$children[$node]} +1; ! my $temp = "$node (nc: $nc kc: $kid_count kt: $kid_total) $col, "; ! # $col += int(($nc/2)+0.5); ! if ($col < $kid_total) { $col = $kid_total; } ! $temp .= "$col, "; $table[$row][$col] = $node; print "($xx, $yy, $nc) $row, $col: $node\n"; ! # $col += int(($kid_count/2)+0.5); ! # $col += $kid_total; ! if ($kid_count > 0) ! { ! $kid_total += $kid_count; ! } ! else ! { ! $kid_total++; # at least one for the parent ! } ! $temp .= "$col (kt: $kid_total)"; ! print "$temp\n"; ! $col++; # we added a node, inc column } ! # $kid_total++; ! # ! # If we added a node, col was ++, but if not, ! # we still need to ++ col due to the parent. ! # ! if ($num_children < 0) {$col++; } } $row++; } ! #my $num_children = $#{$children[$generation[1][0]]}; ! #$col = int(($num_children/2)+0.5); ! $col = int(($#{$table[1]}/2)+0.5); $table[$row][$col] = 1; return @table; *************** *** 147,152 **** @{$tree[4]} = ("R Cluster", 2); @{$tree[5]} = ("Cyber T", 1); ! @{$tree[6]} = ("GO", 5); @{$tree[7]} = ("TreeView", 2); return (@tree,2); --- 170,177 ---- @{$tree[4]} = ("R Cluster", 2); @{$tree[5]} = ("Cyber T", 1); ! @{$tree[6]} = ("GO", 3); @{$tree[7]} = ("TreeView", 2); + @{$tree[8]} = ("XCluster", 1); + @{$tree[9]} = ("Test", 3); return (@tree,2); |
From: <mwi...@us...> - 2002-10-30 01:36:54
|
Update of /cvsroot/genex/genex-server/G2G/mason In directory usw-pr-cvs1:/tmp/cvs-serv15341 Modified Files: generate_user.html.in Log Message: now calls external script to write to the database. This script (generate_user.pl) must currently be moved into the /workspace folder of the web server. Perhaps this is not desirable. Let me know how you want it to work. Also accepts superuser password via the website rather than it being hard coded. Index: generate_user.html.in =================================================================== RCS file: /cvsroot/genex/genex-server/G2G/mason/generate_user.html.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** generate_user.html.in 29 Oct 2002 02:05:04 -0000 1.3 --- generate_user.html.in 30 Oct 2002 01:36:51 -0000 1.4 *************** *** 13,16 **** --- 13,17 ---- % $organization = ""; % } + <center>Superuser Password<br><input name="SU_PASSWORD" type="password" width="12"><br><br></center> <table cellpadding="2" cellspacing="2" border="0" style="width: 70%; text-align: left; margin-left: auto; margin-right: auto;" *************** *** 220,224 **** <br> <br> ! last modified Oct 11, 2002<br> </center> % } --- 221,225 ---- <br> <br> ! last modified Oct 28, 2002<br> </center> % } *************** *** 229,232 **** --- 230,235 ---- <h1>Genex User Created</h1> + % } else { + failed with <% $commandline %><br><% @all %> % } *************** *** 252,255 **** --- 255,259 ---- $submitted => "" $debug => 0 + $SU_PASSWORD => "" </%args> <%once>; *************** *** 261,265 **** use File::Basename; %%GENEX_EXTRALIBS%% ! use Bio::Genex;# qw(timestamp $SU_USERNAME $SU_PASSWORD); use Bio::Genex::Connect; use Bio::Genex::UserSec; --- 265,269 ---- use File::Basename; %%GENEX_EXTRALIBS%% ! use Bio::Genex; use Bio::Genex::Connect; use Bio::Genex::UserSec; *************** *** 267,280 **** use Bio::Genex::GroupLink; ! my %OPTIONS; $OPTIONS{ro_groupname} = "public"; $OPTIONS{rw_groupname} = "superuser"; $OPTIONS{dbname} = "%%DB_NAME%%"; $OPTIONS{SU_USERNAME} = "genex"; ! $OPTIONS{SU_PASSWORD} = "genex"; $OPTIONS{rw_groupname} = $OPTIONS{rw_groupname}?$OPTIONS{rw_groupname}:"superuser"; # set predictable default if this variable doesn't exist; my $response_page; unless ($submitted eq "true"){ # first time only, never clicked the button --- 271,286 ---- use Bio::Genex::GroupLink; ! my %OPTIONS; $OPTIONS{ro_groupname} = "public"; $OPTIONS{rw_groupname} = "superuser"; $OPTIONS{dbname} = "%%DB_NAME%%"; $OPTIONS{SU_USERNAME} = "genex"; ! $OPTIONS{SU_PASSWORD} = $SU_PASSWORD; $OPTIONS{rw_groupname} = $OPTIONS{rw_groupname}?$OPTIONS{rw_groupname}:"superuser"; # set predictable default if this variable doesn't exist; my $response_page; + my $commandline; + my @all; unless ($submitted eq "true"){ # first time only, never clicked the button *************** *** 291,333 **** DBNAME=>$OPTIONS{dbname}, ); ! my $sth = $db->prepare("create user $username with password '$password' nocreatedb nocreateuser"); ! unless ($sth) { ! $response_page="badUP"; # BAD USERNAME AND PASSWORD ! } else { ! $sth->execute(); ! ! my $u = Bio::Genex::UserSec->new(); ! my $c = Bio::Genex::Contact->new(); ! ! #okay, start filling in the database ! $u->username($username); # create username ! ! # now create organization details ! $c->organization($organization); ! $c->contact_person($contact_person); ! $c->contact_person_phone($contact_person_phone); ! $c->contact_person_email($contact_person_email); ! $c->org_phone($org_phone); ! $c->org_email($org_email); ! $c->org_mail_address($org_mail_address); ! $c->org_toll_free_phone($org_toll_free_phone); ! $c->org_fax($org_fax); ! $c->url($url); ! ! $c->ro_groupname($OPTIONS{ro_groupname}); ! $c->rw_groupname($OPTIONS{rw_groupname}); ! my $cid = $c->insert_db($db); ! ! $u->con_fk($cid); ! $u->ro_groupname($OPTIONS{ro_groupname}); ! $u->rw_groupname($OPTIONS{rw_groupname}); ! $u->insert_db($db); ! ! my $gl = Bio::Genex::GroupLink->new; ! $gl->username($u->username); ! $gl->groupname($OPTIONS{ro_groupname}); ! $gl->insert_db($db); ! $response_page="DONE"; ! } } } --- 297,327 ---- DBNAME=>$OPTIONS{dbname}, ); ! $commandline = "perl %%GENEX_WORKSPACE_DIR%%/generate_user.pl ". ! "--SU_PASSWORD=$OPTIONS{'SU_PASSWORD'} ". ! "--username='$username' ". ! "--password='$password' ". ! "--organization='$organization' ". ! "--contact_person='$contact_person' ". ! "--contact_person_phone='$contact_person_phone' ". ! "--contact_person_email='$contact_person_email' ". ! "--org_email='$org_email' ". ! "--org_mail_address='$org_mail_address' ". ! "--org_phone='$org_phone' ". ! "--org_toll_free_phone='$org_toll_free_phone' ". ! "--org_fax='$org_fax' ". ! "--url='$url' "; ! ! open (IN, "$commandline |") || die "cant start script $!\n"; ! my $response; ! while ($response = <IN>){ ! push @all, $response; ! chomp $response; ! last if ($response eq "OK"); ! } ! if ($response eq "OK"){ ! $response_page="DONE"; ! } else { ! $response_page="badOPTS"; ! } } } |
From: <tw...@us...> - 2002-10-29 22:26:41
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv15414 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: fix zero/one with generation index Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -C2 -d -r1.1.2.3 -r1.1.2.4 *** analysis_tree_lib.pl 29 Oct 2002 21:49:43 -0000 1.1.2.3 --- analysis_tree_lib.pl 29 Oct 2002 22:26:39 -0000 1.1.2.4 *************** *** 112,116 **** for(my $yy=0; $yy<=$#{$generation[$xx-1]}; $yy++) { ! my $num_children = $#{$children[$generation[$xx-1][$yy]]}; for(my $nc=0; $nc<=$num_children; $nc++) { --- 112,116 ---- for(my $yy=0; $yy<=$#{$generation[$xx-1]}; $yy++) { ! my $num_children = $#{$children[$generation[$xx-1][$yy]]}; for(my $nc=0; $nc<=$num_children; $nc++) { *************** *** 121,125 **** print "($xx, $yy, $nc) $row, $col: $node\n"; $col += int(($kid_count/2)+0.5); - } $col++; --- 121,124 ---- *************** *** 127,130 **** --- 126,132 ---- $row++; } + my $num_children = $#{$children[$generation[1][0]]}; + $col = int(($num_children/2)+0.5); + $table[$row][$col] = 1; return @table; } *************** *** 143,150 **** @{$tree[2]} = ("Stat Analysis", 1); @{$tree[3]} = ("Westfall & Young", 1); ! @{$tree[4]} = ("R Cluster", 3); @{$tree[5]} = ("Cyber T", 1); @{$tree[6]} = ("GO", 5); ! @{$tree[7]} = ("TreeView", 3); return (@tree,2); --- 145,152 ---- @{$tree[2]} = ("Stat Analysis", 1); @{$tree[3]} = ("Westfall & Young", 1); ! @{$tree[4]} = ("R Cluster", 2); @{$tree[5]} = ("Cyber T", 1); @{$tree[6]} = ("GO", 5); ! @{$tree[7]} = ("TreeView", 2); return (@tree,2); *************** *** 168,172 **** # $node2g{0} = 0; ! push(@{$generation[$node2g{0}]}, 0); for($xx = 0; $xx<=$#tree; $xx++) { --- 170,174 ---- # $node2g{0} = 0; ! # push(@{$generation[$node2g{0}]}, 1); for($xx = 0; $xx<=$#tree; $xx++) { *************** *** 179,183 **** push(@{$children[$xx]}, $yy); # add self to parent's children list $node2g{$yy} = $node2g{$parent[$yy]} + 1; ! push(@{$generation[$node2g{$yy}]}, $yy); } } --- 181,185 ---- push(@{$children[$xx]}, $yy); # add self to parent's children list $node2g{$yy} = $node2g{$parent[$yy]} + 1; ! push(@{$generation[$node2g{$yy}-1]}, $yy); } } |
From: <tw...@us...> - 2002-10-29 21:49:47
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv32647 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: correct except root. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -C2 -d -r1.1.2.2 -r1.1.2.3 *** analysis_tree_lib.pl 29 Oct 2002 20:38:00 -0000 1.1.2.2 --- analysis_tree_lib.pl 29 Oct 2002 21:49:43 -0000 1.1.2.3 *************** *** 72,82 **** my @table = tile(); ! print " 0123456789\n"; for(my $xx=0; $xx<=$#table; $xx++) { ! print "$xx "; for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) { ! print "$table[$xx][$yy] "; } print "\n"; --- 72,89 ---- my @table = tile(); ! print " 0123456789\n"; for(my $xx=0; $xx<=$#table; $xx++) { ! print "$xx"; for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) { ! if ($table[$xx][$yy]) ! { ! print "$table[$xx][$yy]"; ! } ! else ! { ! print " "; ! } } print "\n"; *************** *** 109,118 **** { my $node = $children[$generation[$xx-1][$yy]][$nc]; ! my $kid_count = $#{$children[$node]} +1; ! $col += int(($kid_count/2)+0.5); $table[$row][$col] = $node; print "($xx, $yy, $nc) $row, $col: $node\n"; ! $col += (int(($kid_count/2)+0.5)); } } $row++; --- 116,127 ---- { my $node = $children[$generation[$xx-1][$yy]][$nc]; ! my $kid_count = $#{$children[$node]}; ! $col += int(($nc/2)+0.5); $table[$row][$col] = $node; print "($xx, $yy, $nc) $row, $col: $node\n"; ! $col += int(($kid_count/2)+0.5); ! } + $col++; } $row++; *************** *** 136,139 **** --- 145,150 ---- @{$tree[4]} = ("R Cluster", 3); @{$tree[5]} = ("Cyber T", 1); + @{$tree[6]} = ("GO", 5); + @{$tree[7]} = ("TreeView", 3); return (@tree,2); |
From: <tw...@us...> - 2002-10-29 20:38:06
|
Update of /cvsroot/genex/genex-server/site/webtools In directory usw-pr-cvs1:/tmp/cvs-serv29761 Modified Files: Tag: Rel-1_0_1-branch analysis_tree_lib.pl Log Message: More tree rendering subs. Index: analysis_tree_lib.pl =================================================================== RCS file: /cvsroot/genex/genex-server/site/webtools/Attic/analysis_tree_lib.pl,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** analysis_tree_lib.pl 29 Oct 2002 19:09:16 -0000 1.1.2.1 --- analysis_tree_lib.pl 29 Oct 2002 20:38:00 -0000 1.1.2.2 *************** *** 46,49 **** --- 46,62 ---- print "\n"; } + print "\n"; + + for(my $xx=0; $xx<=$#children; $xx++) + { + print "Children $xx: "; + for(my $yy=0; $yy<=$#{$children[$xx]}; $yy++) + { + print "($xx,$yy) $children[$xx][$yy] "; + } + print "\n"; + } + print "\n"; + for(my $xx=0; $xx<=$#generation; $xx++) { *************** *** 51,61 **** for(my $yy=0; $yy<=$#{$generation[$xx]}; $yy++) { ! print "$generation[$xx][$yy] "; } print "\n"; } } sub read_db { --- 64,125 ---- for(my $yy=0; $yy<=$#{$generation[$xx]}; $yy++) { ! print "($xx,$yy) $generation[$xx][$yy] "; } print "\n"; } + print "\n"; + + my @table = tile(); + print " 0123456789\n"; + for(my $xx=0; $xx<=$#table; $xx++) + { + print "$xx "; + for(my $yy=0; $yy<=$#{$table[$xx]}; $yy++) + { + print "$table[$xx][$yy] "; + } + print "\n"; + } + + } + + # + # Starting with highest generation, put children into the current row. + # Children in this row are added by sibling groups. + # + # Add children to this row by looping through parents, and adding all the + # children of each parent. + # + # Once complete, place each parent of this generation based on locations + # of a given parent's children's positions. ( truncate n/2) + # + sub tile + { + my $row = 0; + my $col = 0; + my @table; + for(my $xx=$#generation; $xx > 0; $xx--) + { + $col = 0; + for(my $yy=0; $yy<=$#{$generation[$xx-1]}; $yy++) + { + my $num_children = $#{$children[$generation[$xx-1][$yy]]}; + for(my $nc=0; $nc<=$num_children; $nc++) + { + my $node = $children[$generation[$xx-1][$yy]][$nc]; + my $kid_count = $#{$children[$node]} +1; + $col += int(($kid_count/2)+0.5); + $table[$row][$col] = $node; + print "($xx, $yy, $nc) $row, $col: $node\n"; + $col += (int(($kid_count/2)+0.5)); + } + } + $row++; + } + return @table; } + sub read_db { *************** *** 70,75 **** @{$tree[2]} = ("Stat Analysis", 1); @{$tree[3]} = ("Westfall & Young", 1); ! @{$tree[4]} = ("Cyber T", 1); ! @{$tree[5]} = ("R Cluster", 4); return (@tree,2); --- 134,139 ---- @{$tree[2]} = ("Stat Analysis", 1); @{$tree[3]} = ("Westfall & Young", 1); ! @{$tree[4]} = ("R Cluster", 3); ! @{$tree[5]} = ("Cyber T", 1); return (@tree,2); *************** *** 101,106 **** { print "$xx $tree[$xx][0] is parent of $tree[$yy][0] $tree[$yy][1]\n"; ! $parent[$yy] = $xx; # we can only have one parent ! push(@{$children[$xx]}, $yy); # we might have several children $node2g{$yy} = $node2g{$parent[$yy]} + 1; push(@{$generation[$node2g{$yy}]}, $yy); --- 165,170 ---- { print "$xx $tree[$xx][0] is parent of $tree[$yy][0] $tree[$yy][1]\n"; ! $parent[$yy] = $xx; # we can only have one parent ! push(@{$children[$xx]}, $yy); # add self to parent's children list $node2g{$yy} = $node2g{$parent[$yy]} + 1; push(@{$generation[$node2g{$yy}]}, $yy); |