| 1 | #Copyright (c) 2010 Joachim Bargsten <code at bargsten dot org>. All rights reserved. | ||
| 2 | |||
| 3 | package Bio::Gonzales::Tools::SeqStats; | ||
| 4 | |||
| 5 | use warnings; | ||
| 6 | use strict; | ||
| 7 | use Carp; | ||
| 8 | |||
| 9 | use Mouse; | ||
| 10 | |||
| 11 | use Bio::Gonzales::Util::Text qw/character_count/; | ||
| 12 | use MouseX::Foreign 'Bio::Root::Root'; | ||
| 13 | |||
| 14 | with 'Bio::Gonzales::Role::BioPerl::Constructor'; | ||
| 15 | |||
| 16 | use 5.010; | ||
| 17 | our $VERSION = '0.062'; # VERSION | ||
| 18 | |||
| 19 | has seq => ( is => 'rw' ); | ||
| 20 | |||
| 21 | sub count_residues { | ||
| 22 | my ($self) = @_; | ||
| 23 | |||
| 24 | return character_count($self->seq->seq); | ||
| 25 | } | ||
| 26 | |||
| 27 | 1; | ||
| 28 |