Help for this page

Select Code to Download


  1. or download this
    subtype 'DNAString'
      => as Str
      => where { $_ && $_=~/^[AGCTN]+$/i}
      => message {"Not a DNA string: only AGCT or N allowed and cannot be 
    +empty"};
    
  2. or download this
    use MyApp::MooseX::MyTypes:
    has sequence => (
      isa      => 'DNAString',
    );
    
  3. or download this
    coerce 'DNAString'
      => from duck_type( ['seq'] )
      => via { $_->seq };
    
  4. or download this
    use MyApp::MooseX::MyTypes:
    has sequence => (
      isa      => 'DNAString',
      coerce   => 1, 
    );