| 1 | package Bio::ProteaseI; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | { | ||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | $Bio::ProteaseI::VERSION = '1.112980'; | |||||||||||||||||||||||||||||||||||||||||
| 4 | } | ||||||||||||||||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||||||||||||||||
| 6 | # ABSTRACT: A role to build your customized Protease | ||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use Moose::Role; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | ▶ | use Carp 'croak'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | ▶ | use namespace::autoclean; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||
| 12 | 2 | requires '_cuts'; | |||||||||||||||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||||||||||||||||
| 14 | 14 | ▶ | sub cut { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cut: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 15 | 14 | my ( $self, $substrate, $pos ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||
| 17 | 14 | ▶ | croak "Incorrect substrate argument" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $substrate and _looks_like_string($substrate)
MC/DC100%2/2
defined $substrate and _looks_like_string($substrate)
defined $substrate
_looks_like_string($substrate)
Truth table100%3/3
A and B
A= defined $substrateB= _looks_like_string($substrate)
| |||||||||||||||||||||||||||||||||||||||||||
| 18 | unless ( defined $substrate and _looks_like_string($substrate) ); | ||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||
| 20 | 12 | ▶ | unless ( defined $pos and $pos > 0 and $pos <= length $substrate ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%6/6
defined $pos and $pos > 0 and $pos <= length $substrate
defined $pos and $pos > 0
MC/DC100%3/3
defined $pos and $pos > 0 and $pos <= length $substrate
defined $pos
$pos > 0
$pos <= length $substrate
Truth table100%4/4
A and B and C
A= defined $posB= $pos > 0C= $pos <= length $substrate
| |||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||
| 22 | 3 | croak "Incorrect position."; | |||||||||||||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||
| 25 | 9 | $substrate = uc $substrate; | |||||||||||||||||||||||||||||||||||||||||
| 26 | 9 | $substrate = _cap_head($substrate); | |||||||||||||||||||||||||||||||||||||||||
| 27 | 9 | $pos += 3; | |||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||
| 29 | 9 | my $pep = substr($substrate, $pos - 4, 8); | |||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | 9 | ▶ | if ( $self->_cuts($pep) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 32 | 2 | my $product = substr($substrate, 0, $pos); | |||||||||||||||||||||||||||||||||||||||||
| 33 | 2 | substr($substrate, 0, $pos) = ''; | |||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||
| 35 | 2 | _uncap($product, $substrate); | |||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||
| 37 | 2 | return ($product, $substrate); | |||||||||||||||||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||||||||||
| 40 | 7 | else { return } | |||||||||||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||
| 43 | 3 | ▶ | sub digest { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
digest: called CC=5 SCAR=16.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 44 | 3 | my ( $self, $substrate ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||
| 46 | 3 | ▶ | croak "Incorrect substrate argument" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $substrate and _looks_like_string($substrate)
MC/DC100%2/2
defined $substrate and _looks_like_string($substrate)
defined $substrate
_looks_like_string($substrate)
Truth table100%3/3
A and B
A= defined $substrateB= _looks_like_string($substrate)
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | unless ( defined $substrate and _looks_like_string($substrate) ); | ||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||
| 49 | # Get the positions where the enzyme cuts | ||||||||||||||||||||||||||||||||||||||||||
| 50 | 1 | ▶ | my @sites = $self->cleavage_sites($substrate) or return $substrate; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||
| 52 | # Get the peptide products; | ||||||||||||||||||||||||||||||||||||||||||
| 53 | 1 | my @products; | |||||||||||||||||||||||||||||||||||||||||
| 54 | 1 | my $start = 0; | |||||||||||||||||||||||||||||||||||||||||
| 55 | 1 | ▶ | while ( my $site = shift @sites ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 56 | 1 | my $length = $site - $start; | |||||||||||||||||||||||||||||||||||||||||
| 57 | 1 | my $product = substr($substrate, $start, $length); | |||||||||||||||||||||||||||||||||||||||||
| 58 | 1 | push @products, $product; | |||||||||||||||||||||||||||||||||||||||||
| 59 | 1 | $start += $length; | |||||||||||||||||||||||||||||||||||||||||
| 60 | } | ||||||||||||||||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||||||||||||||||
| 62 | # Last peptide: cut from last position to the end. | ||||||||||||||||||||||||||||||||||||||||||
| 63 | 1 | push @products, substr($substrate, $start); | |||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||
| 65 | 1 | return @products; | |||||||||||||||||||||||||||||||||||||||||
| 66 | } | ||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||
| 68 | 3 | ▶ | sub is_substrate { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
is_substrate: called CC=5 SCAR=16.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 69 | 3 | my ($self, $substrate) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||
| 71 | 3 | ▶ | croak "Incorrect substrate argument" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $substrate and _looks_like_string($substrate)
MC/DC100%2/2
defined $substrate and _looks_like_string($substrate)
defined $substrate
_looks_like_string($substrate)
Truth table100%3/3
A and B
A= defined $substrateB= _looks_like_string($substrate)
| |||||||||||||||||||||||||||||||||||||||||||
| 72 | unless ( defined $substrate and _looks_like_string($substrate) ); | ||||||||||||||||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||||||||||||||||
| 74 | 1 | for my $pos (1 .. length $substrate) { | |||||||||||||||||||||||||||||||||||||||||
| 75 | 8 | ▶ | return 1 if $self->cut($substrate, $pos); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||
| 81 | 53 | ▶ | around _cuts => sub { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||||||||||
| 83 | 53 | my ($orig, $self, $substrate) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||||||||||||||||||
| 85 | 53 | ▶ | $substrate = _cap_tail($substrate) or return; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||
| 87 | 45 | $self->$orig($substrate); | |||||||||||||||||||||||||||||||||||||||||
| 88 | 2 | }; | |||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||
| 90 | 53 | ▶ | sub _cap_tail { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_cap_tail: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||
| 91 | 53 | my $substrate = shift; | |||||||||||||||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||||||||||||||||
| 93 | 53 | my $length = length $substrate; | |||||||||||||||||||||||||||||||||||||||||
| 94 | 53 | ▶ | if ( $length < 8 ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 95 | 14 | ▶ | if ( $length > 4 ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 96 | 6 | $substrate .= 'X' x (8 - $length); | |||||||||||||||||||||||||||||||||||||||||
| 97 | } | ||||||||||||||||||||||||||||||||||||||||||
| 98 | 8 | else { return } | |||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||
| 101 | 45 | return $substrate; | |||||||||||||||||||||||||||||||||||||||||
| 102 | } | ||||||||||||||||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||||||||||||||||
| 104 | 11 | ▶ | sub _cap_head { return 'XXX' . shift } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_cap_head: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||
| 106 | 2 | ▶ | sub _uncap { s/X//g for @_ } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_uncap: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||||
| 108 | 20 | ▶ | sub _looks_like_string { $_[0] ~~ /[a-z]+/i } | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_looks_like_string: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||||||||||||||||
| 110 | 4 | ▶ | sub cleavage_sites { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
cleavage_sites: called CC=5 SCAR=16.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 111 | 4 | my ( $self, $substrate ) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||
| 113 | 4 | ▶ | croak "Incorrect substrate argument" | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
defined $substrate and _looks_like_string($substrate)
MC/DC100%2/2
defined $substrate and _looks_like_string($substrate)
defined $substrate
_looks_like_string($substrate)
Truth table100%3/3
A and B
A= defined $substrateB= _looks_like_string($substrate)
| |||||||||||||||||||||||||||||||||||||||||||
| 114 | unless ( defined $substrate and _looks_like_string($substrate) ); | ||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||
| 116 | 2 | $substrate = uc $substrate; | |||||||||||||||||||||||||||||||||||||||||
| 117 | 2 | my @sites; | |||||||||||||||||||||||||||||||||||||||||
| 118 | 2 | my $i = 1; | |||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | 2 | $substrate = _cap_head($substrate); | |||||||||||||||||||||||||||||||||||||||||
| 121 | 2 | ▶ | while ( my $pep = substr($substrate, $i-1, 8 ) ) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 122 | 44 | ▶ | if ( $self->_cuts( $pep ) ) { push @sites, $i }; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 123 | 44 | ++$i; | |||||||||||||||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||||||||||||||||
| 125 | 2 | return @sites; | |||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||
| 128 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 129 | |||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||
| 131 | |||||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||
| 134 | |||||||||||||||||||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||
| 137 | __END__ | ||||||||||||||||||||||||||||||||||||||||||