[Bioperl-l] Bug in Bio::Restriction::Analysis

Steve Chervitz sac at bioperl.org
Thu Mar 3 21:45:27 UTC 2011


Good catch, Elia. Looks like an legitimate edge case. Your fix looks
reasonable to me, but I haven't tried running it through the regression
tests to see if it breaks anything else.

Would be good to get this fix into the upcoming release.

Cheers,
Steve


On Thu, Mar 3, 2011 at 8:50 AM, Elia Stupka <e.stupka at ucl.ac.uk> wrote:

> Hi Steve and Rob,
>
> it's been sometime since I last plunged my head into the code, but today we
> nailed a bug in Bio::Restriction::Analysis.
>
> Basically if a sequence has a restriction site which is exactly at the
> start of the sequence, it fails to produce any sites. The  culprits is this
> line (536 of Analysis.pm)
>
> unless ($cut_positions[0]) {
>
> where if the position is zero, it will fail to execute the rest of the
> code, so I changed it to:
>
> unless (defined($cut_positions[0])) {
>
> Also, for similar reasons a bit further down this line:
>
> my $start=1; my $stop; my %seq; my %stop;
>
> needs to change to:
> my $start=0; my $stop; my %seq; my %stop;
>
> I didn't commit the changes because I wanted to check if it makes sense,
> etc.
>
> The bug seems reproducible also in older, stable versions of bioperl, such
> as 1.4 and 1.6...
>
> best
>
> Elia
>
>
>
> ---
> Scientific Director - Bioinformatics, UCL Genomics
> Senior Lecturer, Bioinformatics
>
> UCL Cancer Institute
> Paul O' Gorman Building
> University College London
> 72, Huntley Street
> WC1E 6BT
> London
> UK
>
> Institute of Cell and Molecular Science
> Barts and The London School of Medicine and Dentistry
> 4 Newark Street
> Whitechapel
> London
> E1 2AT
>
> Office (UCL): +44 207 679 6493
> Fax: +44 0207 6796817
> Office (ICMS): +44 0207 8822374
>
> Mobile: +44 787 6478912
>
>
>
>
-- 
Steve Chervitz, Ph.D.
Omicia Inc. |  Senior Computational Biologist
2200 Powell Street, Ste 525, Emeryville CA 94608
T 510-595-0800 | F 510-588-4523 | M 510-390-3613 | schervitz at omicia.com

Omicia.com: Unlocking Individualized Medicine.



More information about the Bioperl-l mailing list