| 1 | package Bio::Protease::Role::Specificity::Regex; | ||
| 2 | { | ||
| 3 | $Bio::Protease::Role::Specificity::Regex::VERSION = '1.112980'; | ||
| 4 | } | ||
| 5 | |||
| 6 | # ABSTRACT: A role that implements a regex-based specificity | ||
| 7 | |||
| 8 | 1 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 0 | ▶ | use Bio::Protease::Types 'ProteaseRegex'; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 10 | |||
| 11 | has regex => ( | ||
| 12 | is => 'ro', | ||
| 13 | isa => ProteaseRegex, | ||
| 14 | coerce => 1, | ||
| 15 | ); | ||
| 16 | |||
| 17 | sub _cuts { | ||
| 18 | my ($self, $peptide) = @_; | ||
| 19 | |||
| 20 | if ( grep { $peptide !~ /$_/ } @{$self->regex} ) { | ||
| 21 | return; | ||
| 22 | } | ||
| 23 | |||
| 24 | return 'yes, it cuts'; | ||
| 25 | } | ||
| 26 | |||
| 27 | |||
| 28 | 1; | ||
| 29 | |||
| 30 | __END__ | ||