[Bioperl-l] New Restriction Analysis

Mark A. Jensen maj at fortinbras.us
Tue May 25 16:19:42 UTC 2010


Hi Nick,
You're right, as far as I can tell; the offending line is

@cut_positions=@{$self->{'_cut_positions'}->{$enz}};

so $self->{_cut_positions}->{$enz} must be null. I would say
this is a bug; if you can put what you've reported below in
a bug report at http://bugzilla.bioperl.org, that would be great.
A workaround would be to check whether you have cuts first
before calling the method; but that may be impossible, in which case
a truly awful kludge would be to append a recognized site at the end
of your sequences. Just till we can get to the fix.
cheers Mark
----- Original Message ----- 
From: "Staffa, Nick (NIH/NIEHS) [C]" <staffa at niehs.nih.gov>
To: "Bioperl-l" <bioperl-l at bioperl.org>
Sent: Tuesday, May 25, 2010 10:51 AM
Subject: [Bioperl-l] New Restriction Analysis


>I have tried both these methods for getting new enzyme info into the system:
>
> use Bio::Restriction::IO;
> my $re_io = Bio::Restriction::IO->new(-file => $file,
>                                     -format=>'withrefm');
> my $rebase_collection = $re_io->read;
> A REBASE file in the correct format can be found at 
> ftp://ftp.neb.com/pub/rebase - it will have a name like "withrefm.308". If 
> need be you can also create new enzymes, like this:
> my $re = new Bio::Restriction::Enzyme(-enzyme => 'BioRI',
>                                     -seq => 'GG^AATTCC');
> But the BioPerl sends an error without informing me which of my statements 
> caused it:
>
> Using first the withreftm.005 file from rebase and then these statements (not 
> both at the same time):
> my $enzyme = new Bio::Restriction::Enzyme(-enzyme => 'SgrDI',
>                                      -seq => 'CG^TCGACG');
>
>
> Can't use an undefined value as an ARRAY reference at 
> /usr/lib/perl5/site_perl/5.8.8/Bio/Restriction/Analysis.pm line 529.
>
> This works:
> my $pattern = $enzyme->site;
> print "pattern =  $pattern\n";
> which would lead me to believe there is nothing wrong with my enzyme.
> Could there be a problem if there were no cuts?
> That must be it, because putting info for EcoRI in instead of SgrDI,  the 
> program works:
>
> [Not the whole program, but only the bioPerl stuff.
> my $enzyme = new Bio::Restriction::Enzyme(-enzyme => 'EcoRI',
>                                      -seq => 'G^AATTC');
> use Bio::Restriction::Analysis;
> my $pattern = $enzyme->site;
> print "pattern =  $pattern\n";
> my $db = Bio::DB::Fasta->new("/uoldhome/estaffa/westmoreland/$filename",
>                                -makeid => \&make_my_id);
> my $obj = $db->get_Seq_by_id("$sequenceID"); #Sequence Object
> my $analysis = Bio::Restriction::Analysis->new(-seq => $obj);
> my @strings = $analysis->fragments($enzyme);
>
> What to do?
>
> Nick Staffa
> Telephone: 919-316-4569  (NIEHS: 6-4569)
> Scientific Computing Support Group
> NIEHS Enterprise-Wide Information Technology Support Contract
> National Institute of Environmental Health Sciences
> National Institutes of Health
> Research Triangle Park, North Carolina
>
>
>
> _______________________________________________
> 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