[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

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

revision 1.610, Wed Aug 15 21:28:27 2007 UTC revision 1.611, Mon Aug 27 18:27:33 2007 UTC
# Line 7533  Line 7533 
7533  # function and confidence  # function and confidence
7534  #  #
7535  sub function_of {  sub function_of {
7536      my($self,$id,$user) = @_;      my($self,$id,$user,$strip_comments) = @_;
7537      my($relational_db_response,@tmp,$entry,$i);      my($relational_db_response,@tmp,$entry,$i);
7538      my $wantarray = wantarray();      my $wantarray = wantarray();
7539      my $rdbH = $self->db_handle;      my $rdbH = $self->db_handle;
# Line 7546  Line 7546 
7546              (@$relational_db_response >= 1))              (@$relational_db_response >= 1))
7547          {          {
7548              @tmp = sort { $a->[0] cmp $b->[0] } map { $_->[1] =~ s/^\s//; $_->[1] =~ s/(\t\S)?\s*$//; [$_->[0],$_->[1]] } @$relational_db_response;              @tmp = sort { $a->[0] cmp $b->[0] } map { $_->[1] =~ s/^\s//; $_->[1] =~ s/(\t\S)?\s*$//; [$_->[0],$_->[1]] } @$relational_db_response;
7549                if ($strip_comments) { @tmp = map { $_->[1] =~ s/\s*\#.*$//; $_ } @tmp }
7550              for ($i=0; ($i < @tmp) && ($tmp[$i]->[0] ne "master"); $i++) {}              for ($i=0; ($i < @tmp) && ($tmp[$i]->[0] ne "master"); $i++) {}
7551              if ($i < @tmp)              if ($i < @tmp)
7552              {              {
# Line 7565  Line 7566 
7566          if (($relational_db_response = $rdbH->SQL("SELECT assigned_function FROM assigned_functions WHERE ( prot = \'$id\' AND made_by = \'master\' )")) &&          if (($relational_db_response = $rdbH->SQL("SELECT assigned_function FROM assigned_functions WHERE ( prot = \'$id\' AND made_by = \'master\' )")) &&
7567              (@$relational_db_response >= 1))              (@$relational_db_response >= 1))
7568          {          {
7569              $relational_db_response->[0]->[0]  =~ s/^\s//; $relational_db_response->[0]->[0] =~ s/(\t\S)?\s*$//;              @tmp = @$relational_db_response;
7570              return $wantarray ? (["master",$relational_db_response->[0]->[0]]) : $relational_db_response->[0]->[0];              if ($strip_comments) { @tmp = map { $_->[0] =~ s/\s*\#.*$//; $_ } @tmp }
7571                $tmp[0]->[0]  =~ s/^\s//; $tmp[0]->[0] =~ s/(\t\S)?\s*$//;
7572                return $wantarray ? (["master",$tmp[0]->[0]]) : $tmp[0]->[0];
7573          }          }
7574      }      }
7575    

Legend:
Removed from v.1.610  
changed lines
  Added in v.1.611

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3