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

Diff of /Sprout/SearchHelper.pm

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

revision 1.8, Wed Oct 4 16:03:35 2006 UTC revision 1.9, Sat Oct 7 13:18:11 2006 UTC
# Line 214  Line 214 
214                      }                      }
215                  }                  }
216              }              }
         }  
217          # Close the session file.          # Close the session file.
218          $self->CloseSession();          $self->CloseSession();
219            }
220          # Return the result count.          # Return the result count.
221          return $retVal;          return $retVal;
222      }      }
# Line 316  Line 316 
316      return $self->{query};      return $self->{query};
317  }  }
318    
319    
320    
321  =head3 DB  =head3 DB
322    
323  C<< my $sprout = $shelp->DB(); >>  C<< my $sprout = $shelp->DB(); >>
# Line 673  Line 675 
675      for my $colName (@{$self->{cols}}) {      for my $colName (@{$self->{cols}}) {
676          push @output, $self->FeatureColumnValue($colName, $record, $extraCols);          push @output, $self->FeatureColumnValue($colName, $record, $extraCols);
677      }      }
678      # Compute the sort key. The sort key floats NMPDR organism features to the      # Compute the sort key. The sort key usually floats NMPDR organism features to the
679      # top of the return list.      # top of the return list.
680      my $key = $self->SortKey($record);      my $key = $self->SortKey($record);
681      # Write the feature data.      # Write the feature data.
# Line 756  Line 758 
758      # Check for an open session file.      # Check for an open session file.
759      if (defined $self->{fileHandle}) {      if (defined $self->{fileHandle}) {
760          # We found one, so close it.          # We found one, so close it.
761            Trace("Closing session file.") if T(2);
762          close $self->{fileHandle};          close $self->{fileHandle};
763      }      }
764  }  }
# Line 1658  Line 1661 
1661      return $retVal;      return $retVal;
1662  }  }
1663    
1664    =head3 FeatureTypeMap
1665    
1666    C<< my %features = SearchHelper::FeatureTypeMap(); >>
1667    
1668    Return a map of feature types to descriptions. The feature type data is stored
1669    in the B<FIG_Config> file. Currently, it only contains a space-delimited list of
1670    feature types. The map returned by this method is a hash mapping the type codes to
1671    descriptive names.
1672    
1673    The reason we have to convert the list from a string is that the B<NMPDRSetup.pl>
1674    script is only able to insert strings into the generated B<FIG_Config> file.
1675    
1676    =cut
1677    
1678    sub FeatureTypeMap {
1679        my @list = split /\s+/, $FIG_Config::feature_types;
1680        my %retVal = map { $_ => $_ } @list;
1681        return %retVal;
1682    }
1683    
1684    =head3 AdvancedClassList
1685    
1686    C<< my @classes = SearchHelper::AdvancedClassList(); >>
1687    
1688    Return a list of advanced class names. This list is used to generate the directory
1689    of available searches on the search page.
1690    
1691    The reason we have to convert the list from a string is that the B<NMPDRSetup.pl>
1692    script is only able to insert strings into the generated B<FIG_Config> file.
1693    
1694    =cut
1695    
1696    sub AdvancedClassList {
1697        return split /\s+/, $FIG_Config::advanced_classes;
1698    }
1699    
1700  =head2 Feature Column Methods  =head2 Feature Column Methods
1701    
1702  The methods in this column manage feature column data. If you want to provide the  The methods in this column manage feature column data. If you want to provide the
# Line 1946  Line 1985 
1985      # Return the result.      # Return the result.
1986      return $retVal;      return $retVal;
1987  }  }
1988    
1989    
1990  1;  1;

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3