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

Smithies, Russell Russell.Smithies at agresearch.co.nz
Tue Jun 16 23:21:22 EDT 2009


Cigarettes are post-coitus and pre-firing squad.
What you'd be needing is a cigar (proud father)

;-)

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Mark A. Jensen
> Sent: Wednesday, 17 June 2009 2:48 p.m.
> To: bioperl-l at lists.open-bio.org
> Cc: Rasmus Ory Nielsen
> Subject: Re: [Bioperl-l] Bio::Restriction refactor
> [Was:Bio::Restriction::Analysis. Exception when using rebasefile.]
> 
> Dear All,
> 
> The refactored Bio::Restriction::* has been merged to trunk, with all
> tests passing. [Anyone got a cigarette?]
> 
> cheers,
> Mark
> 
> ----- Original Message -----
> From: "Mark A. Jensen" <maj at fortinbras.us>
> To: "Rasmus Ory Nielsen" <ron at ron.dk>; <bioperl-l at lists.open-bio.org>
> Sent: Monday, June 15, 2009 7:49 PM
> Subject: [Bioperl-l] Bio::Restriction refactor
> [Was:Bio::Restriction::Analysis.
> Exception when using rebasefile.]
> 
> 
> > Dear All,
> >
> > The revamped Bio::Restriction::* in branch
> >
> > REPOS/bioperl-live/branches/restriction-refactor
> >
> > passes all existing tests, including those in t/Restriction.
> > New tests will be added within the next day or so.
> > The original bug occurred because only a subset of
> > the possible rebase withrefm-formatted enzymes were
> > handled; it choked on freshly-downloaded rebase
> > files because of this.
> >
> > The refactored version now handles *all* rebase types,
> > including those of rebase forms
> >
> > XXX^X                [ intrasite cutters, the main types
> >                               built in to base.pm]
> > XXXX(m/n)          [ right-end extrasite cutters ]
> > (s/t)XXXX            [ left-end ditto ]
> > (s/t)XXXX(m/n)    [ double-end ditto],
> >
> > palindromic and non-palindromic, as well as multisite
> > enzymes that string together combinations of these
> > forms. Much rationalization (well, seems rational to me
> > anyway) and cruft removal in the affected code has also
> > occurred. itype2.pm has been updated as well, to
> > conform to the refactoring.
> >
> > If you're dying to try this now, get a working copy
> > of the branch like so
> >
> > $ svn co
> > svn://code.open-bio.org/bioperl/bioperl-live/branches/restriction-refactor
> > bioperl-rr
> > $ cd bioperl-rr
> > $ perl Build.PL
> > $ ./Build test
> > $ ./Build install
> >
> > This will only hammer your current installation in the
> > $SITE_LIB/Bio/Restriction path; I worked only on
> > a sparse checkout of the necessary files. To revert to your
> > old install, do
> >
> > $ cd $MY_OLD_BIOPERL_WORKINGDIR
> > $ ./Build install
> >
> > [In the possible event that these instructions are in error,
> > there will be a response on this list in a matter of
> > milliseconds, so stand by.]
> >
> > Happy coding-
> > 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
> >
> >
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================



More information about the Bioperl-l mailing list