[Bioperl-l] Bio::Restriction::Analysis. Exception when using rebasefile.

Chris Fields cjfields at illinois.edu
Thu Jun 11 14:19:51 UTC 2009


Mark,

Feel free to take it up.  It's probably a good idea to start a bug  
report for tracking if it proves to be thornier to fix than expected.

chris

On Jun 11, 2009, at 8:17 AM, Mark A. Jensen wrote:

> Rasmus et al-
>
> This looks like a bug. A quick debug shows it's barfing on  
> 'AarI' (as it cycles through
> all enzymes apparently creating a global cut map). AarI has a  
> recognition sequence of
>
> CACCTGC (in $enz->seq->seq)
>
> but a cut site of
>
> CACCTGCNNNN^ (in $enz->seq->site)
>
> The bad parm '11' refers to the end of the cut site sequence, but  
> the routine
> B:R:Analysis::_cuts is attempting to split the 7-symbol recognition  
> sequence,
> and so throws.
>
> This surprises me. Core, let me know if you want me to take this on,  
> or
> if the module author can fix it quicker.
>
> cheers,
> Mark
>
> ----- Original Message ----- From: "Rasmus Ory Nielsen" <ron at ron.dk>
> To: <bioperl-l at lists.open-bio.org>
> Sent: Wednesday, June 10, 2009 3:35 AM
> Subject: [Bioperl-l] Bio::Restriction::Analysis. Exception when  
> using rebasefile.
>
>
>> Hi,
>>
>> This is my first time using bioperl for restriction analysis, so  
>> please bear with me, if this is a FAQ.
>>
>> I downloaded withrefm.906 from ftp://ftp.neb.com/pub/rebase/ and  
>> created the script shown at the bottom of the mail.
>> My bioperl version is bioperl-live nightly from 09-Jun-2009.
>>
>> The scripts throws an exception - see below. But, if I comment out  
>> the '-enzymes' argument, so it uses the built-in collection of  
>> enzymes, it works.
>>
>> My problem is, that I need to use some of the enzymes that are only  
>> available in rebase. So how do I get this working?
>>
>> Thanks for your attention.
>>
>> Best regards,
>> Rasmus Ory Nielsen
>>
>>
>> ############################################################
>> Output from the script:
>> ############################################################
>>
>> [roni at ksdhcp ~]$ ./restriction_test.pl
>>
>> --------------------- WARNING ---------------------
>> MSG: The enzyme name CviKI-1 was changed to CviKI-I
>> ---------------------------------------------------
>>
>> ------------- EXCEPTION -------------
>> MSG: Bad end parameter (11). End must be less than the total length  
>> of sequence (total=7)
>> STACK Bio::PrimarySeq::subseq /usr/local/lib/perl5/site_perl/5.10.0/ 
>> Bio/PrimarySeq.pm:401
>> STACK Bio::Restriction::Analysis::_enzyme_sites /usr/local/lib/ 
>> perl5/site_perl/5.10.0/Bio/Restriction/Analysis.pm:900
>> STACK Bio::Restriction::Analysis::_cuts /usr/local/lib/perl5/ 
>> site_perl/5.10.0/Bio/Restriction/Analysis.pm:801
>> STACK Bio::Restriction::Analysis::cut /usr/local/lib/perl5/ 
>> site_perl/5.10.0/Bio/Restriction/Analysis.pm:379
>> STACK Bio::Restriction::Analysis::fragment_maps /usr/local/lib/ 
>> perl5/site_perl/5.10.0/Bio/Restriction/Analysis.pm:515
>> STACK toplevel ./restriction_test.pl:30
>> -------------------------------------
>>
>> [roni at ksdhcp ~]$
>>
>>
>> ############################################################
>> Output from the script with the '-enzymes' argument commented out
>> ############################################################
>>
>> [roni at ksdhcp ~]$ ./restriction_test.pl
>>
>> --------------------- WARNING ---------------------
>> MSG: The enzyme name CviKI-1 was changed to CviKI-I
>> ---------------------------------------------------
>> $VAR1 = [
>>          {
>>            'seq' => 'CTCGACCGTTAGCAA',
>>            'end' => 15,
>>            'start' => '1'
>>          },
>>          {
>>            'seq' => 'AGCTTTCTACCGTTATCGT',
>>            'end' => 34,
>>            'start' => '16'
>>          }
>>        ];
>> [roni at ksdhcp ~]$
>>
>> ############################################################
>>
>> #!/usr/bin/perl
>> use strict;
>> use warnings;
>> use Bio::PrimarySeq;
>> use Bio::Restriction::IO;
>> use Bio::Restriction::Analysis;
>> use Data::Dumper;
>>
>> # create seq obj
>> my $seqobj = new Bio::PrimarySeq(
>>    -seq        => 'CTCGACCGTTAGCAAAGCTTTCTACCGTTATCGT',
>>    -primary_id => 'test',
>>    -molecule   => 'dna'
>> );
>>
>> # read rebase file
>> my $rebase_io = Bio::Restriction::IO->new(
>>    -file   => 'withrefm.906',
>>    -format => 'withrefm',
>> );
>> my $rebase_collection = $rebase_io->read;
>>
>> # start restriction analysis
>> my $restriction_analysis = Bio::Restriction::Analysis->new(
>>    -seq     => $seqobj,
>>    -enzymes => $rebase_collection,    # it works with this line  
>> commented out
>> );
>>
>> # retrieve fragment maps
>> my @fragment_maps = $restriction_analysis->fragment_maps('HindIII');
>> print Dumper \@fragment_maps;
>> _______________________________________________
>> 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