.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::DB::SoapEUtilities::Result 3pm" .TH Bio::DB::SoapEUtilities::Result 3pm "2023-01-22" "perl v5.36.0" "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::SoapEUtilities::Result \- Accessor object for SoapEUtilities results .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& $fac = Bio::DB::SoapEUtilities\->new(); \& $result = $fac\->esearch( \-db => \*(Aqgene\*(Aq, \-term => \*(Aqhedgehog\*(Aq)\->run; \& $count = $result\->count; # case important; $result\->Count could be arrayref \& @ids = $result\->ids; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module attempts to make Entrez Utilities \s-1SOAP\s0 responses as user-friendly and intuitive as possible. These responses can be complex structures with much useful data; but users will generally desire the values of some key fields. The Result object provides access to all response values via systematically named accessor methods, and commonly used values as convenience methods. The 'raw' \&\s-1SOAP\s0 message (a \s-1SOAP::SOM\s0 object as returned by SOAP::Lite) is also provided. .IP "Convenience accessors" 4 .IX Item "Convenience accessors" If a list of record ids is returned by the call, \f(CW\*(C`ids()\*(C'\fR will return these as an array reference: .Sp .Vb 1 \& @seq_ids = $result\->ids; .Ve .Sp The total count of returned records is provided by \f(CW\*(C`count()\*(C'\fR: .Sp .Vb 1 \& $num_recs = $result\->count; .Ve .Sp If \f(CW\*(C`usehistory\*(C'\fR was specified in the \s-1SOAP\s0 call, the NCBI-assigned web environment (that can be used in future calls) is available in \&\f(CW\*(C`webenv\*(C'\fR, and the query key assigned to the result in \f(CW\*(C`query_key\*(C'\fR: .Sp .Vb 2 \& $next_result = $fac\->efetch( \-WebEnv => $result\->webenv, \& \-QueryKey => $result\->query_key ); .Ve .IP "Walking the response" 4 .IX Item "Walking the response" This module uses \f(CW\*(C`AUTOLOAD\*(C'\fR to provide accessor methods for all response data. Here is an example of a \s-1SOAP\s0 response as returned by a \f(CW\*(C`method()\*(C'\fR call off the \s-1SOAP::SOM\s0 object: .Sp .Vb 10 \& DB<5> x $result\->som\->method \& 0 HASH(0x2eac9a4) \& \*(AqCount\*(Aq => 148 \& \*(AqIdList\*(Aq => HASH(0x4139578) \& \*(AqId\*(Aq => 100136227 \& \*(AqQueryKey\*(Aq => 1 \& \*(AqQueryTranslation\*(Aq => \*(Aqsonic[All Fields] AND hedgehog[All Fields]\*(Aq \& \*(AqRetMax\*(Aq => 20 \& \*(AqRetStart\*(Aq => 0 \& \*(AqTranslationSet\*(Aq => \*(Aq\*(Aq \& \*(AqTranslationStack\*(Aq => HASH(0x4237b4c) \& \*(AqOP\*(Aq => \*(AqGROUP\*(Aq \& \*(AqTermSet\*(Aq => HASH(0x42c43bc) \& \*(AqCount\*(Aq => 2157 \& \*(AqExplode\*(Aq => \*(AqY\*(Aq \& \*(AqField\*(Aq => \*(AqAll Fields\*(Aq \& \*(AqTerm\*(Aq => \*(Aqhedgehog[All Fields]\*(Aq \& \*(AqWebEnv\*(Aq => \*(AqNCID_1_150423569_130.14.22.101_9001_1262703782\*(Aq .Ve .Sp Some of the data values here (at the tips of the data structure) are actually arrays of values ( e.g., the tip \f(CW\*(C`IdList =\*(C'\fR Id> ), other tips are simple scalars. With this in mind, \f(CW\*(C`Result\*(C'\fR accessor methods work as follows: .Sp Data values (at the tips of the response structure) are acquired by calling a method with the structure keys separated by underscores (if necessary): .Sp .Vb 2 \& $query_key = $result\->QueryKey; # $query_key == 1 \& $ids = $result\->IdList_Id; # @$ids is an array of record ids .Ve .Sp Data \fIsets\fR below a particular node in the response structure can also be obtained with similarly constructed method names. These \&'internal node accessors' return a hashref, containing all data leaves below the node, keyed by the accessor names: .Sp .Vb 1 \& $data_hash = $result\->TranslationStack \& \& DB<3> x $data_hash \& 0 HASH(0x43569d4) \& \*(AqTranslationStack_OP\*(Aq => ARRAY(0x42d9988) \& 0 \*(AqAND\*(Aq \& 1 \*(AqGROUP\*(Aq \& \*(AqTranslationStack_TermSet_Count\*(Aq => ARRAY(0x4369c64) \& 0 148 \& 1 148 \& 2 2157 \& \*(AqTranslationStack_TermSet_Explode\*(Aq => ARRAY(0x4368998) \& 0 \*(AqY\*(Aq \& 1 \*(AqY\*(Aq \& \*(AqTranslationStack_TermSet_Field\*(Aq => ARRAY(0x4368260) \& 0 \*(AqAll Fields\*(Aq \& 1 \*(AqAll Fields\*(Aq \& \*(AqTranslationStack_TermSet_Term\*(Aq => ARRAY(0x436c97c) \& 0 \*(Aqsonic[All Fields]\*(Aq \& 1 \*(Aqhedgehog[All Fields]\*(Aq .Ve .Sp Similarly, the call \f(CW\*(C` $result\-\*(C'\fRTranslationStack_TermSet > would return a similar hash containing the last 4 elements of the example hash above. .Sp Creating accessors is somewhat costly, especially for fetch responses which can be deep and complex (not unlike BioPerl developers). Portions of the response tree can be ignored by setting \&\f(CW\*(C`\-prune_at_node\*(C'\fR to a arrayref of nodes to skip. Nodes should be specified in \s-1SOAP::SOM\s0 format, e.g. .Sp .Vb 1 \& ...::Result\->new( \-prune_at_nodes => [\*(Aq//GBSeq_references\*(Aq] ); .Ve .Sp Accessor creation can be skipped altogether by passing \f(CW\*(C`\-no_parse =\*(C'\fR 1> to the \f(CW\*(C`Result\*(C'\fR constructor. This is recommended if a result is being passed to a Bio::DB::SoapEUtilities::FetchAdaptor. The original \s-1SOAP\s0 message with all data is always available in \f(CW\*(C`$result\-\*(C'\fRsom>. .PP Other methods .IP "\fBaccessors()\fR" 4 .IX Item "accessors()" An array of available data accessor names. This contains only the data \*(L"tips\*(R". The internal node accessors are autoloaded. .IP "\fBok()\fR" 4 .IX Item "ok()" True if no \s-1SOAP\s0 fault. .IP "\fBerrstr()\fR" 4 .IX Item "errstr()" Returns the \s-1SOAP\s0 fault error string. .IP "\fBsom()\fR" 4 .IX Item "som()" The original \f(CW\*(C`SOAP::SOM\*(C'\fR message. .IP "\fButil()\fR" 4 .IX Item "util()" The EUtility associated with the result. .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 the Bioperl mailing list. 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 bioperl\-l@bioperl.org .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 of the bugs and their resolution. Bug reports can be submitted via the web: .PP .Vb 1 \& http://redmine.open\-bio.org/projects/bioperl/ .Ve .SH "AUTHOR \- Mark A. Jensen" .IX Header "AUTHOR - Mark A. Jensen" Email maj \-at\- fortinbras \-dot\- us .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "\fBparse_methods()\fP" .IX Subsection "parse_methods()" .Vb 5 \& Title : parse_methods \& Usage : \& Function: parse out the accessor methods \& Returns : self (Result object) \& Args : $alias_hash (hashref), $prune_at_nodes (scalar or arrayref) .Ve .SS "\fButil()\fP" .IX Subsection "util()" .Vb 5 \& Title : util \& Usage : \& Function: Name of the utility producing this result object. \& Returns : scalar string \& Args : .Ve .SS "\fBsom()\fP" .IX Subsection "som()" .Vb 5 \& Title : som \& Usage : \& Function: get the original SOAP::SOM object \& Returns : a SOAP::SOM object \& Args : none .Ve .SS "\fBok()\fP" .IX Subsection "ok()" .Vb 5 \& Title : ok \& Usage : \& Function: \& Returns : true if no SOAP fault \& Args : .Ve .SS "\fBerrstr()\fP" .IX Subsection "errstr()" .Vb 5 \& Title : errstr \& Usage : \& Function: \& Returns : fault string of SOAP object \& Args : none .Ve .SS "\fBaccessors()\fP" .IX Subsection "accessors()" .Vb 8 \& Title : accessors \& Usage : \& Function: get the list of created accessors for this \& result \& Returns : array of scalar strings \& Args : none \& Note : does not include valid AUTOLOADed accessors; see \& DESCRIPTION .Ve .SS "\fBwebenv()\fP" .IX Subsection "webenv()" .Vb 6 \& Title : webenv \& Usage : \& Function: contains WebEnv key referencing this \& result\*(Aqs session \& Returns : scalar \& Args : none .Ve .SS "\fBquery_key()\fP()" .IX Subsection "query_key()()" .Vb 6 \& Title : query_key() \& Usage : \& Function: contains the web query key assigned \& to this result \& Returns : scalar \& Args : .Ve .SS "\fBfetch_type()\fP" .IX Subsection "fetch_type()" .Vb 5 \& Title : fetch_type \& Usage : \& Function: Get the efetch database name according to WSDL \& Returns : scalar string (db name) or undef if N/A \& Args : none .Ve