Bio-Community
view release on metacpan or search on metacpan
bin/bc_rarefy view on Meta::CPAN
=item -ss <sample_size> | -sample_size <sample_size>
Number of members to randomly take at each bootstrap iteration. If omitted, the
sample size defaults to the size (member count) of the smallest community.
=for Euclid:
sample_size.type: +integer
=item -dt <dist_threshold> | -dist_threshold <dist_threshold>
Keep doing bootstrap iterations until the distance between the current average
community and the average community at the previous iteration becomes less than
the specified threshold. Default: dist_threshold.default
=for Euclid:
dist_threshold.type: +num
dist_threshold.default: 1e-3
=item -nr <num_repetitions> | -num_repetitions <num_repetitions>
Perform the specified number of bootstrap iterations instead of a dynamic number
of iterations based on a distance threshold. As a special case, use 'inf' to
assume an infinite number of repetitions.
=for Euclid:
num_repetitions.type: string
=item -wa <write_average> | -write_average <write_average>
Write the average bootstraped communities (decimals) in addition to the rarefied
communities (integers): 1 is yes, 0 is no. Default: write_average.default
lib/Bio/Community/Tools/Rarefier.pm view on Meta::CPAN
Bio::Community::Tools::Rarefier - Normalize communities by count
=head1 SYNOPSIS
use Bio::Community::Tools::Rarefier;
# Normalize communities in a metacommunity by repeatedly taking 1,000 random members
my $rarefier = Bio::Community::Tools::Rarefier->new(
-metacommunity => $meta,
-sample_size => 1000,
-threshold => 0.001, # stop bootstrap iterations when threshold is reached
);
# Rarefied results, with decimal counts
my $average_community = $rarefier->get_avg_meta->next_community;
# Round counts to integer numbers
my $representative_community = $rarefier->get_repr_meta->next_community;
# Alternatively, specify a number of repetitions
my $rarefier = Bio::Community::Tools::Rarefier->new(
-metacommunity => $meta,
-sample_size => 1000,
-num_repetitions => 0.001, # stop after this number of bootstrap iterations
);
# ... or assume an infinite number of repetitions
my $rarefier = Bio::Community::Tools::Rarefier->new(
-metacommunity => $meta,
-sample_size => 1000,
-num_repetitions => 'inf',
);
=head1 DESCRIPTION
lib/Bio/Community/Tools/Rarefier.pm view on Meta::CPAN
Function: Get or set the seed used to pick the random members.
Args : Positive integer
Returns : Positive integer
=cut
=head2 verbose
Function: Get or set verbose mode. In verbose mode, the current number of
iterations (and beta diversity if a threshold is used) is displayed.
Usage : $rarefier->verbose(1);
Args : 0 (default) or 1
Returns : 0 or 1
=cut
has verbose => (
is => 'rw',
isa => 'Bool',
required => 0,
( run in 2.025 seconds using v1.01-cache-2.11-cpan-96521ef73a4 )