[Bioperl-l] Problem using column_from_residue_number

Téletchéa Stéphane stephane.teletchea at inserm.fr
Tue Apr 23 18:44:47 UTC 2013


Le 23/04/2013 19:48, Roy Chaudhuri a écrit :
> Hi Stéphane,
>
> I think you are confusing Bioperl's biological coordinates (which 
> start at 1) with Perl coordinates (which start at 0). Just realising 
> this distinction should answer your first problem - the first column 
> of the alignment is column 1, so of course you get an error 
> (admittedly a not very helpful one) when you specify column 0.

Hi Roy,

Yes, I am aware of this offset which is logical from a human point of 
view, and so from bioperl's perspective, so this is correct.

On the other hand ...

>
> The same confusion causes a subtle bug in your example code for 
> problem b - you use $col1 and $col2 for your substr coordinates, but 
> they are biological coordinates returned by Bioperl, so you need to 
> subtract one (or you could use the Bio::Seq method subseq rather than 
> Perl's substr). Correcting this bug means that you do not get any gaps 
> reported in the output.

I have just "not" catch this issue and it never came to my mind I was 
doing back the conversion perl->bioperl here!
I'm so used to using plain perl that I just did not even think of using 
subseq...

Thanks a lot for the rapid answer, (brain) bug solved :-)



>
> Cheers,
> Roy.
>

Cheers,

Stéphane


-- 
Equipe DSIMB - Dynamique des Structures et
des Interactions des Macromolécules Biologiques
INTS, INSERM-Paris-Diderot UMR-S665
6 rue Alexandre Cabanel - 75739 Paris cedex 15- France
Tél : +33 144 493 057
Fax : +33 147 347 431
http://www.dsimb.inserm.fr / http://steletch.free.fr





More information about the Bioperl-l mailing list