Bio::D...bQuery(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

🌸 NAME 🌸

Bio::DB::Query::WebQuery β€” helper class for web-based sequence queryies πŸ’…

(yes bestie, it really says queryies up there, and honestly? iconic. we keep the typo, we respect the typo 🫢)


✨ SYNOPSIS ✨

# Do not use this class directly.  See Bio::DB::QueryI and one of
# the implementor classes (such as Bio::DB::GenBankQuery) for
# information.

Also go look at Bio::DB::QueryI and Bio::DB::GenBankQuery, mkay? πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so, lowkey the most important thing here: do not use this class directly. Like, at all. Not even a little. Go read Bio::DB::QueryI and one of the implementor classes (such as Bio::DB::Query::GenBank) instead β€” that's where the actual info lives. This one is giving scaffolding energy. πŸ—οΈ

And if you're out here writing a subclass? You absolutely must define _get_params() and _parse_response(), and you might need to override _request_method(). No cap. πŸŽ€


πŸ’Œ FEEDBACK πŸ’Œ

πŸ“¬ Mailing Lists

User feedback is literally an integral part of the evolution of this and other Bioperl modules β€” that's not just a vibe, that's the whole thing. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is so appreciated, fr fr. 🫢

bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

πŸ›Ÿ Support

Please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

...rather than sliding into the module maintainer's DMs directly. πŸ™ˆ So many experienced and responsive experts will be able to look at the problem and quickly address it. And if at all possible, please include a thorough description of the problem with code and data examples. Give them the full picture, bestie. πŸ“Έ

πŸ› Reporting Bugs

Report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution. Bug reports can be submitted via the web:

https://github.com/bioperl/bioperl-live/issues

πŸ‘‘ AUTHOR - Lincoln Stein πŸ‘‘

Email lstein@cshl.org


πŸ“– APPENDIX πŸ“–

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ (that underscore is the "no touchy" marker, iykyk 🌚).


πŸŽ€ new

Title   : new
Usage   : $db = Bio::DB::WebQuery->new(@args)
Function: create new query object
Returns : new query object
Args    : -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. She said "don't bother with the query, I already have the list." πŸ’…


πŸŽ€ ua

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

πŸŽ€ proxy

Title   : proxy
Usage   : $httpproxy = $db->proxy('http')  or
          $db->proxy(['http','ftp'], 'http://myproxy' )
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)

πŸŽ€ authentication

Title   : authentication
Usage   : $db->authentication($user,$pass)
Function: Get/Set authentication credentials
Returns : Array of user/pass
Args    : Array or user/pass

πŸŽ€ ids

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

πŸŽ€ query

Title   : query
Usage   : $query = $db->query([$query])
Function: get/set query string
Returns : string
Args    : (optional) new query string

πŸŽ€ delay

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
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_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
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. So like... approximately, bestie. 🫠

πŸŽ€ _sleep

Title   : _sleep
Usage   : $self->_sleep
Function: sleep for a number of seconds indicated by the delay policy
Returns : none
Args    : 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. It remembers. It always remembers. πŸ’€

πŸŽ€ _fetch_ids

Title   : _fetch_ids
Usage   : @ids = $db->_fetch_ids
Function: run query, get ids
Returns : array of sequence ids
Args    : none

πŸŽ€ _run_query

Title   : _run_query
Usage   : $success = $db->_run_query
Function: run query, parse results
Returns : true if successful
Args    : none

πŸŽ€ _truncated

Title   : _truncated
Usage   : $flag = $db->_truncated([$newflag])
Function: get/set truncation flag
Returns : boolean
Args    : new flag

Some databases will truncate output unless explicitly asked not to. This flag allows a "two probe" attempt. πŸ‘€πŸ”


πŸŽ€ _get_request

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

πŸŽ€ _parse_response

Title   : _parse_response
Usage   : $db->_parse_response($content)
Function: parse out response
Returns : empty
Args    : none
Throws  : 'unparseable output exception'
NOTE: This method must be implemented by subclass. Non-negotiable, bestie. 🚨

πŸŽ€ _request_parameters

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
NOTE: This method must be implemented by subclass. Again. Mandatory. 🫑

πŸŽ€ _generate_id_string

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)
NOTE: This method must be implemented by subclass. Three for three, you got this. πŸ’ͺ

and that's the whole page, bestie!! πŸŽ€βœ¨ this one's from perl v5.32.1, dated 2021-08-15, and it's part of the User Contributed Perl Documentation (that's the 3pm energy in the title, iykyk πŸ’…). go forth and subclass responsibly. mwah. πŸ’–

πŸ“¦ where this page comes from