NAME

Bio::Palantir::Refiner::ClusterPlus - Refiner internal class for handling ClusterPlus objects

VERSION

version 0.192560

SYNOPSIS

# TODO

DESCRIPTION

# TODO

ATTRIBUTES

genes

ArrayRef of Bio::Palantir::Refiner::Gene

METHODS

count_genes

Returns the number of Genes of the Cluster.

# $cluster is a Bio::Palantir::Refiner::Cluster
my $count = $cluster->count_genes;

This method does not accept any arguments.

all_genes

Returns all the Genes of the Cluster (not an array reference).

# $cluster is a Bio::Palantir::Refiner::Cluster
my @genes = $cluster->all_genes;

This method does not accept any arguments.

get_gene

Returns one Gene of the Cluster by its index. You can also use negative index numbers, just as with Perl's core array handling. If the specified Gene does not exist, this method will return undef.

# $cluster is a Bio::Palantir::Refiner::Cluster
my $gene = $cluster->get_gene($index);
croak "Gene $index not found!" unless defined $gene;

This method accepts just one argument (and not an array slice).

next_gene

Shifts the first Gene of the array off and returns it, shortening the array by 1 and moving everything down. If there are no more Genes in the array, returns undef.

# $cluster is a Bio::Palantir::Refiner::Cluster
while (my $gene = $cluster->next_gene) {
    # process $gene
    # ...
}

This method does not accept any arguments.

AUTHOR

Loic MEUNIER <lmeunier@uliege.be>

COPYRIGHT AND LICENSE

This software is copyright (c) 2019 by University of Liege / Unit of Eukaryotic Phylogenomics / Loic MEUNIER and Denis BAURAIN.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.