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

Steve Chervitz sac at bioperl.org
Thu Mar 3 23:07:52 UTC 2011


Chris: Thanks or checking. I'm not sure about this.

Elia: Can you send an example sequence + enzyme name that causes the issue
you found?

Steve

On Thu, Mar 3, 2011 at 2:57 PM, Chris Fields <cjfields at illinois.edu> wrote:

> Forgot to add the summary, just for completeness. lots of errors like this
> that are halting tests:
>
> ------------- EXCEPTION -------------
> MSG: Bad start parameter (0). Start must be positive.
> STACK Bio::PrimarySeq::subseq
> /Users/cjfields/bioperl/bioperl-live/blib/lib/Bio/PrimarySeq.pm:400
> STACK Bio::Restriction::Analysis::fragment_maps
> Bio/Restriction/Analysis.pm:556
> STACK toplevel t/Restriction/Analysis-refac.t:143
> -------------------------------------
>
> Test Summary Report
> -------------------
> t/Restriction/Analysis-refac.t (Wstat: 65280 Tests: 26 Failed: 0)
>  Non-zero exit status: 255
>  Parse errors: Bad plan.  You planned 91 tests but ran 26.
> t/Restriction/Analysis.t      (Wstat: 65280 Tests: 118 Failed: 0)
>  Non-zero exit status: 255
>  Parse errors: Bad plan.  You planned 177 tests but ran 118.
> t/Restriction/Gel.t           (Wstat: 65280 Tests: 3 Failed: 0)
>  Non-zero exit status: 255
>  Parse errors: Bad plan.  You planned 9 tests but ran 3.
> Files=4, Tests=165, 29 wallclock secs ( 0.05 usr  0.03 sys +  3.44 cusr
>  0.21 csys =  3.73 CPU)
> Result: FAIL
> Failed 3/4 test programs. 0/165 subtests failed.
>
> -c
>
> On Mar 3, 2011, at 4:42 PM, Chris Fields wrote:
>
> > Elia, Steve,
> >
> > Any tests we can add for this?  I ran tests with the changes below and
> had several failing ones, but when only implementing the first fix ('unless
> (defined($cut_positions[0]))') all tests pass.  Seems to be a coordinate
> issue (string-based positions are 0-based, bioperl coords are 1-based).
> >
> > chris
> >
> > On Mar 3, 2011, at 3:45 PM, Steve Chervitz wrote:
> >
> >> 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.
> >> _______________________________________________
> >> Bioperl-l mailing list
> >> Bioperl-l at lists.open-bio.org
> >> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> >
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>



More information about the Bioperl-l mailing list