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

Diff of /FigWebServices/homologs_in_clusters.cgi

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

revision 1.3.2.1, Mon Jun 27 15:26:45 2005 UTC revision 1.3.2.2, Wed Jun 29 16:11:00 2005 UTC
# Line 81  Line 81 
81  }  }
82    
83  &compute_desired_homologs($fig_or_sprout,$cgi,$html,$prot);  &compute_desired_homologs($fig_or_sprout,$cgi,$html,$prot);
84    
85    if ($is_sprout)
86    {
87        my $h = { homologs => $html };
88    
89        print "Content-Type: text/html\n";
90        print "\n";
91        my $templ = "$FIG_Config::fig/CGI/Html/Homologs_tmpl.html";
92        print PageBuilder::Build("<$templ", $h,"Html");
93    }
94    else
95    {
96  &HTML::show_page($cgi,$html);  &HTML::show_page($cgi,$html);
97    }
98  exit;  exit;
99    
100  sub compute_desired_homologs {  sub compute_desired_homologs {
# Line 97  Line 110 
110  #   print STDERR &Dumper(\@homologs);  #   print STDERR &Dumper(\@homologs);
111    
112      my $sc;      my $sc;
113      my @tab = map { ($peg,$sc) = @$_; [$sc,      my @tab = map { my($peg,$sc,$sim) = @$_; [$sim,$sc,
114                                         &HTML::fid_link($cgi,$peg),                                         &HTML::fid_link($cgi,$peg),
115                                         $fig_or_sprout->genus_species($fig_or_sprout->genome_of($peg)),                                         $fig_or_sprout->genus_species($fig_or_sprout->genome_of($peg)),
116                                         scalar $fig_or_sprout->function_of($peg,$cgi->param('user')),                                         scalar $fig_or_sprout->function_of($peg,$cgi->param('user')),
117                                         &HTML::set_prot_links($cgi,join( ', ', $fig_or_sprout->feature_aliases($peg) ))                                         &HTML::set_prot_links($cgi,join( ', ', $fig_or_sprout->feature_aliases($peg) ))
118                                        ] } @pinned;                                        ] } @pinned;
119      push(@$html,&HTML::make_table(["Score","PEG","Genome", "Function","Aliases"],\@tab,"PEGs that Might Be in Clusters"));      if (@tab > 0)
120        {
121            push(@$html,&HTML::make_table(["Sim. Sc.","Coupling Score","PEG","Genome", "Function","Aliases"],\@tab,"PEGs that Might Be in Clusters"));
122        }
123        else
124        {
125            push(@$html, $cgi->h1("Sorry, we have no clusters containing homologs of $peg"));
126        }
127  }  }
128    
129  sub relevant_homologs {  sub relevant_homologs {
# Line 128  Line 148 
148          if ((! $seen{$genome2}) && (@coup = $fig_or_sprout->coupled_to($id2)) && (@coup > 0))          if ((! $seen{$genome2}) && (@coup = $fig_or_sprout->coupled_to($id2)) && (@coup > 0))
149          {          {
150              $seen{$genome2} = 1;              $seen{$genome2} = 1;
151              push(@homologs,[$id2,scalar @coup]);              push(@homologs,[$id2,scalar @coup,$sim->psc]);
152          }          }
153      }      }
154      return sort { $b->[1] <=> $a->[1] } @homologs;      return sort { $b->[1] <=> $a->[1] } @homologs;

Legend:
Removed from v.1.3.2.1  
changed lines
  Added in v.1.3.2.2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3