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

Diff of /FigWebServices/genome_statistics.cgi

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

revision 1.16, Sun Jul 10 18:17:42 2005 UTC revision 1.17, Thu Aug 4 21:06:05 2005 UTC
# Line 48  Line 48 
48  {  {
49      &subsys_summary($fig,$cgi,$html);      &subsys_summary($fig,$cgi,$html);
50  }  }
51    elsif ($request eq "subsystems_by_homology")
52    {
53        &subsys_homol($fig,$cgi,$html,$cgi->param('genome'));
54    }
55  elsif ($request eq "edit_kv_stats") {  elsif ($request eq "edit_kv_stats") {
56      &edit_kv_stats($fig,$cgi,$html, $cgi->param('genome'));      &edit_kv_stats($fig,$cgi,$html, $cgi->param('genome'));
57  }  }
# Line 519  Line 523 
523   }   }
524  }  }
525    
526    sub subsys_homol {
527     my ($fig,$cgi,$html, $genome)=@_;
528     # here we are going to get some subsystems based on what genes are present and what they are homologous to
529     my ($maxN, $maxP)=(($cgi->param('maxN') or 50), ($cgi->param('maxP') or 1e-20));
530     foreach my $peg ($fig->pegs_of($genome)) {
531      map {$sscount->{$_}->{'Annotated'}++} $fig->subsystems_for_peg($peg);
532      map {map {$sscount->{$_}->{'Homology'}++} $fig->subsystems_for_peg($_->[1])} $fig->sims($peg, $maxN, $maxP, 'fig');
533     }
534    
535     my $col_hdrs=["Susbystems by Annotation", "Number of proteins", "Subsystems by Homology", "Number of Proteins"];
536     my $tab=[];
537     foreach my $ss (keys %$sscount) {
538      my @row;
539      if ($sscount->{$ss}->{"Annotated"}) {push @row, ($ss, $sscount->{$ss}->{"Annotated"})}
540      else {push @row, ["   ", "td colspan=2"]}
541      if ($sscount->{$ss}->{"Homology"}) {push @row, ($ss, $sscount->{$ss}->{"Homology"})}
542      else {push @row, ["   ", "td colspan=2"]}
543      push @$tab, \@row;
544     }
545     push(@$html,&HTML::make_table($col_hdrs,$tab,"Subsystems in $genome");
546    }
547    
548    
549    
550    

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3