[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.2, Mon Jun 22 19:48:14 2009 UTC revision 1.3, Tue Jun 30 19:39:00 2009 UTC
# Line 81  Line 81 
81          print &YAML::Dump($result);          print &YAML::Dump($result);
82    
83      } elsif  ($function eq "all_subsystems") {      } elsif  ($function eq "all_subsystems") {
84          print $cgi->header();          #print $cgi->header();
85    
86          my @resultRows = $sapling->GetAll("Subsystem Includes Role",          my @resultRows = $sapling->GetAll("Subsystem Includes Role",
87                                        'ORDER BY Subsystem(id)', [], [qw(Subsystem(id) Subsystem(curator)                                        'ORDER BY Subsystem(id)', [], [qw(Subsystem(id) Subsystem(curator)
# Line 102  Line 102 
102          }          }
103          print &YAML::Dump($result);          print &YAML::Dump($result);
104    
105        } elsif ($function eq "pegs_in_subsystems") {
106            my $result = [];
107            my (@args)  = &YAML::Load($cgi->param('args'));
108            my @genomes = $args[0];
109            my @subs = $args[1];
110            foreach my $sub (@subs) {
111    #print STDERR "SUB,", Dumper $sub;
112                    my $ss = SaplingSubsys->new($sub->[0], $sapling);
113                    foreach my $g (@genomes) {
114                            my @roles = $ss->get_roles_for_genome($g->[0], 1);
115    #print STDERR "ROLES", Dumper @roles;
116                            foreach my $role (@roles) {
117                                    push (@$result, [$sub->[0], $role]);
118                            }
119                    }
120            }
121            print &YAML::Dump($result);
122    
123       } elsif ($function eq "pegs_implementing_roles") {
124            my $result = [];
125            my (@args)  = &YAML::Load($cgi->param('args'));
126            my $subsys = $args[0];
127            my @roles = $args[1];
128            my $ss = SaplingSubsys->new($subsys, $sapling);
129    
130            foreach my $role (@roles) {
131                    my @pegs = $ss->pegs_for_role($role);
132                    push (@$result, [$role, \@pegs]);
133            }
134    
135            print &YAML::Dump($result);
136    
137      } elsif ($function eq "metabolic_reconstruction") {      } elsif ($function eq "metabolic_reconstruction") {
138    
139          #print $cgi->header();          #print $cgi->header();

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3