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

Diff of /FigWebServices/targets.cgi

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

revision 1.6, Mon Dec 11 19:49:44 2006 UTC revision 1.7, Tue Apr 10 04:08:15 2007 UTC
# Line 30  Line 30 
30      $varHash->{org} = $org;      $varHash->{org} = $org;
31      # Compute the peg hash if we're organism-only.      # Compute the peg hash if we're organism-only.
32      if ($org && ! $target) {      if ($org && ! $target) {
33            Trace("Computing peg hash.") if T(3);
34          %pegHash = get_attribute_hash($org);          %pegHash = get_attribute_hash($org);
35      }      }
36      #The script operates      #The script operates
# Line 98  Line 99 
99      my $selfURL = $cgi->url(-relative => 1);      my $selfURL = $cgi->url(-relative => 1);
100      my $link = '../FIG/protein.cgi?new_framework=0&SPROUT=1&prot=';      my $link = '../FIG/protein.cgi?new_framework=0&SPROUT=1&prot=';
101      my $org = $cgi->param('org');      my $org = $cgi->param('org');
102      Trace("Printing $color for $pdb.") if T(4);      Trace("Printing $color for $pdb of peg $peg.") if T(4);
103      # We'll put the category/attribute column value in here if this row should be      # We'll put the category/attribute column value in here if this row should be
104      # displayed.      # displayed.
105      my $caColumn;      my $caColumn;
# Line 109  Line 110 
110      }elsif($target){      }elsif($target){
111          $caColumn = "<td><a href=\"$lit\">$cat</a></td>\n";          $caColumn = "<td><a href=\"$lit\">$cat</a></td>\n";
112      }elsif($org){      }elsif($org){
113            Trace("Peg hash is: $pegHash{$peg}.") if T(4);
114          if ($pegHash{$peg}) {          if ($pegHash{$peg}) {
115              $caColumn = $pegHash{$peg};              $caColumn = $pegHash{$peg};
116          } else {          } else {
117              $caColumn = "<td><a href=\"../content/contactus.php\">Suggest</a></td>\n";              $caColumn = "<td></td>\n"; # <a href=\"../content/contactus.php\">Suggest</a></td>\n";
118          }          }
119      }      }
120      if (defined $caColumn) {      if (defined $caColumn) {
# Line 154  Line 156 
156          while (! eof(INFILE)){          while (! eof(INFILE)){
157              my @entry = Tracer::GetLine(\*INFILE);              my @entry = Tracer::GetLine(\*INFILE);
158              if ($entry[5] =~ /$genome/){              if ($entry[5] =~ /$genome/){
159                    Trace("$entry[5] added to hash.") if T(3);
160                  my $title = ucfirst $key;                  my $title = ucfirst $key;
161                  $retVal{$entry[5]} = "<td><a href=$selfURL?org=$genome&target=$key>$title</a></td>\n";                  $retVal{$entry[5]} = "<td><a href=$selfURL?org=$genome&target=$key>$title</a></td>\n";
162              }              }
163          }          }
164          close(INFILE);          close(INFILE);
165      }      }
166        return %retVal;
167  }  }
168    
169  #-- we wish to desplay only the best pdbs and those that are relavent  #-- we wish to desplay only the best pdbs and those that are relavent
170  sub get_best_pdb{  sub get_best_pdb{
171      my ($cgi, $varHash, @entry)= @_;      my ($cgi, $varHash, @entry)= @_;
172      my @pdbresults =("1ah7","1dhn","1tfu"); # we define what pdb actually have been docked well.      my @pdbresults =("1ah7","1dhn","1tfu"); # we define what pdb actually have been docked well.
     if (T(4)) {  
         my $line = "Processing line\n";  
         for (my $i = 0; $i <= $#entry; $i++) {  
             $line .= "$i. $entry[$i]\n";  
         }  
         Trace($line);  
     }  
     Trace("Analyzing PDB $entry[11].") if T(4);  
173      foreach (@pdbresults){ #look through the results we have      foreach (@pdbresults){ #look through the results we have
174          if ($entry[11] =~ m/$_/gi){ #ifwe have results for the free          if ($entry[11] =~ m/$_/gi){ #ifwe have results for the free
175              &print_column($cgi, $varHash, $entry[11],'red', $entry[13],$entry[5], $entry[9], $entry[3], $entry[1]); #we want to display this              &print_column($cgi, $varHash, $entry[11],'red', $entry[13],$entry[5], $entry[9], $entry[3], $entry[1]); #we want to display this

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3