.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" 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" '' '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 turned on, 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. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" 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::Das::Lite 3pm" .TH Bio::Das::Lite 3pm "2011-11-26" "perl v5.14.2" "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::Das::Lite \- Perl extension for the DAS (HTTP+XML) Protocol (http://biodas.org/) .SH "VERSION" .IX Header "VERSION" .Vb 1 \& See $Bio::Das::Lite::VERSION .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Bio::Das::Lite; \& my $bdl = Bio::Das::Lite\->new_from_registry({\*(Aqcategory\*(Aq => \*(AqGRCh_37,Chromosome,Homo sapiens\*(Aq}); \& my $results = $bdl\->features(\*(Aq22\*(Aq); .Ve .SH "SUBROUTINES/METHODS" .IX Header "SUBROUTINES/METHODS" .SS "new : Constructor" .IX Subsection "new : Constructor" .Vb 1 \& my $das = Bio::Das::Lite\->new(\*(Aqhttp://das.ensembl.org/das/ensembl1834\*(Aq); \& \& my $das = Bio::Das::Lite\->new({ \& \*(Aqtimeout\*(Aq => 60, \& \*(Aqdsn\*(Aq => \*(Aqhttp://user:pass@das.ensembl.org/das/ensembl1834\*(Aq, \& \*(Aqhttp_proxy\*(Aq => \*(Aqhttp://user:pass@webcache.local.com:3128/\*(Aq, \& }); \& \& Options can be: dsn (optional scalar or array ref, URLs of DAS services) \& timeout (optional int, HTTP fetch timeout in seconds) \& http_proxy (optional scalar, web cache or proxy if not set in %ENV) \& no_proxy (optional list/ref, non\-proxiable domains if not set in %ENV) \& caching (optional bool, primitive caching on/off) \& callback (optional code ref, callback for processed XML blocks) \& registry (optional array ref containing DAS registry service URLs \& defaults to \*(Aqhttp://das.sanger.ac.uk/registry/services/das\*(Aq) \& proxy_user (optional scalar, username for authenticating forward\-proxy) \& proxy_pass (optional scalar, password for authenticating forward\-proxy) \& user_agent (optional scalar, User\-Agent HTTP request header value) .Ve .SS "new_from_registry : Constructor" .IX Subsection "new_from_registry : Constructor" .Vb 3 \& Similar to \*(Aqnew\*(Aq above but supports \*(Aqcapability\*(Aq and \*(Aqcategory\*(Aq \& in the given hashref, using them to query the DAS registry and \& configuring the DSNs accordingly. \& \& my $das = Bio::Das::Lite\->new_from_registry({ \& \*(Aqcapability\*(Aq => [\*(Aqfeatures\*(Aq], \& \*(Aqcategory\*(Aq => [\*(AqProtein Sequence\*(Aq], \& }); \& \& Options are as above, plus \& capability OR capabilities (optional arrayref of capabilities) \& category (optional arrayref of categories) \& \& \& For a complete list of capabilities and categories, see: \& \& http://das.sanger.ac.uk/registry/ \& \& The category can optionally be a full coordinate system name, \& allowing further restriction by authority, version and species. \& For example: \& \*(AqProtein Sequence\*(Aq OR \& \*(AqUniProt,Protein Sequence\*(Aq OR \& \*(AqGRCh_37,Chromosome,Homo sapiens\*(Aq .Ve .SS "http_proxy : Get/Set http_proxy" .IX Subsection "http_proxy : Get/Set http_proxy" .Vb 1 \& $das\->http_proxy(\*(Aqhttp://user:pass@squid.myco.com:3128/\*(Aq); .Ve .SS "proxy_user : Get/Set proxy username for authenticating forward-proxies" .IX Subsection "proxy_user : Get/Set proxy username for authenticating forward-proxies" .Vb 1 \& This is only required if the username wasn\*(Aqt specified when setting http_proxy \& \& $das\->proxy_user(\*(Aqmyusername\*(Aq); .Ve .SS "proxy_pass : Get/Set proxy password for authenticating forward-proxies" .IX Subsection "proxy_pass : Get/Set proxy password for authenticating forward-proxies" .Vb 1 \& This is only required if the password wasn\*(Aqt specified when setting http_proxy \& \& $das\->proxy_pass(\*(Aqsecretpassword\*(Aq); .Ve .SS "no_proxy : Get/Set domains to not use proxy for" .IX Subsection "no_proxy : Get/Set domains to not use proxy for" .Vb 3 \& $das\->no_proxy(\*(Aqebi.ac.uk\*(Aq, \*(Aqlocalhost\*(Aq); \& OR \& $das\->no_proxy( [\*(Aqebi.ac.uk\*(Aq, \*(Aqlocalhost\*(Aq] ); \& \& Always returns an arrayref .Ve .SS "user_agent : Get/Set user-agent for request headers" .IX Subsection "user_agent : Get/Set user-agent for request headers" .Vb 1 \& $das\->user_agent(\*(AqGroovyDAS/1.0\*(Aq); .Ve .SS "timeout : Get/Set timeout" .IX Subsection "timeout : Get/Set timeout" .Vb 1 \& $das\->timeout(30); .Ve .SS "caching : Get/Set caching" .IX Subsection "caching : Get/Set caching" .Vb 1 \& $das\->caching(1); .Ve .SS "callback : Get/Set callback code ref" .IX Subsection "callback : Get/Set callback code ref" .Vb 1 \& $das\->callback(sub { }); .Ve .SS "basename : Get base \s-1URL\s0(s) of service" .IX Subsection "basename : Get base URL(s) of service" .Vb 1 \& $das\->basename(optional $dsn); .Ve .SS "dsn : Get/Set \s-1DSN\s0" .IX Subsection "dsn : Get/Set DSN" .Vb 1 \& $das\->dsn(\*(Aqhttp://das.ensembl.org/das/ensembl1834/\*(Aq); # give dsn (scalar or arrayref) here if not specified in new() \& \& Or, if you want to add to the existing dsn list and you\*(Aqre feeling sneaky... \& \& push @{$das\->dsn}, \*(Aqhttp://my.server/das/additionalsource\*(Aq; .Ve .SS "dsns : Retrieve information about other sources served from this server." .IX Subsection "dsns : Retrieve information about other sources served from this server." .Vb 1 \& Note this call is \*(Aqdsns\*(Aq, as differentiated from \*(Aqdsn\*(Aq which is the current configured source \& \& my $src_data = $das\->dsns(); .Ve .SS "entry_points : Retrieve the list of entry_points for this source" .IX Subsection "entry_points : Retrieve the list of entry_points for this source" .Vb 1 \& e.g. chromosomes and associated information (e.g. sequence length and version) \& \& my $entry_points = $das\->entry_points(); .Ve .SS "Types of argument for 'types', 'features', 'sequence' calls:" .IX Subsection "Types of argument for 'types', 'features', 'sequence' calls:" .Vb 2 \& Segment Id: \& \*(Aq1\*(Aq \& \& Segment Id with range: \& \*(Aq1:1,1000\*(Aq \& \& Segment Id with range and type: \& { \& \*(Aqsegment\*(Aq => \*(Aq1:1,1000\*(Aq, \& \*(Aqtype\*(Aq => \*(Aqexon\*(Aq, \& } \& \& Multiple Ids with ranges and types: \& [ \& { \& \*(Aqsegment\*(Aq => \*(Aq1:1,1000\*(Aq, \& \*(Aqtype\*(Aq => \*(Aqexon\*(Aq, \& }, \& { \& \*(Aqsegment\*(Aq => \*(Aq2:1,1000\*(Aq, \& \*(Aqtype\*(Aq => \*(Aqexon\*(Aq, \& }, \& ] \& \& See DAS specifications for other parameters .Ve .SS "types : Find out about different data types available from this source" .IX Subsection "types : Find out about different data types available from this source" .Vb 1 \& my $types = $das\->types(); # takes optional args \- see DAS specs \& \& Retrieve the types of data available for this source \& e.g. 32k_cloneset, karyotype, swissprot .Ve .SS "features : Retrieve features from a segment" .IX Subsection "features : Retrieve features from a segment" .Vb 1 \& e.g. clones on a chromosome \& \& ######### \& # Different ways to fetch features \- \& # \& my $feature_data1 = $das\->features(\*(Aq1:1,100000\*(Aq); \& my $feature_data2 = $das\->features([\*(Aq1:1,100000\*(Aq, \*(Aq2:20435000,21435000\*(Aq]); \& my $feature_data3 = $das\->features({ \& \*(Aqsegment\*(Aq => \*(Aq1:1,1000\*(Aq, \& \*(Aqtype\*(Aq => \*(Aqkaryotype\*(Aq, \& # optional args \- see DAS Spec \& }); \& my $feature_data4 = $das\->features([ \& {\*(Aqsegment\*(Aq => \*(Aq1:1,1000000\*(Aq,\*(Aqtype\*(Aq => \*(Aqkaryotype\*(Aq,}, \& {\*(Aqsegment\*(Aq => \*(Aq2:1,1000000\*(Aq,}, \& {\*(Aqgroup_id\*(Aq => \*(AqOTTHUMG00000036084\*(Aq,}, \& ]); \& \& ######### \& # Feature fetch with callback \& # \& my $callback = sub { \& my $struct = shift; \& print {*STDERR} Dumper($struct); \& }; \& # then: \& $das\->callback($callback); \& $das\->features(\*(Aq1:1,1000000\*(Aq); \& \& # or: \& $das\->features(\*(Aq1:1,1000000\*(Aq, $callback); \& \& # or: \& $das\->features([\*(Aq1:1,1000000\*(Aq, \*(Aq2:1,1000000\*(Aq, \*(Aq3:1,1000000\*(Aq], $callback); \& \& # or: \& $das\->features([{\*(Aqgroup_id\*(Aq => \*(AqOTTHUMG00000036084\*(Aq}, \*(Aq2:1,1000000\*(Aq, \*(Aq3:1,1000000\*(Aq], $callback); .Ve .SS "alignment : Retrieve protein alignment data for a query. This can be a multiple sequence alignment or pairwise alignment. Note \- this has not been tested for structural alignments as there is currently no Das source avialable." .IX Subsection "alignment : Retrieve protein alignment data for a query. This can be a multiple sequence alignment or pairwise alignment. Note - this has not been tested for structural alignments as there is currently no Das source avialable." .Vb 1 \& my $alignment = $das\->alignment({query => \*(AqQ01234\*(Aq}); .Ve .SS "structure : Retrieve known structure (i.e. \s-1PDB\s0) for a query" .IX Subsection "structure : Retrieve known structure (i.e. PDB) for a query" .Vb 1 \& my $structure = $das\->structure({ query => \*(Aqpdb_id\*(Aq}); .Ve .SS "sources : Retrieves the list of sources form the \s-1DAS\s0 registry, via a \s-1DAS\s0 call." .IX Subsection "sources : Retrieves the list of sources form the DAS registry, via a DAS call." .Vb 1 \& my $sources = $das\->source; .Ve .SS "sequence : Retrieve sequence data for a segment (probably dna or protein)" .IX Subsection "sequence : Retrieve sequence data for a segment (probably dna or protein)" .Vb 1 \& my $sequence = $das\->sequence(\*(Aq2:1,1000\*(Aq); # segment:start,stop (e.g. chromosome 2, bases 1 to 1000) .Ve .SS "stylesheet : Retrieve stylesheet data" .IX Subsection "stylesheet : Retrieve stylesheet data" .Vb 2 \& my $style_data = $das\->stylesheet(); \& my $style_data2 = $das\->stylesheet($callback); .Ve .SS "statuscodes : Retrieve \s-1HTTP\s0 status codes for request URLs" .IX Subsection "statuscodes : Retrieve HTTP status codes for request URLs" .Vb 2 \& my $code = $das\->statuscodes($url); \& my $code_hashref = $das\->statuscodes(); .Ve .SS "max_hosts set number of running concurrent host connections" .IX Subsection "max_hosts set number of running concurrent host connections" .Vb 1 \& THIS METHOD IS NOW DEPRECATED AND HAS NO EFFECT \& \& $das\->max_hosts(7); \& print $das\->max_hosts(); .Ve .SS "max_req set number of running concurrent requests per host" .IX Subsection "max_req set number of running concurrent requests per host" .Vb 1 \& THIS METHOD IS NOW DEPRECATED AND HAS NO EFFECT \& \& $das\->max_req(5); \& print $das\->max_req(); .Ve .SS "registry : Get/Set accessor for DAS-Registry service URLs" .IX Subsection "registry : Get/Set accessor for DAS-Registry service URLs" .Vb 1 \& $biodaslite\->registry(\*(Aqhttp://www.dasregistry.org/das\*(Aq); \& \& my $registry_arrayref = $biodaslite\->registry(); .Ve .SS "registry_sources : Arrayref of dassource objects from the configured registry services" .IX Subsection "registry_sources : Arrayref of dassource objects from the configured registry services" .Vb 1 \& my $sources_ref = $biodaslite\->registry_sources(); \& \& my $sources_ref = $biodaslite\->registry_sources({ \& \*(Aqcapability\*(Aq => [\*(Aqfeatures\*(Aq,\*(Aqstylesheet\*(Aq], \& }); \& \& my $sources_ref = $biodaslite\->registry_sources({ \& \*(Aqcategory\*(Aq => [\*(AqProtein Sequence\*(Aq], \& }); .Ve .SS "build_queries" .IX Subsection "build_queries" Constructs an arrayref of \s-1DAS\s0 requests including parameters for each call .SS "build_requests" .IX Subsection "build_requests" Constructs the WWW::Curl callbacks .SS "postprocess" .IX Subsection "postprocess" Applies processing to the result set, e.g. removal of whitespace from sequence responses. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is an implementation of a client for the \s-1DAS\s0 protocol (\s-1XML\s0 over \s-1HTTP\s0 primarily for biological-data). .SH "DEPENDENCIES" .IX Header "DEPENDENCIES" .IP "strict" 4 .IX Item "strict" .PD 0 .IP "warnings" 4 .IX Item "warnings" .IP "WWW::Curl" 4 .IX Item "WWW::Curl" .IP "HTTP::Response" 4 .IX Item "HTTP::Response" .IP "Carp" 4 .IX Item "Carp" .IP "English" 4 .IX Item "English" .IP "Readonly" 4 .IX Item "Readonly" .PD .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .Vb 1 \& Set $Bio::Das::Lite::DEBUG = 1; .Ve .SH "CONFIGURATION AND ENVIRONMENT" .IX Header "CONFIGURATION AND ENVIRONMENT" .SH "INCOMPATIBILITIES" .IX Header "INCOMPATIBILITIES" .SH "BUGS AND LIMITATIONS" .IX Header "BUGS AND LIMITATIONS" .Vb 1 \& The max_req and max_hosts methods are now deprecated and have no effect. .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1DAS\s0 Specifications at: http://biodas.org/documents/spec.html .PP ProServer (A \s-1DAS\s0 Server implementation also by the author) at: http://www.sanger.ac.uk/proserver/ .PP The venerable Bio::Das suite (\s-1CPAN\s0 and http://www.biodas.org/download/Bio::Das/). .PP The \s-1DAS\s0 Registry at: http://das.sanger.ac.uk/registry/ .SH "AUTHOR" .IX Header "AUTHOR" Roger Pettett, .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" Copyright (C) 2007 \s-1GRL\s0, by Roger Pettett .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.