Lightweight DAS components in Perl

1,871 views
1,823 views

Published on

A summary of two BioDAS services (Bio::Das::ProServer server and Bio::Das::Lite client) available in Perl.

Published in: Business, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,871
On SlideShare
0
From Embeds
0
Number of Embeds
20
Actions
Shares
0
Downloads
14
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Lightweight DAS components in Perl

  1. 1. ProServer & Bio::Das::Lite Lightweight DAS components in Perl Roger Pettett Project Leader, Web Systems Wellcome Trust Sanger Institute
  2. 2. What is ProServer? <ul><li>Standalone DAS 1.5+ Server </li></ul><ul><ul><li>First server to support gene and protein DAS </li></ul></ul><ul><li>Written in Perl </li></ul><ul><ul><li>Using POE </li></ul></ul><ul><li>Easily extensible </li></ul><ul><li>Supports a wide range of data sources </li></ul><ul><ul><li>DBI, flat-file, GFF, Excel </li></ul></ul><ul><li>Available on CPAN </li></ul>
  3. 3. ProServer Features <ul><li>Simple to set up </li></ul><ul><li>Smallish memory footprint </li></ul><ul><ul><li>We serve 2200+ sources in ~8-20Mb per process with ~2-4Mb shared </li></ul></ul><ul><li>Easy to configure </li></ul><ul><ul><li>.ini format file </li></ul></ul><ul><li>Easy to extend </li></ul><ul><ul><li>Lots of examples </li></ul></ul>
  4. 4. ProServer Installation <ul><li>wget http://www.sanger.ac.uk/proserver/ProServer-2.tar.gz </li></ul><ul><li>tar -xzvf ProServer-2.tar.gz </li></ul><ul><li>cd Bio-Das-ProServer </li></ul><ul><li>perl Makefile.PL </li></ul><ul><li>make test </li></ul><ul><li>[configure proserver.ini] </li></ul><ul><li>eg/proserver </li></ul>
  5. 5. ProServer Structure (1) Source Adaptor Data Server .ini file Transport
  6. 6. ProServer Structure (2) MySQL Transport Source Adaptor DB Server .ini file DB DB Oracle Transport DB DB
  7. 7. ProServer Configuration (1) [mysimplefile] adaptor = simple state = on transport = file filename = /path/to/genelist.txt baseurl = http://www.example.org/report?id= type = gene feature_query = field0 like &quot;%s”
  8. 8. ProServer Configuration (2) [mysimpledb] adaptor = simpledb state = on transport = dbi dbhost = databasesrv1 dbport = 3306 dbname = simpledb dbuser = simplero dbpass = topsecret
  9. 9. ProServer Extensions (1) <ul><li>Inherit and extend SourceAdaptor.pm </li></ul><ul><li>Edit capabilities </li></ul><ul><li>Implement for example, the build_features method to run a database SQL query or an API call and return the correct data structure. </li></ul>
  10. 10. ProServer Extensions (2) { ‘ label’ => ‘ Pelizaeus-Merzbacher disease’, 'id' => 10 , 'type' => ‘ decipher:known:ins ’, 'typecategory' => ’decipher', 'method' => ’decipher', 'start' => 102528707, 'end' => 103018423, 'note' => … , 'link' => …, ‘ linktxt’ => ‘Syndrome Report’, };
  11. 11. ProServer SourceHydra (1) <ul><li>Clone sources with the same structure </li></ul><ul><li>One configuration section </li></ul><ul><li>For example: Ensembl DAS uploads </li></ul><ul><ul><li>One hydra database </li></ul></ul><ul><ul><li>Many tables with the same schema </li></ul></ul>
  12. 12. ProServer SourceHydra (2) [simplehydra] state = on adaptor = simpledb hydra = dbi transport = dbi basename = hydra dbname = hydra dbhost = databasesrv1 dbuser = hydraro password = topsecret
  13. 13. Things I’d like to do <ul><li>ProServer </li></ul><ul><ul><li>Apache plugins for ModPerl & CGI </li></ul></ul><ul><ul><li>Automatic registry updates </li></ul></ul><ul><ul><li>Live server statistics </li></ul></ul><ul><ul><li>Embedded graphics </li></ul></ul><ul><ul><li>Streamed responses </li></ul></ul><ul><ul><li>Yahoo Pipes-ish service proxy/aggregation </li></ul></ul>
  14. 14. Bio::Das::Lite <ul><li>A small DAS 1 client </li></ul><ul><li>Returns plain data structures </li></ul><ul><li>Few dependencies </li></ul><ul><ul><li>LWP::Parallel::UserAgent for asynchronous I/O </li></ul></ul><ul><ul><li>SOAP::Lite for registry access </li></ul></ul><ul><li>Available on CPAN </li></ul>
  15. 15. Bio::Das::Lite Synopsis use Bio:::Das::Lite my $singledsn = Bio::Das::Lite-> new(‘http://das.sanger.ac.uk/das/hgnc36’); my $features = $singledsn->features(‘X:1,1000000’); use Bio:::Das::Lite my $multidsn = Bio::Das::Lite->new({ ‘ dsn’ => [qw( http://das…das/hgnc36 http://das…/das/decipher)], }); my $multiseg = $bdl->features([qw(X:1,1000000 3:1,1000000 17:1,1000000)]);
  16. 16. Citing ProServer <ul><li>ProServer: A simple, extensible Perl DAS server. </li></ul><ul><li>Finn RD, Stalker JW, Jackson DK, Kulesha E, Clements J, Pettett R </li></ul><ul><li>Bioinformatics. 2007;. PMID: 17237073 DOI: 10.1093/bioinformatics/btl650 </li></ul>
  17. 17. Acknowledgements Rob Finn, Jim Stalker, David Jackson, Eugene Kulesha, Jody Clements, Tony Cox, Will Spooner, Andreas Kahari
  18. 18. More Information [email_address] Bug Reports & Feature Requests http://search.cpan.org/~rpettett/ Bio::Das::Lite http://www.sanger.ac.uk/proserver/ ProServer

×