[Bioperl-l] SMART domain sequence images

Barry Moore barry.moore at genetics.utah.edu
Tue May 11 19:41:44 EDT 2004


If you can parse out the path to the png file, then you can use 
LWP::Simple getstore method 
(http://search.cpan.org/~gaas/libwww-perl-5.65/lib/LWP/Simple.pm) to 
send it to a file.  This has worked well for me in similar web server 
hacks with image files.


john herbert wrote:

>Hello BioPerlers.
>I am working on a smallish set of peptides and would like to bulk
>download all the SMART domain pngs from the SMART website. Is there
>anything in BioPerl for this? Or does anyone know how I could capture
>the PNG files generated on sequences containing SMART domains from
>SMART's website. 
>Here is an LWP script I tried using:
>use strict;
>use lib
>use LWP::UserAgent;
>use HTTP::Headers;
>use URI::URL;
>use HTTP::Request;
>my $hders = HTTP::Headers->new(Accept => 'image/png');
>my $url =
>my $url_ob = URI::URL->new($url);
>my $req = HTTP::Request->new('POST',$url_ob,$hders);
>my $ua = LWP::UserAgent->new();
>my $resp = $ua->request($req);
>  print $resp->content();
>  print $resp->message();
>I have tried using this LWP script which works in the fact that it does
>collect the png binary data but it will not open as a png file. If I
>compare the file I have collected with my script, than with one I have
>attained by right clicking in windows explorer and saved to my desktop,
>there are some differences. I have no idea why they would be different.
>If there are anyone who has any ideas on this, I would be grateful.
>Bioperl-l mailing list
>Bioperl-l at portal.open-bio.org

Barry Moore
Dept. of Human Genetics
University of Utah
Salt Lake City, UT

More information about the Bioperl-l mailing list