Bio-Palantir

 view release on metacpan or  search on metacpan

lib/Bio/Palantir/Explorer/ClusterFasta.pm  view on Meta::CPAN

package Bio::Palantir::Explorer::ClusterFasta;
# ABSTRACT: Explorer internal class for handling ClusterFasta objects
$Bio::Palantir::Explorer::ClusterFasta::VERSION = '0.211420';
use Moose;
use namespace::autoclean;

use Data::UUID;

use Bio::MUST::Core;

use aliased 'Bio::MUST::Core::Ali';
use aliased 'Bio::Palantir::Explorer::GeneFasta';
extends 'Bio::FastParsers::Base';


# public attributes

has $_ => (
    is => 'ro',
    isa => 'Num',
    init_arg => undef,
    writer => '_set_' . $_,
) for qw(begin end size);

has 'coordinates' => (
    is => 'ro',
    isa => 'ArrayRef[Num]',
    init_arg => undef,
    writer => '_set_coordinates',
);

has 'uui' => (
    is       => 'ro',
    isa      => 'Str',
    init_arg => undef,
    default  => sub {
        my $self = shift;
        my $ug = Data::UUID->new;
        my $uui = $ug->create_str;    
        return $uui;
    }
);


# private attributes


# public array(s) of composed objects


has 'genes' => (
    traits   => ['Array'],
    is       => 'ro',
    isa      => 'ArrayRef[Bio::Palantir::Explorer::GeneFasta]',
    writer  => '_set_genes',
    init_arg => undef,
    handles  => {
         count_genes => 'count',
           all_genes => 'elements',
           get_gene  => 'get',
          next_gene  => 'shift',        
    },
);




( run in 1.430 second using v1.01-cache-2.11-cpan-99c4e6809bf )