[Bioperl-l] Is there any solution to residue leak problem of the Bio::Structure::Entry get_residues() method

Jian Huang hjian at kuicr.kyoto-u.ac.jp
Sat Jan 27 02:52:44 UTC 2007


Dear Chris,

A simple scipt to detect residue leak bug in Bio::Structure::Entry 
get_residues() method...
You can download a slice of 1TAL structure for test at 
http://bugzilla.open-bio.org/attachment.cgi?id=549

Best regards,

Jian Huang

#!d:\perl\bin\perl.exe

#===================================================
# A simple scipt to detect residue leak bug in
# Bio::Structure::Entry get_residues() method
#
# Please edit the first line according to you system
#
# 120h.pl 1tal.pdb
#====================================================
use strict;
use Bio::Structure::IO;

# create io stream from the first arguments of command line
my $structio = Bio::Structure::IO->new(-file => $ARGV[0]);

# create Bio::Structure::Entry object
my $in = $structio->next_structure;

foreach my $chain ($in->get_chains) {
 foreach my $res ($in->get_residues($chain)){
  print (($res->id).getICode($in,$res),"\n");
 }
}

#--------------------------------------------------------------
# Function getting residue insertion Code based on its CA atom
#--------------------------------------------------------------
sub getICode{
 my ($in,$res) = @_;
 foreach my $atom($in->get_atoms($res)) {
  if ($atom->id eq "CA"){
   my $InsertionCode = $atom->icode;
   return $InsertionCode;
  }
 }
}

#===================================================
# Now look at the 1tal.pdb and the screen output
# residue SER 120H is skipped
#====================================================

__END__




----- Original Message ----- 
From: "Chris Fields" <cjfields at uiuc.edu>
To: "Jian Huang" <hjian at kuicr.kyoto-u.ac.jp>
Cc: <bioperl-l at bioperl.org>
Sent: Thursday, January 25, 2007 10:37 PM
Subject: Re: [Bioperl-l] Is there any solution to residue leak problem of 
the Bio::Structure::Entry get_residues() method


> Jian,
>
> Bio::Structure is one area where much work still needs to be done.   There 
> had been talk on the list a while back about restructuring/ refactoring 
> everything there but I have seen little progress as of yet.
>
> Also, it would help tremendously if you attach a simple script to the  bug 
> report demonstrating the bug for those unfamiliar with  Bio::Structure 
> (like me!).  This is so we can confirm it and try to  get a fix in.
>
> cheers!
>
> chris
>
> On Jan 24, 2007, at 6:31 PM, Jian Huang wrote:
>
>> Dear all,
>>
>> When two or more continuous residues have insertion codes and they  are 
>> with the same residue name, get_residues() method of 
>> Bio::Structure::Entry can only get the first residue. Other residue (s) 
>> will be omitted. For example, in PDB structure 1tal, SER-120H  will be 
>> omitted, although the previous SER-120G will be returned  properly. I 
>> have reported this bug. See http://bugzilla.open- 
>> bio.org/show_bug.cgi?id=2192
>>
>> It seems that this bug is then actually due to add_residue() method  and 
>> then and then...Is there any solution to this problem?
>>
>> Jian Huang
>> hjian at kuicr.kyoto-u.ac.jp
>>
>> Bioinformatics Center,
>> Kyoto University
>> Gokasho, Uji, Kyoto 611-0011, JAPAN
>> Phone: +81-774-38-3296, Fax: +81-774-38-3269
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> Christopher Fields
> Postdoctoral Researcher
> Lab of Dr. Robert Switzer
> Dept of Biochemistry
> University of Illinois Urbana-Champaign
>
>
>
> 





More information about the Bioperl-l mailing list