package Bio::Protease::Role::Specificity::Regex; {
$Bio::Protease::Role::Specificity::Regex::VERSION = '1.112980';
} # ABSTRACT: A role that implements a regex-based specificity
use Moose::Role; use Bio::Protease::Types 'ProteaseRegex'; has
regex => ( is => 'ro', isa => ProteaseRegex, coerce => 1, ); sub
_cuts { my ($self, $peptide) = @_; if ( grep { $peptide !~ /$_/
} @{$self->regex} ) { return; } return 'yes, it cuts'; } 1;
__END__ =pod =head1 NAME Bio::Protease::Role::Specificity::Regex
- A role that implements a regex-based specificity =head1
VERSION version 1.112980 =head1 SYNOPSIS package My::Protease;
use Moose; with qw(Bio::ProteaseI
Bio::Protease::Role::Specificity::Regex); package main; my $p =
My::Protease->new( regex => qr/.{3}AC.{3}/ ); # coerces to [
qr/.../ ]; my @products = $p->digest( 'AAAACCCC' ); # @products:
('AAAA', 'CCCC') =head1 DESCRIPTION This role implements a
regexp-based specificity for a class that also consumes the L
role. A peptide will be cleaved if any of the regexes provided