[Bioperl-l] SMART domain sequence images

john herbert john.herbert at clinical-pharmacology.oxford.ac.uk
Tue May 11 11:59:52 EDT 2004

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.


More information about the Bioperl-l mailing list