[Bioperl-l] PDB Parser
Sendu Bala
bix at sendu.me.uk
Fri Aug 17 13:35:01 UTC 2007
neeti somaiya wrote:
> Hi,
>
> I have done it currently as follows :
[snip]
> Is this ok?
If it works, of course. There seems to be some redundant code there,
however. I'm guessing this would be better (assuming your code worked in
the first place):
while (my $struc = $in->next_structure()) {
my $pdb_id = $struc->id;
print "Structure ", $pdb_id,"\n";
my $ac = $struc->annotation();
my ($title) = $ac->get_Annotations('title');
$title = $title->as_text;
chomp($title);
if ($title =~ /Value\: (.*)/) {
$title = $1;
}
$title =~ s/\s+/ /g;
print "Title ",$title,"\n";
}
More information about the Bioperl-l
mailing list