.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::DB::Query::WebQuery 3pm" .TH Bio::DB::Query::WebQuery 3pm "2021-08-15" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::DB::Query::WebQuery \- Helper class for web\-based sequence queryies .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& # Do not use this class directly. See Bio::DB::QueryI and one of \& # the implementor classes (such as Bio::DB::GenBankQuery) for \& # information. .Ve .PP See Bio::DB::QueryI, Bio::DB::GenBankQuery .SH "DESCRIPTION" .IX Header "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. .PP Those writing subclasses must define \fB_get_params()\fR and \&\fB_parse_response()\fR, and possibly override \fB_request_method()\fR. .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP 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. .SS "Reporting Bugs" .IX Subsection "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: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Lincoln Stein" .IX Header "AUTHOR - Lincoln Stein" Email lstein@cshl.org .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "new" .IX Subsection "new" .Vb 7 \& Title : new \& Usage : $db = Bio::DB::WebQuery\->new(@args) \& Function: create new query object \& Returns : new query object \& Args : \-db database (e.g. \*(Aqprotein\*(Aq) \& \-ids array ref of ids (overrides query) \& \-verbose turn on verbose debugging .Ve .PP 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. .PP 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. .SS "ua" .IX Subsection "ua" .Vb 6 \& Title : ua \& Usage : my $ua = $self\->ua or \& $self\->ua($ua) \& Function: Get/Set a LWP::UserAgent for use \& Returns : reference to LWP::UserAgent Object \& Args : $ua \- must be a LWP::UserAgent .Ve .SS "proxy" .IX Subsection "proxy" .Vb 9 \& Title : proxy \& Usage : $httpproxy = $db\->proxy(\*(Aqhttp\*(Aq) or \& $db\->proxy([\*(Aqhttp\*(Aq,\*(Aqftp\*(Aq], \*(Aqhttp://myproxy\*(Aq ) \& Function: Get/Set a proxy for use of proxy \& Returns : a string indicating the proxy \& Args : $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) .Ve .SS "authentication" .IX Subsection "authentication" .Vb 5 \& Title : authentication \& Usage : $db\->authentication($user,$pass) \& Function: Get/Set authentication credentials \& Returns : Array of user/pass \& Args : Array or user/pass .Ve .SS "ids" .IX Subsection "ids" .Vb 5 \& Title : ids \& Usage : @ids = $db\->ids([@ids]) \& Function: get/set matching ids \& Returns : array of sequence ids \& Args : (optional) array ref with new set of ids .Ve .SS "query" .IX Subsection "query" .Vb 5 \& Title : query \& Usage : $query = $db\->query([$query]) \& Function: get/set query string \& Returns : string \& Args : (optional) new query string .Ve .SS "delay" .IX Subsection "delay" .Vb 5 \& Title : delay \& Usage : $secs = $self\->delay([$secs]) \& Function: get/set number of seconds to delay between fetches \& Returns : number of seconds to delay \& Args : new value .Ve .PP \&\s-1NOTE:\s0 the default is to use the value specified by \fBdelay_policy()\fR. This can be overridden by calling this method, or by passing the \&\-delay argument to \fBnew()\fR. .SS "delay_policy" .IX Subsection "delay_policy" .Vb 5 \& Title : delay_policy \& Usage : $secs = $self\->delay_policy \& Function: return number of seconds to delay between calls to remote db \& Returns : number of seconds to delay \& Args : none .Ve .PP \&\s-1NOTE:\s0 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. .SS "_sleep" .IX Subsection "_sleep" .Vb 5 \& Title : _sleep \& Usage : $self\->_sleep \& Function: sleep for a number of seconds indicated by the delay policy \& Returns : none \& Args : none .Ve .PP \&\s-1NOTE:\s0 This method keeps track of the last time it was called and only imposes a sleep if it was called more recently than the \fBdelay_policy()\fR allows. .SS "_fetch_ids" .IX Subsection "_fetch_ids" .Vb 5 \& Title : _fetch_ids \& Usage : @ids = $db\->_fetch_ids \& Function: run query, get ids \& Returns : array of sequence ids \& Args : none .Ve .SS "_run_query" .IX Subsection "_run_query" .Vb 5 \& Title : _run_query \& Usage : $success = $db\->_run_query \& Function: run query, parse results \& Returns : true if successful \& Args : none .Ve .SS "_truncated" .IX Subsection "_truncated" .Vb 5 \& Title : _truncated \& Usage : $flag = $db\->_truncated([$newflag]) \& Function: get/set truncation flag \& Returns : boolean \& Args : new flag .Ve .PP Some databases will truncate output unless explicitly asked not to. This flag allows a \*(L"two probe\*(R" attempt. .SS "_get_request" .IX Subsection "_get_request" .Vb 5 \& Title : _get_request \& Usage : $http_request = $db\->_get_request(@params) \& Function: create an HTTP::Request with indicated parameters \& Returns : HTTP::Request object \& Args : CGI parameter list .Ve .SS "_parse_response" .IX Subsection "_parse_response" .Vb 6 \& Title : _parse_response \& Usage : $db\->_parse_response($content) \& Function: parse out response \& Returns : empty \& Args : none \& Throws : \*(Aqunparseable output exception\*(Aq .Ve .PP \&\s-1NOTE:\s0 This method must be implemented by subclass. .SS "_request_parameters" .IX Subsection "_request_parameters" .Vb 5 \& Title : _request_parameters \& Usage : ($method,$base,@params = $db\->_request_parameters \& Function: return information needed to construct the request \& Returns : list of method, url base and key=>value pairs \& Args : none .Ve .PP \&\s-1NOTE:\s0 This method must be implemented by subclass. .SS "_generate_id_string" .IX Subsection "_generate_id_string" .Vb 5 \& Title : _generate_id_string \& Usage : $string = $db\->_generate_id_string \& Function: joins IDs together in string (implementation\-dependent) \& Returns : string of concatenated IDs \& Args : array ref of ids (normally passed into the constructor) .Ve .PP \&\s-1NOTE:\s0 This method must be implemented by subclass.