NAME

Bio::Palantir::Explorer::ClusterFasta - Explorer internal class for handling ClusterFasta objects

VERSION

version 0.211420

SYNOPSIS

# TODO

DESCRIPTION

# TODO

ATTRIBUTES

genes

ArrayRef of Bio::Palantir::Explorer::GeneFasta

METHODS

count_genes

Returns the number of Genes of the Cluster.

# $cluster is a Bio::Palantir::Explorer::ClusterFasta
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::Explorer::ClusterFasta
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::Explorer::ClusterFasta
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::Explorer::ClusterFasta
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.