NAME
Bio::Graphics::Browser::RegionSearch -- Search through multiple databases for feature matches.
SYNOPSIS
my $dbs = Bio::Graphics::Browser::RegionSearch->new(
{ source => $data_source,
state => $session_state
});
$dbs->init_databases();
my $features = $dbs->search_features('sma-3');
DESCRIPTION
This implements a feature search based on the heuristics in Bio::Graphics::Browser::Region. The search is distributed across all local and remote databases as specified in the data source.
METHODS
The remainder of this document describes the methods available to the programmer.
$db = Bio::Graphics::Browser::RegionSearch->new({opts})
Create a new RegionSearch object. Required parameters are:
Parameter Description
source The Bio::Graphics::Browser::DataSource
object describing the local and remote
databases for this source.
state The page_settings document describing the
current state of the user session (for
looking up search options and the like in the
future).
$db->init_databases(\@labels)
This method will initialize all the databases in preparation for a search. Pass it a list of track labels to search only in the databases defined by those tracks. Otherwise it will sort all tracks into local and remote ones.
$source = source()
Return the data source.
state()
remote_dbs()
local_dbs()
$found = $db->search_features('search term')
This method will search all the databases for features matching the search term and will return the results as an array ref of Bio::SeqFeatureI objects.
If no search term is provided, then it is taken from the "name" field of the settings object.
$found = $db->search_features_locally('search term')
Search only the local databases for the term.
$found = $db->search_features_remotely('search term')
Search only the remote databases for the term.
$db->add_dbid_to_features($db,$features)
Add a gbrowse_dbid() method to each of the features in the list.
SEE ALSO
Bio::Graphics::Browser::Region, Bio::Graphics::Browser, Bio::Graphics::Feature,
AUTHOR
Lincoln Stein <lincoln.stein@gmail.com>.
Copyright (c) 2008 Cold Spring Harbor Laboratory & Ontario Institute for Cancer Research
This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty.