Quick Download PDB Files

Joe Ryan jfryan at NHGRI.NIH.GOV
Wed Jul 21 08:59:25 EST 1999


Qiao Li-An,

Here is a quick PERL script to download pdbfiles.
It requires the LWP Modules which you can 
get from http://www.perl.com/CPAN/modules/by-module/LWP/ (look for libwww-perl).

getpdb.pl
---------------------------------------------------------------------
#!/usr/local/bin/perl

use LWP::Simple;

$ARGV[0] || die "USAGE: $0 PDB-ID-CODE (e.g. $0 6q21)\n";

foreach $pdb_id (@ARGV) {
    getprint "http://www.rcsb.org/pdb/cgi/getSequence.cgi/$pdb_id.fasta?chId=$pdb_id&format=fasta", "$pdb_id.fa";

# if you want to save each pdbid to a file uncomment this line
#    getstore "http://www.rcsb.org/pdb/cgi/getSequence.cgi/$pdb_id.fasta?chId=$pdb_id&format=fasta", "$pdb_id.fa";
}
---------------------------------------------------------------------

Then just say

    getpdb.pl 5p21 121p 1gnr ...

--joe

On Wed, Jul 21, 1999 at 04:24:38AM -0700, Qiao Li-An wrote:
> Hello All,
> 
> We  can  use  SRS  method  to download a few PDB files, just click the
> search  results  one by one. But when we want to download thousands of
> protein structure PDB files, the task seems tedious.
> 
> Now  I have a list of PDB Entry ID Code. How can I get these PDB files
> from www directly? Could I use ftp to get all of them?
> 
> 
> Best regards,
>   Qiao Li-An
> 
> -----------------------------------------------------------
> -  Qiao Li-An                                             -
> -  Department of Biological Sciences and Technology,      -
> -  Tsinghua University,  P.R.China ,  100084              -
> -                                                         -
> -  Tel:  (86) 10-62784766(Office)                         -
> -        (86) 10-62785049(Office)                         -
> -        (86) 10-62775313(Dormitory)                      -
> -  E-mail: leroy_qiao at mail.cic.tsinghua.edu.cn (default)  -
> -          leroy_qiao at 263.net                             -
> -----------------------------------------------------------
> 
> 
> 




More information about the Bio-soft mailing list