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

Chris Fields cjfields at illinois.edu
Fri Mar 4 16:09:42 UTC 2011


Committed to github, should be in the next release.  I'll see if I can add a simple test for this.

chris


On Mar 4, 2011, at 3:30 AM, Elia Stupka wrote:

> Ignore the second fix, the first one is the useful and correct one. The 2nd one was an oversight.
> 
> Elia
> 
> 
> ---
> Scientific Director - Bioinformatics, UCL Genomics
> Senior Lecturer, Bioinformatics
> 
> UCL Cancer Institute
> Paul O' Gorman Building
> University College London
> Gower 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
> 
> On 3 Mar 2011, at 22:42, Chris Fields <cjfields at illinois.edu> 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
>> 
> 





More information about the Bioperl-l mailing list