NAME
Bio::DB::Query::WebQuery - Helper class for web-based sequence queryies
SYNOPSIS
# Do not use this class directly. See Bio::DB::QueryI and one of# the implementor classes (such as Bio::DB::GenBankQuery) for# information.
See Bio::DB::QueryI, Bio::DB::GenBankQuery
DESCRIPTION
Do not use this class directly. See Bio::DB::QueryI and one of the implementor classes (such as Bio::DB::Query::GenBank) for information.
Those writing subclasses must define _get_params() and _parse_response(), and possibly override _request_method().
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Lincoln Stein
Email [email protected]
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
new
Title : newUsage : $db = Bio::DB::WebQuery->new(@args)Function: create new query objectReturns : new query objectArgs : -db database (e.g. 'protein')-ids array ref of ids (overrides query)-verbose turn on verbose debugging
This method creates a new query object. Typically you will specify a -db and a -query argument. The value of -query is a database-specific string.
If you provide an array reference of IDs in -ids, the query will be ignored and the list of IDs will be used when the query is passed to the database.
ua
Title : uaUsage : my $ua = $self->ua or$self->ua($ua)Function: Get/Set a LWP::UserAgent for useReturns : reference to LWP::UserAgent ObjectArgs : $ua - must be a LWP::UserAgent
proxy
Title : proxyUsage : $httpproxy = $db->proxy('http') or$db->proxy(['http','ftp'], 'http://myproxy' )Function: Get/Set a proxy for use of proxyReturns : a string indicating the proxyArgs : $protocol : an array ref of the protocol(s) to set/get$proxyurl : url of the proxy to use for the specified protocol$username : username (if proxy requires authentication)$password : password (if proxy requires authentication)
authentication
Title : authenticationUsage : $db->authentication($user,$pass)Function: Get/Set authentication credentialsReturns : Array of user/passArgs : Array or user/pass
ids
Title : idsUsage : @ids = $db->ids([@ids])Function: get/set matching idsReturns : array of sequence idsArgs : (optional) array ref with new set of ids
query
Title : queryUsage : $query = $db->query([$query])Function: get/set query stringReturns : stringArgs : (optional) new query string
delay
Title : delayUsage : $secs = $self->delay([$secs])Function: get/set number of seconds to delay between fetchesReturns : number of seconds to delayArgs : new value
NOTE: the default is to use the value specified by delay_policy(). This can be overridden by calling this method, or by passing the -delay argument to new().
delay_policy
Title : delay_policyUsage : $secs = $self->delay_policyFunction: return number of seconds to delay between calls to remote dbReturns : number of seconds to delayArgs : none
NOTE: The default delay policy is 0s. Override in subclasses to implement delays. The timer has only second resolution, so the delay will actually be +/- 1s.
_sleep
Title : _sleepUsage : $self->_sleepFunction: sleep for a number of seconds indicated by the delay policyReturns : noneArgs : none
NOTE: This method keeps track of the last time it was called and only imposes a sleep if it was called more recently than the delay_policy() allows.
_fetch_ids
Title : _fetch_idsUsage : @ids = $db->_fetch_idsFunction: run query, get idsReturns : array of sequence idsArgs : none
_run_query
Title : _run_queryUsage : $success = $db->_run_queryFunction: run query, parse resultsReturns : true if successfulArgs : none
_truncated
Title : _truncatedUsage : $flag = $db->_truncated([$newflag])Function: get/set truncation flagReturns : booleanArgs : new flag
Some databases will truncate output unless explicitly asked not to. This flag allows a "two probe" attempt.
_get_request
Title : _get_requestUsage : $http_request = $db->_get_request(@params)Function: create an HTTP::Request with indicated parametersReturns : HTTP::Request objectArgs : CGI parameter list
_parse_response
Title : _parse_responseUsage : $db->_parse_response($content)Function: parse out responseReturns : emptyArgs : noneThrows : 'unparseable output exception'
NOTE: This method must be implemented by subclass.
_request_parameters
Title : _request_parametersUsage : ($method,$base,@params = $db->_request_parametersFunction: return information needed to construct the requestReturns : list of method, url base and key=>value pairsArgs : none
NOTE: This method must be implemented by subclass.
_generate_id_string
Title : _generate_id_stringUsage : $string = $db->_generate_id_stringFunction: joins IDs together in string (implementation-dependent)Returns : string of concatenated IDsArgs : array ref of ids (normally passed into the constructor)
NOTE: This method must be implemented by subclass.