Bio::Restriction::IO prototype
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvs
Summary
Bio::Restriction::IO::prototype - prototype enzyme set
Package variables
No package variables defined.
Included modules
Bio::Restriction::Enzyme
Bio::Restriction::EnzymeCollection
Data::Dumper
Inherit
Bio::Restriction::IO::base
Synopsis
Do not use this module directly. Use it via the Bio::Restriction::IO class.
Description
This is a parser for the proto/neo file REBASE format, which contains
prototype information as well as (in the neo file) neoschizomer data.
Methods
readDescriptionCode
writeDescriptionCode
Methods description
readcode    nextTop
 Title   : read
Usage : $renzs = $stream->read
Function: reads all the restrction enzymes from the stream
Returns : a Bio::Restriction::Restriction object
Args : none
writecodeprevnextTop
 Title   : write
Usage : $stream->write($renzs)
Function: writes restriction enzymes into the stream
Returns : 1 for success and 0 for error
Args : a Bio::Restriction::Enzyme
or a Bio::Restriction::EnzymeCollection object
Methods code
readdescriptionprevnextTop
sub read {
    my $self = shift;
    my $coll = Bio::Restriction::EnzymeCollection->new(-empty => 1);
    my ($seentop, $last_type);
    while (defined (my $line = $self->_readline)) {
        chomp $line;
        next unless $line;
        if ($line =~ /TYPE\s+(I)+/) {
            $last_type = $1;
            $seentop ||= 1;
            next;
        }
        next unless $seentop;
        my @data = split /\s+/,$line,2;
        next if $data[0] =~ /^[-\s]*$/;
        # neo
my ($enzyme, $is_neo, $is_proto, $site); if ($data[0] =~ /^\s+(\S+)\s+(\S+)/) { ($enzyme, $site, $is_proto, $is_neo) = ($1, $2, 0, 1); } else { ($enzyme, $site, $is_proto, $is_neo) = ($data[0], $data[1], 1, 0); } $site =~ s/\s+//g; my $precut; if ($site =~ m/^\((\d+\/\d+)\)[RYATGCN]+/) {
$precut=$1;
$site =~ s/\($precut\)//; } my ($cut, $comp_cut); ($site, $cut, $comp_cut) = $self->_cuts_from_site($site); my $re = Bio::Restriction::Enzyme->new( -type => $last_type, -site => $site, -name => $enzyme, -is_prototype => $is_proto, -is_neoschizomer => $is_neo); if ($cut) { $re->cut($self->_coordinate_shift_to_cut(length($site), $cut)); $re->complementary_cut($self->_coordinate_shift_to_cut(length($site), $comp_cut)); } $coll->enzymes($re); } return $coll->enzymes;
}
writedescriptionprevnextTop
sub write {
    my ($self,@h) = @_;
    $self->throw_not_implemented;
}

1;
}
General documentation
FEEDBACKTop
Mailing ListsTop
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to the
Bioperl mailing lists Your participation is much appreciated.
  bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support Top
Please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. Many experienced and
reponsive experts will be able look at the problem and quickly
address it. Please include a thorough description of the problem
with code and data examples if at all possible.
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution. Bug reports can be submitted via the
web:
  https://redmine.open-bio.org/projects/bioperl/
AUTHORTop
Rob Edwards, redwards@utmem.edu
CONTRIBUTORSTop
Heikki Lehvaslaiho, heikki-at-bioperl-dot-org
APPENDIXTop
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _