[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.2, Wed Oct 27 01:22:01 2004 UTC revision 1.3, Fri Jun 3 00:27:44 2005 UTC
# Line 73  Line 73 
73      my @pinned = &relevant_homologs($fig,$cgi,$peg);      my @pinned = &relevant_homologs($fig,$cgi,$peg);
74  #   print STDERR &Dumper(\@pinned);  #   print STDERR &Dumper(\@pinned);
75    
76      my @clusters = sort { (@$b <=> @$a) } &sets_of_homologs($fig,$cgi,$peg,\@pinned);  #    my @clusters = sort { (@$b <=> @$a) } &sets_of_homologs($fig,$cgi,$peg,\@pinned);
77  #   print STDERR &Dumper(\@clusters);  #   print STDERR &Dumper(\@clusters);
78    
79      my @homologs = &extract_homologs($peg,\@pinned,\@clusters);  #    my @homologs = &extract_homologs($peg,\@pinned,\@clusters);
80  #   print STDERR &Dumper(\@homologs);  #   print STDERR &Dumper(\@homologs);
81    
82      my $sc;      my $sc;
# Line 85  Line 85 
85                                         $fig->genus_species($fig->genome_of($peg)),                                         $fig->genus_species($fig->genome_of($peg)),
86                                         scalar $fig->function_of($peg,$cgi->param('user')),                                         scalar $fig->function_of($peg,$cgi->param('user')),
87                                         &HTML::set_prot_links($cgi,join( ', ', $fig->feature_aliases($peg) ))                                         &HTML::set_prot_links($cgi,join( ', ', $fig->feature_aliases($peg) ))
88                                        ] } @homologs;                                        ] } @pinned;
89      push(@$html,&HTML::make_table(["Crude Score","PEG","Genome", "Function","Aliases"],\@tab,"PEGs that Might Be in Clusters"));      push(@$html,&HTML::make_table(["Score","PEG","Genome", "Function","Aliases"],\@tab,"PEGs that Might Be in Clusters"));
90  }  }
91    
92  sub relevant_homologs {  sub relevant_homologs {
# Line 107  Line 107 
107      {      {
108          $id2     = $sim->id2;          $id2     = $sim->id2;
109          $genome2 = &FIG::genome_of($id2);          $genome2 = &FIG::genome_of($id2);
110          if (! $seen{$genome2})          my @coup;
111            if ((! $seen{$genome2}) && (@coup = $fig->coupled_to($id2)) && (@coup > 0))
112          {          {
113              $seen{$genome2} = 1;              $seen{$genome2} = 1;
114              push(@homologs,$id2);              push(@homologs,[$id2,scalar @coup]);
115          }          }
116      }      }
117      return @homologs;      return sort { $b->[1] <=> $a->[1] } @homologs;
118  }  }
119    
120  sub sets_of_homologs {  sub sets_of_homologs {

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3