Bio::Biblio(3pm)
π Bio::Biblio β a bibliographic query service module π
okay bestie, gather round, because this one is literally the module that lets your Perl code go talk to bibliographic databases (yes, like MEDLINE, the whole vibe) and pull citations back out. it's giving librarian but make it SOAP.
Version: 1.70 β¨ (she's been around, she's iconic, she's stable)
πΈ SYNOPSIS πΈ
here's the whole mood in one little code snack:
use Bio::Biblio;
my $biblio = Bio::Biblio->new();
print $biblio->find ('perl')->get_count . "\n";
my $collection = $biblio->find ('brazma', 'authors');
while ( $collection->has_next ) {
print $collection->get_next;
}
# The new() method can accept parameters, for example:
$biblio = Bio::Biblio->new
(-access => 'soap',
-location => 'http://www.ebi.ac.uk/openbqs/services/MedlineSRS',
-destroy_on_exit => '0');
# See below for some one-liners
no cap, that's the entire friend group right there: you make an object, you find stuff, you loop through the results. periodt. π
π¦ DESCRIPTION π¦
So. This is a class whose instances can access bibliographic repositories. Translation: you get to query a bibliographic database (such as MEDLINE) and then retrieve the resulting citations from it. The citations come back in an XML format that is native to the repository, but don't worry β there are also supporting modules for converting them into Perl objects, so you're not stuck parsing XML with your bare hands like some kind of Victorian orphan. π
The detailed descriptions of all query and retrieval methods live in Bio::DB::BiblioI (an interface). All those methods should be called on instances of this (Bio::Biblio) module.
The module complies (with some simplifications) with the specification described in the OpenBQS project. Its home page is at <http://www.ebi.ac.uk/~senger/openbqs>.
The module also gives an access to a set of controlled vocabularies and their values. It allows one to introspect bibliographic repositories and to find what citation resource types (such as journal and book articles, patents or technical reports) are provided, and what attributes they have, eventually what attribute values are allowed. it's giving detective energy πβ¨
Here are some one-liners β yes, you can absolutely just run these in your terminal and feel powerful:
perl -MBio::Biblio -e 'print new Bio::Biblio->get_by_id ("12368254")'
perl -MBio::Biblio \
-e 'print join ("\n", @{ Bio::Biblio->new->find ("brazma")->get_all_ids })'
perl -MBio::Biblio \
-e 'print Bio::Biblio->new->find ("Java")->find ("perl")->get_count'
The main documentation details are to be found in Bio::DB::BiblioI.
π METHODS π
β¨ new
Usage : my $obj = Bio::Biblio->new(@args);
Returns : Bio::Biblio object on success, or undef on failure
Args : This module recognizes and uses:
-access => 'soap'
It indicates what lower-level module to load.
Default is 'soap'.
-location => 'http://...'
It says where to find a bibliographic query service.
The format and contents of this argument is dependent
on the '-access' argument.
For 'soap' access it is a URL of a WebService.
Default is http://www.ebi.ac.uk/openbqs/services/MedlineSRS
Other arguments can be given here but they are
recognized by the lower-level module
(e.g. see Bio::DB::Biblio::soap).
It builds, populates and returns a new Bio::Biblio object. That's how it looks from the outside, bestie. But plot twist: in fact, it builds, populates and returns a more specific lower-level object β for example a Bio::DB::Biblio::soap object β and which one it is depends on the parameter -access. main character with a secret identity, honestly. π
The real initialization is done in the method _initialize of the lower-level object.
This method can also be used for cloning an existing object and changing or adding new attributes to it at the same time. This is, however, not particulary useful for the casual users of this module, because the query methods (see Bio::DB::BiblioI) themselves already return cloned objects with more refined query collections. Anyway this is how the cloning can be done:
use Bio::Biblio;
my $biblio = Bio::Biblio->new();
# this will create a new object which will NOT send a 'destroy'
# message to the remote server when its life ends
my $clone = $biblio->new (-destroy-on-exit => '0');
π§ INTERNAL METHODS π§
okay these are the backstage girlies. you probably don't need to call them yourself, but they're doing the work so the main character can shine. β¨
π _load_access_module
Usage : $class->_load_access_module ($access)
Returns : 1 on success, undef on failure
Args : 'access' should contain the last part of the
name of a module who does the real implementation
It does (in run-time) a similar thing as
require Bio::DB::Biblio::$access
It prints an error on STDERR if it fails to find and load the module (for example, because of the compilation errors in the module). so if something breaks, check your STDERR, bestie, the answer is in there. π
π _guess_access
Usage : $class->_guess_access ($location)
Returns : string with a guessed access protocol (e.g. 'soap')
Args : 'location' defines where to find a bibliographic service
in a protocol-dependent manner (e.g. for SOAP it is
a URL of a bibliographic WebService)
It makes an expert guess what kind of access/transport protocol should be used based on the location of the service (e.g. if the location looks like an IOR then the access protocol is probably CORBA). she's guessing but she's guessing with confidence. π
π OVERVIEW OF CLASSES AND PACKAGES π
Bio::Biblioβ This is the main class to be used by the end users. It loads a real implementation for a particular access protocol according to the argument-access. At the time of writing this documentation there is only one available access module implementing all query and retrieval methods:
-access => soap
This module implements all methods defined in the interface Bio::DB::BiblioI (see Bio::DB::BiblioI) by delegating calls to a loaded low-level module (e.g. see Bio::DB::Biblio::soap).
Note that there are other modules which do not use the SOAP protocol and do not implement all query methods β nevertheless they have retrieval methods and can be used in the same way:
-access => biofetch
Lacking documentation:
-access => eutils
(yes, the docs literally say that. we're keeping it real. π)
Bio::DB::BiblioIβ This is an interface defining all methods that can be called onBio::Biblioinstances.Bio::DB::Biblio::soapβ This is a real implementation of all methods defined inBio::DB::BiblioIusing SOAP protocol (calling a WebService based on SOAP). This class should not be instantiated directly (useBio::Biblioinstead). SeeBio::DB::BiblioIfor details.Bio::Biblio::IOβ This module instantiates and uses a converter of the citations read by any of the access methods mentioned above. SeeBio::Biblio::IOfor details.Bio::Biblio::IO::medlinexmlandBio::Biblio::IO::medline2refβ A converter of MEDLINE citations in XML into Perl objects.Bio::Biblio::IO::pubmedxmlandBio::Biblio::IO::pubmed2refβ A converter of PUBMED citations in XML into Perl objects.
π SEE ALSO π
- OpenBQS home page
<http://www.ebi.ac.uk/~senger/openbqs/>
- Comments to the Perl client
<http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html>
π«Ά 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 the Bioperl mailing list. Your participation is much appreciated.
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 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 of the bugs and their resolution. Bug reports can be submitted via the web:
https://redmine.open-bio.org/projects/bioperl/
π LEGAL π
Authors
Martin Senger <martin.senger@gmail.com>
Copyright and License
This software is Copyright (c) by 2002 European Bioinformatics Institute and released under the license of the same terms as the perl 5 programming language system itself
and that's the whole page, bestie!! π this doc was served up by perl v5.36.0 and dated 2023-02-14 β shoutout to the manual page itself for existing so we could all learn about bibliographic querying together. now go find something. πβ¨π¦
π¦ where this page comes from
- debian trixie: libbio-biblio-perl 1.70-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbio-biblio-perl 1.70-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbio-biblio-perl 1.70-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbio-biblio-perl 1.70-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms