[Bio] / FigWebServices / subsystem_server_sapling.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/subsystem_server_sapling.cgi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4, Tue Jun 30 21:04:03 2009 UTC revision 1.6, Wed Jul 15 20:52:28 2009 UTC
# Line 105  Line 105 
105      } elsif ($function eq "pegs_in_subsystems") {      } elsif ($function eq "pegs_in_subsystems") {
106          my $result = [];          my $result = [];
107          my (@args)  = &YAML::Load($cgi->param('args'));          my (@args)  = &YAML::Load($cgi->param('args'));
108          my @genomes = $args[0];          my $genomes = $args[0];
109          my @subs = $args[1];          my $subs = $args[1];
110          foreach my $sub (@subs) {          foreach my $sub (@{$subs}) {
111  #print STDERR "SUB,", Dumper $sub;                  my $ss = SaplingSubsys->new($sub, $sapling);
112                  my $ss = SaplingSubsys->new($sub->[0], $sapling);                  foreach my $g (@{$genomes}) {
113                  foreach my $g (@genomes) {                          my @roles = $ss->get_roles_for_genome($g, 1);
                         my @roles = $ss->get_roles_for_genome($g->[0], 1);  
 #print STDERR "ROLES", Dumper @roles;  
114                          foreach my $role (@roles) {                          foreach my $role (@roles) {
115                                  push (@$result, [$sub->[0], $role]);                                  push (@$result, [$sub, $role]);
116                          }                          }
117                  }                  }
118          }          }
# Line 197  Line 195 
195          my $qh = $sapling->Get("Subsystem Describes Variant", 'Subsystem(id) = ? AND Variant(type) = ?', [$sub, 'normal']);          my $qh = $sapling->Get("Subsystem Describes Variant", 'Subsystem(id) = ? AND Variant(type) = ?', [$sub, 'normal']);
196          while (my $resultRow = $qh->Fetch()) {          while (my $resultRow = $qh->Fetch()) {
197              my @variantRoleRule = $resultRow->Value('Variant(role-rule)');              my @variantRoleRule = $resultRow->Value('Variant(role-rule)');
198              my $variantCode = $resultRow->Value('Variant(code)');              my ($variantCode) = $resultRow->Value('Variant(code)');
199              my $variantId = $sub.":".$variantCode;              my $variantId = $sub.":".$variantCode;
200              foreach my $setB (@variantRoleRule) {              foreach my $setB (@variantRoleRule) {
201                          my $size = is_A_a_superset_of_B($setA, $setB);                          my $size = is_A_a_superset_of_B($setA, $setB);

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3