Bio-Protease

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN


use strict;
use warnings;

use Module::Build 0.3601;


my %module_build_args = (
  "build_requires" => {
    "Cache::Ref::Null" => 0,
    "Modern::Perl" => 0,
    "Module::Build" => "0.3601",
    "Test::Exception" => 0,
    "Test::More" => 0,
    "Time::HiRes" => 0,
    "YAML::Any" => 0,
    "autodie" => 0
  },
  "configure_requires" => {
    "Module::Build" => "0.3601"
  },

META.json  view on Meta::CPAN

            "Moose::Role" : 0,
            "MooseX::ClassAttribute" : 0,
            "MooseX::Types" : 0,
            "MooseX::Types::Moose" : 0,
            "namespace::autoclean" : 0
         }
      },
      "test" : {
         "requires" : {
            "Cache::Ref::Null" : 0,
            "Modern::Perl" : 0,
            "Test::Exception" : 0,
            "Test::More" : 0,
            "Time::HiRes" : 0,
            "YAML::Any" : 0,
            "autodie" : 0
         }
      }
   },
   "release_status" : "stable",
   "resources" : {

lib/Bio/ProteaseI.pm  view on Meta::CPAN


        if ( $substrate eq 'MAELVIKP' ) { return 1 }
        else                            { return   }
    };

    1;

Then you can use your class easily in your application:

    #!/usr/bin/env perl
    use Modern::Perl;

    use My::Ridiculously::Specific::Protease;

    my $protease = My::Ridiculously::Specific::Protease->new;
    my @products = $protease->digest( 'AAAAMAELVIKPYYYYYYY' );

    say for @products; # ["AAAAMAEL", "VIKPYYYYYYY"]

Of course, this specificity model is too simple to deserve a new class,
as it could be perfectly defined by a regex and passed to the

t/00-load.t  view on Meta::CPAN

use Test::More;
use Modern::Perl;

BEGIN { use_ok( 'Bio::Protease' ); }

diag( "Testing Bio::Protease $Bio::Protease::VERSION, Perl $], $^X" );

done_testing();

t/basic.t  view on Meta::CPAN

use Modern::Perl;
use Test::More;
use Test::Exception;

use_ok( 'Bio::Protease' );

my $enzyme;

lives_ok { $enzyme = Bio::Protease->new(specificity => 'trypsin') };

is $enzyme->specificity, 'trypsin';

t/cache.t  view on Meta::CPAN

use Modern::Perl;
use Test::More;
use Test::Exception;
use Time::HiRes 'time';

use_ok( 'Bio::Protease' );

my $p = Bio::Protease->new( specificity => 'trypsin', use_cache => 0 );
$p->digest( 'A' );

ok( !$p->_has_cache, "No cache when use_cache is off" );

t/proteasei.t  view on Meta::CPAN

use Test::More;
use Modern::Perl;
use Test::Exception;

{
    package My::Protease;
    use Moose;
    with qw(Bio::ProteaseI);

    sub _cuts {
        my ( $self, $substrate ) = @_;

t/specificities.t  view on Meta::CPAN

use Modern::Perl;

use Test::More;
use Test::Exception;
use YAML::Any;
use autodie;

use_ok( 'Bio::Protease' );

my $test_seq = <<EOL
mattsfpsmlfyfcifllfhgsmaqlfgqsstpwqssrqgglrgcrfdrlqafeplrqvr

t/specificity-regex.t  view on Meta::CPAN

use Modern::Perl;
use Test::Exception;
use Test::More;

{
    package My::Protease;
    use Moose;

    with qw(Bio::ProteaseI Bio::Protease::Role::Specificity::Regex);

    has '+regex' => ( init_arg => 'specificity' );

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 7.793 seconds using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )