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

Diff of /FigWebServices/proteinfamilies.cgi

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

revision 1.30, Wed Nov 23 22:45:46 2005 UTC revision 1.31, Sun Nov 27 19:49:53 2005 UTC
# Line 466  Line 466 
466    my $radbut={    my $radbut={
467     "1not2"=>"In family one and NOT family two\n",     "1not2"=>"In family one and NOT family two\n",
468     "2not1"=>"In family two and NOT family one\n",     "2not1"=>"In family two and NOT family one\n",
469     "1and2"=>"In both families (intersection)\n",     "1and2"=>"In family one and family two\n",
470     "1or2" =>"In either family (union)\n",     "1or2" =>"In family one or  family two\n",
471     };     };
472    
473    # sort the list of families in this table but put the fig families at the beginning of the list    # sort the list of families in this table but put the fig families at the beginning of the list
# Line 546  Line 546 
546          $set=&set_utilities::union($fam1, $fam2);          $set=&set_utilities::union($fam1, $fam2);
547   }   }
548    
549   print STDERR "FAMILIES: ", join(" ", @families), "\n";  
550   foreach my $cid (@$set)   foreach my $cid (@$set)
551   {   {
552    #my $row=["<a href='proteinfamilies.cgi?prot=$cid'>$cid</a>"];    #my $row=["<a href='proteinfamilies.cgi?prot=$cid'>$cid</a>"];
553    my $row=[];    my $row=[];
554    my $seen; my $mismatchcolor;    my $seen; my $mismatchcolor;
555      my ($for, $against)=(0,0);
556    foreach my $prot (sort $fig->cid_to_prots($cid))    foreach my $prot (sort $fig->cid_to_prots($cid))
557    {    {
558     for (my $i=0; $i<=$#families; $i++)     for (my $i=0; $i<=$#families; $i++)
# Line 564  Line 565 
565      {      {
566          $seen->{$prot}=1;          $seen->{$prot}=1;
567          $row->[$i] .= &protein_link($prot, 1, $families[$i]) . "<br />";          $row->[$i] .= &protein_link($prot, 1, $families[$i]) . "<br />";
568            $for++;
569      }      }
570      elsif ($prot =~ /^$source[$i]/)      elsif ($prot =~ /^$source[$i]/)
571      {      {
572          $mismatchcolor->{$i}=1;          $mismatchcolor->{$i}=1;
573          $row->[$i] .= &protein_link($prot, 1, $families[$i]) . "<br />";          $row->[$i] .= &protein_link($prot, 1, $families[$i]) . "<br />";
574            $against--; # note that against is a negative score!
575      }      }
576     }     }
577    }    }
# Line 580  Line 583 
583    # change empty cells    # change empty cells
584    map {$row->[$_] = " &nbsp; " unless ($row->[$_])} (0 .. $#$row);    map {$row->[$_] = " &nbsp; " unless ($row->[$_])} (0 .. $#$row);
585    
586      # add the score
587      splice(@$row, 1, 0, "$for/$against");
588    
589    # if we want to show everything do so, otherwise only show the rows where there is a missing protein    # if we want to show everything do so, otherwise only show the rows where there is a missing protein
590    if (($cgi->param("diff") eq "1and2") || ($cgi->param("diff") eq "1or2") || ($cgi->param('show') eq "all"))    if (($cgi->param("diff") eq "1and2") || ($cgi->param("diff") eq "1or2") || ($cgi->param('show') eq "all"))
591    {    {
592     push @$tab, $row;     push @$tab, $row;
593    }    }
594    elsif ($cgi->param("diff") eq "1not2" && $row->[1] ne " &nbsp; ")    elsif ($cgi->param("diff") eq "1not2" && $row->[2] ne " &nbsp; ")
595    {    {
596     push @$tab, $row;     push @$tab, $row;
597    }    }
# Line 613  Line 619 
619    
620   my @headers=@families;   my @headers=@families;
621   map {$_ = "<a " . FIGjs::mouseover("Column Family", $fig->family_function($_) . " ($_)", '') . " href='proteinfamilies.cgi?family=$_'>$_</a>"} @headers;   map {$_ = "<a " . FIGjs::mouseover("Column Family", $fig->family_function($_) . " ($_)", '') . " href='proteinfamilies.cgi?family=$_'>$_</a>"} @headers;
622     splice(@headers, 1, 0, "Score");
623   if ($tab)   if ($tab)
624   {   {
625    push @$html, HTML::make_table(\@headers, $tab, "Proteins In $title");    push @$html, HTML::make_table(\@headers, $tab, "Proteins In $title");

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3