[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:
#!/usr/local/bin/perl

use strict;
use lib
'/usr/ngasi/contexts/jakeysnakey/jakeysnakey/NewPerlLib/lib/perl5/site_perl';
use LWP::UserAgent;
use HTTP::Headers;
use URI::URL;
use HTTP::Request;

my $hders = HTTP::Headers->new(Accept => 'image/png');
my $url =
qq(http://smart.embl-heidelberg.de/smart/DD2.cgi?smart=428:DEXDc(64|265)+HELICc(301|382)+"%20border=0%20usemap="#map00"%20ALT="Bubblogram");


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);
if($resp->is_success){
  print $resp->content();
}else{
  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.
thanks.

John.




More information about the Bioperl-l mailing list