[Bio] / Sprout / SHSubSearch.pm Repository:
ViewVC logotype

Diff of /Sprout/SHSubSearch.pm

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

revision 1.1, Wed Nov 15 12:14:14 2006 UTC revision 1.5, Tue Apr 10 06:11:01 2007 UTC
# Line 52  Line 52 
52      my $cgi = $self->Q();      my $cgi = $self->Q();
53      my $sprout = $self->DB();      my $sprout = $self->DB();
54      # Start the form.      # Start the form.
55      my $retVal = $self->FormStart("Search for Genes by Subsystem or Class");      my $retVal = $self->FormStart("Open Subsystem OR Search for Genes by Subsystem or Class");
56      # Create a subsystem tree.      # Create a subsystem tree.
57      my $tree = SearchHelper::SubsystemTree($sprout, radio => 1, links => 1);      my $tree = SearchHelper::SubsystemTree($sprout, radio => 1, links => 1);
58      # Build a form field out of it.      # Build a form field out of it.
# Line 62  Line 62 
62                                                  selected => $cgi->param("specification"));                                                  selected => $cgi->param("specification"));
63      # We'll accumulate the form table in here.      # We'll accumulate the form table in here.
64      my @rows = ();      my @rows = ();
65      # Start with a keyword search box.      # Start with the subsystem tree.
66        push @rows, $cgi->Tr($cgi->th({ colspan => 3, align => "center" }, "Subsystem Tree")),
67                    $cgi->Tr($cgi->td({ colspan => 3 }, $treeField));
68        # Put in the keyword search box.
69      my $expressionString = $cgi->param('keywords') || "";      my $expressionString = $cgi->param('keywords') || "";
70      push @rows, $cgi->Tr($cgi->th("Search Words"),      push @rows, $cgi->Tr($cgi->th("Search Words"),
71                           $cgi->td({ colspan => 2 },                           $cgi->td({ colspan => 2 },
72                                    $cgi->textfield(-name => 'keywords',                                    $cgi->textfield(-name => 'keywords',
73                                                    -value => $expressionString,                                                    -value => $expressionString,
74                                                    -size => 60)));                                                    -size => 60)));
     # Add the subsystem tree.  
     push @rows, $cgi->Tr($cgi->th({ colspan => 3, align => "center" }, "Subsystem Tree")),  
                 $cgi->Tr($cgi->td({ colspan => 3 }, $treeField));  
75      # Add the special options.      # Add the special options.
76      push @rows, FeatureQuery::SpecialOptions($self);      push @rows, FeatureQuery::SpecialOptions($self);
77      # Finish it off with the submit row.      # Finish it off with the submit row.
# Line 134  Line 134 
134              # any keywords were specified.              # any keywords were specified.
135              my $query;              my $query;
136              if ($keywords) {              if ($keywords) {
137                    $self->PrintLine("Word search query submitted.<br />");
138                  $query = $sprout->Search($keywords, 2, @majorParms);                  $query = $sprout->Search($keywords, 2, @majorParms);
139              } else {              } else {
140                    $self->PrintLine("Standard search query submitted.<br />");
141                  $query = $sprout->Get(@majorParms);                  $query = $sprout->Get(@majorParms);
142              }              }
143              # Initialize the session file.              # Initialize the session file.
# Line 147  Line 149 
149                  $fd->Store($record);                  $fd->Store($record);
150                  $self->PutFeature($fd);                  $self->PutFeature($fd);
151                  $retVal++;                  $retVal++;
152                    if ($retVal % 100 == 0) {
153                        $self->PrintLine("$retVal features processed.<br />");
154                    }
155              }              }
156              # Close the session file.              # Close the session file.
157              $self->CloseSession();              $self->CloseSession();

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3