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

πŸ“¦
version 1.7.3 Β· 3 versions
, in debian bookworm, ubuntu noble

πŸ’– Bio::DB::SoapEUtilities::LinkAdaptor β€” the manual, but make it cute πŸ’–

okay bestie, so this page lives in the User Contributed Perl Documentation section of the manual, and it's filed under the name Bio::D...daptor(3pm) (yes the man page name is literally truncated like that, that's just how the man system do). It's the doc for Bio::DB::SoapEUtilities::LinkAdaptor β€” a handle for Entrez SOAP LinkSets. Let's get into it πŸ¦‹


✨ NAME ✨

Bio::DB::SoapEUtilities::LinkAdaptor β€” it's a Handle for Entrez SOAP LinkSets. That's the whole vibe. It holds your links, it hands them to you one at a time, it slays πŸ’…


🌸 SYNOPSIS 🌸

here's the whole little demo, copied exactly, no edits, periodt:

my $fac = Bio::DB::SoapEUtilities->new();
# run a query, returning a LinkAdaptor
$fac->elink( -db => 'nucleotide',
             -dbfrom => 'protein',
             -id => [qw(828392 790 470338)]);
my $links = $fac->elink->run( -auto_adapt => 1);
# get the linked ids corresponding to the submitted ids
# (may be arrays if multiple crossrefs, or undef if none)
my @nucids = $links->id_map(828392);
# iterate over linksets
while ( my $ls = $links->next_linkset ) {
   my @from_ids = $ls->submitted_ids;
   my @to_ids = $ls->ids;
   my $from_db = $ls->db_from;
   my $to_db = $ls->db_to;
}

see how it just flows? build the factory, run elink, -auto_adapt => 1 so you get the adaptor back, then either id_map a specific id or loop the linksets one by one. iconic, no notes πŸ’–


🌈 DESCRIPTION 🌈

So this adaptor is your lil bestie for parsing NCBI Entrez EUtility elink SOAP results. It gives you an iterator β€” that's next_linkset() β€” plus a bunch of other convenience functions, so you don't have to raw-dog the SOAP XML yourself. obsessed, honestly ✨


πŸŽ€ SEE ALSO πŸŽ€

  • Bio::DB::SoapEUtilities β€” go read this one too, it's the parent vibe

🫢 FEEDBACK 🫢

πŸ’Œ Mailing Lists πŸ’Œ

Real talk: user feedback is literally an integral part of the evolution of this and other Bioperl modules. Your comments and suggestions are wanted, and you should send them preferably to the Bioperl mailing list. Your participation is much 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

and not straight to the module maintainer, okay? Not the move. There are many experienced and responsive experts on the list who'll be able to 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 β€” the more deets the better, 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:

http://redmine.open-bio.org/projects/bioperl/

πŸ‘‘ AUTHOR - Mark A. Jensen πŸ‘‘

Email: maj -at- fortinbras -dot- us ✨


πŸ’€ APPENDIX πŸ’€

The rest of the documentation details each of the object methods. Heads up: internal methods are usually preceded with a _. iykyk 🧚

πŸ“ new πŸ“

Title   : new
Usage   : my $obj = new Bio::DB::SoapEUtilities::LinkAdaptor();
Function: Builds a new Bio::DB::SoapEUtilities::LinkAdaptor object
Returns : an instance of Bio::DB::SoapEUtilities::LinkAdaptor
Args    :

you're literally just building a fresh new object here. brand new main character energy, no args needed πŸ’…

πŸ¦‹ next_linkset() πŸ¦‹

Title   : next_linkset
Usage   :
Function: return the next LinkSet from the attached Result
Returns :
Args    :

the iterator bestie β€” hand it over and it gives you the next LinkSet from the attached Result. one at a time, no cap πŸ”₯

⭐ id_map() ⭐

Title   : id_map
Usage   : $to_id = $adaptor->id_map($from_id)
Function: Return 'to-database' ids corresponding to
          given specified 'from-database' or
          submitted ids
Returns : array of scalars (to-database ids or arrayrefs of ids)
Args    : array of scalars (from-database ids)

you feed it from-database ids (or submitted ids) and it hands back the 'to-database' ids that correspond. Returns an array of scalars β€” those are either to-database ids, or arrayrefs of ids if there's more than one. Args are an array of scalars (the from-database ids). the way it just maps your ids across databases? so useful, so iconic πŸ’–


and that's the whole page, bestie πŸ’œ

cute lil sign-off: this doc was generated by perl v5.36.0 on 2023-01-22, and it's the man page for Bio::D...daptor(3pm) β€” same name we opened with, full circle, we love to see it. bye bye, go link some ids πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from