[Bioperl-l] pdb.pm and annotations

Sungsam Gong sung at bio.cc
Wed Dec 16 12:55:16 EST 2009


Hi,

Wanted to get pubmed identifier from a PDB file using Bio::Structure,
so hacked the code.
Knew that Bio::Structure::IO::pdb.pm get relevant info from either
'JRNL' or 'REMARK 1'.
However could not see any actual code parsing 'PMID'.

>From pdb.pm, what I see:

sub _read_PDB_jrnl {
...
           $auth = $self->_concatenate_lines($auth,$rol) if ($subr eq "AUTH");
           $titl = $self->_concatenate_lines($titl,$rol) if ($subr eq "TITL");
           $edit = $self->_concatenate_lines($edit,$rol) if ($subr eq "EDIT");
           $ref  = $self->_concatenate_lines($ref ,$rol) if ($subr eq "REF");
           $publ = $self->_concatenate_lines($publ,$rol) if ($subr eq "PUBL");
           $refn = $self->_concatenate_lines($refn,$rol) if ($subr eq "REFN");
...
}

sub _read_PDB_remark_1 {
...
               $auth = $self->_concatenate_lines($auth,$rol) if
($subr eq "AUTH");
               $titl = $self->_concatenate_lines($titl,$rol) if
($subr eq "TITL");
               $edit = $self->_concatenate_lines($edit,$rol) if
($subr eq "EDIT");
               $ref  = $self->_concatenate_lines($ref ,$rol) if
($subr eq "REF");
               $publ = $self->_concatenate_lines($publ,$rol) if
($subr eq "PUBL");
               $refn = $self->_concatenate_lines($refn,$rol) if
($subr eq "REFN");
...
}

>From my script, I did:

($struc->annotation->get_Annotations('reference'))[0]->authors
($struc->annotation->get_Annotations('reference'))[0]->title

or

my $hash_ref=($struc->annotation->get_Annotations('reference'))[0]->hash_tree
for my $key (keys %{$hash_ref}) {
   print $key,": ",$hash_ref->{$key},"\n";
}

Any plan to include a code chopping 'PMID' out?
Or did I miss something?

Cheers,
Sung



More information about the Bioperl-l mailing list