[Bioperl-l] Bio::Restriction::Analysis. Exception when using rebase file.
Rasmus Ory Nielsen
ron at ron.dk
Wed Jun 10 07:35:09 UTC 2009
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;
More information about the Bioperl-l
mailing list