2 # bioperl module for Bio::Tools::SeqPattern
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Steve Chervitz (sac-at-bioperl.org)
8 # Copyright Steve Chervitz
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Tools::SeqPattern - represent a sequence pattern or motif
20 use Bio::Tools::SeqPattern;
22 my $pat1 = 'T[GA]AA...TAAT';
23 my $pattern1 = Bio::Tools::SeqPattern->new(-SEQ =>$pat1, -TYPE =>'Dna');
25 my $pat2 = '[VILM]R(GXX){3,2}...[^PG]';
26 my $pattern2 = Bio::Tools::SeqPattern->new(-SEQ =>$pat2, -TYPE =>'Amino');
30 L<Bio::Tools::SeqPattern> module encapsulates generic data and
31 methods for manipulating regular expressions describing nucleic or
32 amino acid sequence patterns (a.k.a, "motifs"), such as the ones produced by
35 L<Bio::Tools::SeqPattern> is a concrete class that inherits from L<Bio::Seq>.
37 This class grew out of a need to have a standard module for doing routine
38 tasks with sequence patterns such as:
40 -- Forming a reverse-complement version of a nucleotide sequence pattern
41 -- Expanding patterns containing ambiguity codes
42 -- Checking for invalid regexp characters
43 -- Untainting yet preserving special characters in the pattern
45 Other features to look for in the future:
47 -- Full pattern syntax checking
48 -- Conversion between expanded and condensed forms of the pattern
52 A key motivation for L<Bio::Tools::SeqPattern> is to have a way to
53 generate a reverse complement of a nucleotide sequence pattern.
54 This makes possible simultaneous pattern matching on both sense and
55 anti-sense strands of a query sequence.
57 In principle, one could do such a search more inefficiently by testing
58 against both sense and anti-sense versions of a sequence.
59 It is entirely equivalent to test a regexp containing both sense and
60 anti-sense versions of the *pattern* against one copy of the sequence.
61 The latter approach is much more efficient since:
63 1) You need only one copy of the sequence.
64 2) Only one regexp is executed.
65 3) Regexp patterns are typically much smaller than sequences.
67 Patterns can be quite complex and it is often difficult to
68 generate the reverse complement pattern. The Bioperl SeqPattern.pm
69 addresses this problem, providing a convenient set of tools
70 for working with biological sequence regular expressions.
72 Not all patterns have been tested. If you discover a pattern that
73 is not handled properly by Bio::Tools::SeqPattern.pm, please
74 send me some email (sac@bioperl.org). Thanks.
78 =head2 Extended Alphabet Support
80 This module supports the same set of ambiguity codes for nucleotide
81 sequences as supported by L<Bio::Seq>. These ambiguity codes
82 define the behavior or the L<expand> method.
84 ------------------------------------------
85 Symbol Meaning Nucleic Acid
86 ------------------------------------------
92 M A or C a(M)ino group
95 S C or G (S)trong bond
108 ------------------------------------------
110 ------------------------------------------
132 B Aspartic Acid, Asparagine
133 Z Glutamic Acid, Glutamine
138 =head2 Multiple Format Support
140 Ultimately, this module should be able to build SeqPattern.pm objects
141 using a variety of pattern formats such as ProSite, Blocks, Prints, GCG, etc.
142 Currently, this module only supports patterns using a grep-like syntax.
146 A simple demo script called seq_pattern.pl is included in the examples/
147 directory of the central Bioperl distribution.
151 L<Bio::Seq> - Lightweight sequence object.
153 L<Bio::Tools::IUPAC> - The IUPAC code for degenerate residues and their
154 conversion to a regular expression.
160 User feedback is an integral part of the evolution of this and other
161 Bioperl modules. Send your comments and suggestions preferably to one
162 of the Bioperl mailing lists. Your participation is much appreciated.
164 bioperl-l@bioperl.org - General discussion
165 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
169 Please direct usage questions or support issues to the mailing list:
171 I<bioperl-l@bioperl.org>
173 rather than to the module maintainer directly. Many experienced and
174 reponsive experts will be able look at the problem and quickly
175 address it. Please include a thorough description of the problem
176 with code and data examples if at all possible.
178 =head2 Reporting Bugs
180 Report bugs to the Bioperl bug tracking system to help us keep track
181 the bugs and their resolution. Bug reports can be submitted via the
184 https://github.com/bioperl/bioperl-live/issues
188 Steve Chervitz, sac-at-bioperl.org
192 Copyright (c) 1997-8 Steve Chervitz. All Rights Reserved.
193 This module is free software; you can redistribute it and/or
194 modify it under the same terms as Perl itself.
201 #### END of main POD documentation.
205 # CREATED : 28 Aug 1997
208 package Bio
::Tools
::SeqPattern
;
210 use base
qw(Bio::Root::Root);
213 $ID = 'Bio::Tools::SeqPattern';
215 ## These constants may be more appropriate in a Bio::Dictionary.pm
218 my $PYRIMIDINES = 'CT';
221 my $Regexp_chars = '\w,.\*()\[\]<>\{\}^\$'; # quoted for use in regexps
223 ## Package variables used in reverse complementing.
224 my (%Processed_braces, %Processed_asterics);
226 #####################################################################################
228 #####################################################################################
233 Usage : my $seqpat = Bio::Tools::SeqPattern->new();
234 Purpose : Verifies that the type is correct for superclass (Bio::Seq.pm)
235 : and calls superclass constructor last.
237 Argument : Parameters passed to new()
238 Throws : Exception if the pattern string (seq) is empty.
239 Comments : The process of creating a new SeqPattern.pm object
240 : ensures that the pattern string is untained.
242 See Also : L<Bio::Root::Root::new>,
243 L<Bio::Seq::_initialize>
250 my($class, %param) = @_;
252 my $self = $class->SUPER::new
(%param);
253 my ($seq,$type) = $self->_rearrange([qw(SEQ TYPE)], %param);
255 $seq || $self->throw("Empty pattern.");
257 # Get the type ready for Bio::Seq.pm
258 if ($type =~ /nuc|[dr]na/i) {
260 } elsif ($type =~ /amino|pep|prot/i) {
263 $seq =~ tr/a-z/A-Z/; #ps 8/8/00 Canonicalize to upper case
274 Usage : $mypat->alphabet_ok;
275 Purpose : Checks for invalid regexp characters.
276 : Overrides Bio::Seq::alphabet_ok() to allow
277 : additional regexp characters ,.*()[]<>{}^$
278 : in addition to the standard genetic alphabet.
279 : Also untaints the pattern and sets the sequence
280 : object's sequence to the untained string.
281 Returns : Boolean (1 | 0)
283 Throws : Exception if the pattern contains invalid characters.
284 Comments : Does not call the superclass method.
285 : Actually permits any alphanumeric, not just the
286 : standard genetic alphabet.
295 return 1 if $self->{'_alphabet_checked'};
297 $self->{'_alphabet_checked'} = 1;
299 my $pat = $self->seq();
301 if($pat =~ /[^$Regexp_chars]/io) {
302 $self->throw("Pattern contains invalid characters: $pat",
303 'Legal characters: a-z,A-Z,0-9,,.*()[]<>{}^$ ');
306 # Untaint pattern (makes code taint-safe).
307 $pat =~ /([$Regexp_chars]+)/io;
308 $self->setseq(uc($1));
309 # print STDERR "\npattern ok: $pat\n";
316 Usage : $seqpat_object->expand();
317 Purpose : Expands the sequence pattern using special ambiguity codes.
318 Example : $pat = $seq_pat->expand();
319 Returns : String containing fully expanded sequence pattern
321 Throws : Exception if sequence type is not recognized
322 : (i.e., is not one of [DR]NA, Amino)
324 See Also : L<Extended Alphabet Support>, L<_expand_pep>(), L<_expand_nuc>()
333 if($self->type =~ /[DR]na/i) { $self->_expand_nuc(); }
334 elsif($self->type =~ /Amino/i) { $self->_expand_pep(); }
336 $self->throw("Don't know how to expand ${\$self->type} patterns.\n");
344 Usage : n/a; automatically called by expand()
345 Purpose : Expands peptide patterns
346 Returns : String (the expanded pattern)
347 Argument : String (the unexpanded pattern)
350 See Also : L<expand>(), L<_expand_nuc>()
357 my ($self,$pat) = @_;
363 ## Avoid nested situations: [bmnq] --/--> [[$ZED]mnq]
364 ## Yet correctly deal with: fze[bmnq] ---> f[$BEE]e[$ZEDmnq]
365 if($pat =~ /\[\w*[BZ]\w*\]/) {
366 $pat =~ s/\[(\w*)B(\w*)\]/\[$1$ZED$2\]/g;
367 $pat =~ s/\[(\w*)Z(\w*)\]/\[$1$BEE$2\]/g;
368 $pat =~ s/B/\[$ZED\]/g;
369 $pat =~ s/Z/\[$BEE\]/g;
371 $pat =~ s/B/\[$ZED\]/g;
372 $pat =~ s/Z/\[$BEE\]/g;
374 $pat =~ s/\((.)\)/$1/g; ## Doing these last since:
375 $pat =~ s/\[(.)\]/$1/g; ## Pattern could contain [B] (for example)
385 Purpose : Expands nucleotide patterns
386 Returns : String (the expanded pattern)
387 Argument : String (the unexpanded pattern)
390 See Also : L<expand>(), L<_expand_pep>()
397 my ($self,$pat) = @_;
407 ## Avoid nested situations: [ya] --/--> [[ct]a]
408 ## Yet correctly deal with: sg[ya] ---> [gc]g[cta]
409 if($pat =~ /\[\w*[RYSWMK]\w*\]/) {
410 $pat =~ s/\[(\w*)R(\w*)\]/\[$1$PURINES$2\]/g;
411 $pat =~ s/\[(\w*)Y(\w*)\]/\[$1$PYRIMIDINES$2\]/g;
412 $pat =~ s/\[(\w*)S(\w*)\]/\[$1GC$2\]/g;
413 $pat =~ s/\[(\w*)W(\w*)\]/\[$1AT$2\]/g;
414 $pat =~ s/\[(\w*)M(\w*)\]/\[$1AC$2\]/g;
415 $pat =~ s/\[(\w*)K(\w*)\]/\[$1GT$2\]/g;
416 $pat =~ s/\[(\w*)V(\w*)\]/\[$1ACG$2\]/g;
417 $pat =~ s/\[(\w*)H(\w*)\]/\[$1ACT$2\]/g;
418 $pat =~ s/\[(\w*)D(\w*)\]/\[$1AGT$2\]/g;
419 $pat =~ s/\[(\w*)B(\w*)\]/\[$1CGT$2\]/g;
420 $pat =~ s/R/\[$PURINES\]/g;
421 $pat =~ s/Y/\[$PYRIMIDINES\]/g;
422 $pat =~ s/S/\[GC\]/g;
423 $pat =~ s/W/\[AT\]/g;
424 $pat =~ s/M/\[AC\]/g;
425 $pat =~ s/K/\[GT\]/g;
426 $pat =~ s/V/\[ACG\]/g;
427 $pat =~ s/H/\[ACT\]/g;
428 $pat =~ s/D/\[AGT\]/g;
429 $pat =~ s/B/\[CGT\]/g;
431 $pat =~ s/R/\[$PURINES\]/g;
432 $pat =~ s/Y/\[$PYRIMIDINES\]/g;
433 $pat =~ s/S/\[GC\]/g;
434 $pat =~ s/W/\[AT\]/g;
435 $pat =~ s/M/\[AC\]/g;
436 $pat =~ s/K/\[GT\]/g;
437 $pat =~ s/V/\[ACG\]/g;
438 $pat =~ s/H/\[ACT\]/g;
439 $pat =~ s/D/\[AGT\]/g;
440 $pat =~ s/B/\[CGT\]/g;
442 $pat =~ s/\((.)\)/$1/g; ## Doing thses last since:
443 $pat =~ s/\[(.)\]/$1/g; ## Pattern could contain [y] (for example)
454 Purpose : Forms a pattern capable of recognizing the reverse complement
455 : version of a nucleotide sequence pattern.
456 Example : $pattern_object->revcom();
457 : $pattern_object->revcom(1); ## returns expanded rev complement pattern.
458 Returns : Object reference for a new Bio::Tools::SeqPattern containing
459 : the revcom of the current pattern as its sequence.
460 Argument : (1) boolean (optional) (default= false)
461 : true : expand the pattern before rev-complementing.
462 : false: don't expand pattern before or after rev-complementing.
463 Throws : Exception if called for amino acid sequence pattern.
464 Comments : This method permits the simultaneous searching of both
465 : sense and anti-sense versions of a nucleotide pattern
466 : by means of a grep-type of functionality in which any
467 : number of patterns may be or-ed into the recognition
469 : Overrides Bio::Seq::revcom() and calls it first thing.
470 : The order of _fixpat() calls is critical.
472 See Also : L<Bio::Seq::revcom>, L</_fixpat_1>, L</_fixpat_2>, L</_fixpat_3>, L</_fixpat_4>, L</_fixpat_5>
479 my($self,$expand) = @_;
481 if ($self->type !~ /Dna|Rna/i) {
482 $self->throw("Can't get revcom for ${\$self->type} sequence types.\n");
484 # return $self->{'_rev'} if defined $self->{'_rev'};
487 my $str = $self->str;
488 $str =~ tr/acgtrymkswhbvdnxACGTRYMKSWHBVDNX/tgcayrkmswdvbhnxTGCAYRKMSWDVBHNX/;
489 my $rev = CORE
::reverse $str;
490 $rev =~ tr/[](){}<>/][)(}{></;
493 $rev = $self->_expand_nuc($rev);
494 # print "\nExpanded: $rev\n";
497 %Processed_braces = ();
498 %Processed_asterics = ();
500 my $fixrev = _fixpat_1
($rev);
501 # print "FIX 1: $fixrev";<STDIN>;
503 $fixrev = _fixpat_2
($fixrev);
504 # print "FIX 2: $fixrev";<STDIN>;
506 $fixrev = _fixpat_3
($fixrev);
507 # print "FIX 3: $fixrev";<STDIN>;
509 $fixrev = _fixpat_4
($fixrev);
510 # print "FIX 4: $fixrev";<STDIN>;
512 $fixrev = _fixpat_5
($fixrev);
513 # print "FIX 5: $fixrev";<STDIN>;
515 ##### Added by ps 8/7/00 to allow non-greedy matching
516 $fixrev = _fixpat_6
($fixrev);
517 # print "FIX 6: $fixrev";<STDIN>;
519 # $self->{'_rev'} = $fixrev;
521 return Bio
::Tools
::SeqPattern
->new(-seq
=>$fixrev, -type
=>$self->type);
526 Title : backtranslate
527 Usage : backtranslate();
528 Purpose : Produce a degenerate oligonucleotide whose translation would produce
529 : the original protein motif.
530 Example : $pattern_object->backtranslate();
531 Returns : Object reference for a new Bio::Tools::SeqPattern containing
532 : the reverse translation of the current pattern as its sequence.
533 Throws : Exception if called for nucleotide sequence pattern.
540 # _load_module loads dynamically, caches call if successful
541 $self->_load_module('Bio::Tools::SeqPattern::Backtranslate');
542 Bio
::Tools
::SeqPattern
::Backtranslate
->import("_reverse_translate_motif");
544 if ($self->type ne 'Amino') {
546 "Can't get backtranslate for ${\$self->type} sequence types.\n"
550 return __PACKAGE__
->new(
551 -SEQ
=> _reverse_translate_motif
($self->str),
559 Usage : n/a; called automatically by revcom()
560 Purpose : Utility method for revcom()
561 : Converts all {7,5} --> {5,7} (Part I)
562 : and [T^] --> [^T] (Part II)
563 : and *N --> N* (Part III)
564 Returns : String (the new, partially reversed pattern)
565 Argument : String (the expanded pattern)
568 See Also : L<revcom>()
580 $pat =~ /(.*)\{(\S+?)\}(.*)/ or do{ push @done, $pat; last; };
581 $pat = $1.'#{'.reverse($2).'}'.$3;
582 # print "1: $1\n2: $2\n3: $3\n";
583 # print "modified pat: $pat";<STDIN>;
584 @parts = split '#', $pat;
585 push @done, $parts[1];
587 # print "done: $parts[1]<---\nnew pat: $pat<---";<STDIN>;
590 $pat = join('', reverse @done);
595 $pat =~ /(.*)\[(\S+?)\](.*)/ or do{ push @done, $pat; last; };
596 $pat = $1.'#['.reverse($2).']'.$3;
597 # print "1: $1\n2: $2\n3: $3\n";
598 # print "modified pat: $pat";<STDIN>;
599 @parts = split '#', $pat;
600 push @done, $parts[1];
602 # print "done: $parts[1]<---\nnew pat: $pat<---";<STDIN>;
605 $pat = join('', reverse @done);
610 $pat =~ /(.*)\*([\w.])(.*)/ or do{ push @done, $pat; last; };
611 $pat = $1.'#'.$2.'*'.$3;
612 $Processed_asterics{$2}++;
613 # print "1: $1\n2: $2\n3: $3\n";
614 # print "modified pat: $pat";<STDIN>;
615 @parts = split '#', $pat;
616 push @done, $parts[1];
618 # print "done: $parts[1]<---\nnew pat: $pat<---";<STDIN>;
621 return join('', reverse @done);
629 Usage : n/a; called automatically by revcom()
630 Purpose : Utility method for revcom()
631 : Converts all {5,7}Y ---> Y{5,7}
632 : and {10,}. ---> .{10,}
633 Returns : String (the new, partially reversed pattern)
634 Argument : String (the expanded, partially reversed pattern)
637 See Also : L<revcom>()
647 my (@done,@parts,$braces);
649 # $pat =~ s/(.*)([^])])(\{\S+?\})([\w.])(.*)/$1$2#$4$3$5/ or do{ push @done, $pat; last; };
650 $pat =~ s/(.*)(\{\S+?\})([\w.])(.*)/$1#$3$2$4/ or do{ push @done, $pat; last; };
652 $braces =~ s/[{}]//g;
653 $Processed_braces{"$3$braces"}++;
654 # print "modified pat: $pat";<STDIN>;
655 @parts = split '#', $pat;
656 push @done, $parts[1];
658 # print "done: $parts[1]<---\nnew pat: $pat<---";<STDIN>;
661 return join('', reverse @done);
668 Usage : n/a; called automatically by revcom()
669 Purpose : Utility method for revcom()
670 : Converts all {5,7}(XXX) ---> (XXX){5,7}
671 Returns : String (the new, partially reversed pattern)
672 Argument : String (the expanded, partially reversed pattern)
675 See Also : L<revcom>()
684 my (@done,@parts,$braces,$newpat,$oldpat);
686 # $pat =~ s/(.+)(\{\S+\})(\(\w+\))(.*)/$1#$3$2$4/ or do{ push @done, $pat; last; };
687 if( $pat =~ /(.*)(.)(\{\S+\})(\(\w+\))(.*)/) {
688 $newpat = "$1#$2$4$3$5";
689 ##ps $oldpat = "$1#$2$3$4$5";
690 # print "1: $1\n2: $2\n3: $3\n4: $4\n5: $5\n";
692 ##ps $braces =~ s/[{}]//g;
693 ##ps if( exists $Processed_braces{"$2$braces"} || exists $Processed_asterics{$2}) {
694 ##ps $pat = $oldpat; # Don't change it. Already processed.
695 # print "saved pat: $pat";<STDIN>;
697 # print "new pat: $newpat";<STDIN>;
698 $pat = $newpat; # Change it.
700 } elsif( $pat =~ /^(\{\S+\})(\(\w+\))(.*)/) {
703 push @done, $pat; last;
705 @parts = split '#', $pat;
706 push @done, $parts[1];
708 # print "done: $parts[1]<---\nnew pat: $pat<---";<STDIN>;
711 return join('', reverse @done);
718 Usage : n/a; called automatically by revcom()
719 Purpose : Utility method for revcom()
720 : Converts all {5,7}[XXX] ---> [XXX]{5,7}
721 Returns : String (the new, partially reversed pattern)
722 Argument : String (the expanded, partially reversed pattern)
725 See Also : L<revcom>()
734 my (@done,@parts,$braces,$newpat,$oldpat);
736 # $pat =~ s/(.*)(\{\S+\})(\[\w+\])(.*)/$1#$3$2$4/ or do{ push @done, $pat; last; };
737 # $pat =~ s/(.*)([^\w.])(\{\S+\})(\[\w+\])(.*)/$1$2#$4$3$5/ or do{ push @done, $pat; last; };
738 if( $pat =~ /(.*)(.)(\{\S+\})(\[\w+\])(.*)/) {
739 $newpat = "$1#$2$4$3$5";
740 $oldpat = "$1#$2$3$4$5";
741 # print "1: $1\n2: $2\n3: $3\n4: $4\n5: $5\n";
743 $braces =~ s/[{}]//g;
744 if( (defined $braces and defined $2) and
745 exists $Processed_braces{"$2$braces"} || exists $Processed_asterics{$2}) {
746 $pat = $oldpat; # Don't change it. Already processed.
747 # print "saved pat: $pat";<STDIN>;
749 $pat = $newpat; # Change it.
750 # print "new pat: $pat";<STDIN>;
752 } elsif( $pat =~ /^(\{\S+\})(\[\w+\])(.*)/) {
755 push @done, $pat; last;
758 @parts = split '#', $pat;
759 push @done, $parts[1];
761 # print "done: $parts[1]<---\nnew pat: $pat<---";<STDIN>;
764 return join('', reverse @done);
771 Usage : n/a; called automatically by revcom()
772 Purpose : Utility method for revcom()
773 : Converts all *[XXX] ---> [XXX]*
774 : and *(XXX) ---> (XXX)*
775 Returns : String (the new, partially reversed pattern)
776 Argument : String (the expanded, partially reversed pattern)
779 See Also : L<revcom>()
788 my (@done,@parts,$newpat,$oldpat);
790 # $pat =~ s/(.*)(\{\S+\})(\[\w+\])(.*)/$1#$3$2$4/ or do{ push @done, $pat; last; };
791 # $pat =~ s/(.*)([^\w.])(\{\S+\})(\[\w+\])(.*)/$1$2#$4$3$5/ or do{ push @done, $pat; last; };
792 if( $pat =~ /(.*)(.)\*(\[\w+\]|\(\w+\))(.*)/) {
793 $newpat = "$1#$2$3*$4";
794 $oldpat = "$1#$2*$3$4";
795 # print "1: $1\n2: $2\n3: $3\n4: $4\n";
796 if( exists $Processed_asterics{$2}) {
797 $pat = $oldpat; # Don't change it. Already processed.
798 # print "saved pat: $pat";<STDIN>;
800 $pat = $newpat; # Change it.
801 # print "new pat: $pat";<STDIN>;
803 } elsif( $pat =~ /^\*(\[\w+\]|\(\w+\))(.*)/) {
806 push @done, $pat; last;
809 @parts = split '#', $pat;
810 push @done, $parts[1];
812 # print "done: $parts[1]<---\nnew pat: $pat<---";<STDIN>;
815 return join('', reverse @done);
822 ############################
824 # PS: Added 8/7/00 to allow non-greedy matching patterns
826 ######################################
831 Usage : n/a; called automatically by revcom()
832 Purpose : Utility method for revcom()
833 : Converts all ?Y{5,7} ---> Y{5,7}?
834 : and ?(XXX){5,7} ---> (XXX){5,7}?
835 : and ?[XYZ]{5,7} ---> [XYZ]{5,7}?
836 Returns : String (the new, partially reversed pattern)
837 Argument : String (the expanded, partially reversed pattern)
840 See Also : L<revcom>()
852 $pat =~ /(.*)\?(\[\w+\]|\(\w+\)|\w)(\{\S+?\})?(.*)/ or do{ push @done, $pat; last; };
853 my $quantifier = $3 ?
$3 : ""; # Shut up warning if no explicit quantifier
854 $pat = $1.'#'.$2.$quantifier.'?'.$4;
855 # $pat = $1.'#'.$2.$3.'?'.$4;
857 # print "1: $1\n2: $2\n3: $3\n";
858 # print "modified pat: $pat";<STDIN>;
859 @parts = split '#', $pat;
860 push @done, $parts[1];
862 # print "done: $parts[1]<---\nnew pat: $pat<---";<STDIN>;
865 return join('', reverse @done);
872 Usage : $obj->str($newval)
874 Returns : value of str
875 Args : newvalue (optional)
884 $obj->{'str'} = $value;
886 return $obj->{'str'};
893 Usage : $obj->type($newval)
895 Returns : value of type
896 Args : newvalue (optional)
905 $obj->{'type'} = $value;
907 return $obj->{'type'};
915 #########################################################################
917 #########################################################################
919 =head1 FOR DEVELOPERS ONLY
923 Information about the various data members of this module is provided
924 for those wishing to modify or understand the code. Two things to bear
929 =item 1 Do NOT rely on these in any code outside of this module.
931 All data members are prefixed with an underscore to signify that they
932 are private. Always use accessor methods. If the accessor doesn't
933 exist or is inadequate, create or modify an accessor (and let me know,
936 =item 2 This documentation may be incomplete and out of date.
938 It is easy for this documentation to become obsolete as this module is
939 still evolving. Always double check this info and search for members
944 An instance of Bio::Tools::RestrictionEnzyme.pm is a blessed reference
945 to a hash containing all or some of the following fields:
948 ------------------------------------------------------------------------
949 _rev : The corrected reverse complement of the fully expanded pattern.
951 INHERITED DATA MEMBERS:
953 _seq : (From Bio::Seq.pm) The original, unexpanded input sequence after untainting.
954 _type : (From Bio::Seq.pm) 'Dna' or 'Amino'