Bio::T...nctions(3pm)
π Bio::Tools::RandomDistFunctions π
okay bestie, welcome to the perl side of the terminal π
this one lives in the perl manual pages (that's the 3pm energy, third section, module docs, iykyk) and it's genuinely so fun β it's a whole lil toolbox for making up random numbers that follow specific distributions. no cap.
β¨ NAME β¨
Bio::Tools::RandomDistFunctions β a whole set of routines that are lowkey perfect for generating random data across different distributions π²β¨
π¦ SYNOPSIS π¦
use Bio::Tools::RandomDistFunctions;
my $dist = Bio::Tools::RandomDistFunctions->new();
for my $v ( 1..1000 ) {
my $birth_dist = $dist->rand_birth_distribution($lambda);
# ... do something with the variable
}
literally make an object, loop a thousand times, pull a random variable out each time, do your thing with it. that's the whole vibe π«Ά
πΈ DESCRIPTION πΈ
most of this code is based on the C implementation of these routines over in Mike Sanderson's r8s package π§ if you wanna know more about his software, go look at http://loco.biosci.arizona.edu/r8s/ β that's the link, that's the source of the inspo.
π FEEDBACK π
π¬ Mailing Lists
user feedback is integral to the evolution of this and every other Bioperl module β like, the whole thing grows because y'all talk to us π«Ά send your comments and suggestions preferably to the Bioperl mailing list. your participation is much appreciated, fr fr.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π« Support
please direct your usage questions and support issues to the mailing list:
bioperl-l@bioperl.org
...rather than sliding into the module maintainer's DMs directly π so many experienced and responsive experts are on that list and they'll be able to look at your problem and address it quickly. and bestie, please include a thorough description of the problem, with code and data examples if at all possible β it's giving "help us help you" energy π
π Reporting Bugs
report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolutions β it's the whole point. bug reports can be submitted via the web at:
https://github.com/bioperl/bioperl-live/issues
π AUTHOR - Jason Stajich π
Email jason-at-bioperl.org π§
π CONTRIBUTORS π
big thank you to Mike Sanderson for the assistance in getting this implementation together π«Ά iconic behavior honestly.
β APPENDIX β
the rest of the documentation breaks down each of the object methods one by one, no skips, no skimming π internal methods are usually preceded with a _ (iykyk, that underscore is the "do not touch, this is private" signal π).
πΌ birth_distribution πΌ
- Title β
rand_birth_distribution - Usage β
my $randvar = $dist->rand_birth_distribution($lambda); - Function β returns a random number from a birth process waiting time with a fixed interval
1.0. times are measured from0=present,1=root. - Returns β floating point number
- Args β
$lambda(> 0) - References β this is based on code by Mike Sanders in
r8s. Ross, Stochastic Processes, p. 145 for the density.
π² rand_geometric_distribution π²
- Title β
rand_geometric_distribution - Usage β
my $randvar = $dist->rand_geometric_distribution($param); - Function β returns a random geometric variate distributed with parameter
$param, according to the c.d.f.1 - ( 1- param) ^ n - Returns β integer
- Args β
$param(0 > $param < 1)
heads up bestie, that's the arg range written exactly how the original says it β copy it as-is, don't go "fixing" it β¨
π rand_exponentional_distribution π
(yes, that spelling, keep it, it's the actual method name π )
- Title β
rand_exponentional_distribution - Usage β
my $var = $dist->rand_exponentional_distribution($param); - Function β returns a random exponential variate distributed with parameter
$param, according to c.d.f1 - e^(-param * x) - Returns β floating point number
- Args β
$param(> 0)
π rand_normal_distribution π
- Title β
rand_normal_distribution - Usage β
my $var = $dist->rand_normal_distribution() - Function β returns a random normal (gaussian) variate distributed
- Returns β floating point number
- Args β none
and that's the whole page, bestie, you ate it up π
this was the perl documentation, perl v5.32.1, dated 2021-08-15 β go forth and generate some beautifully distributed random numbers, periodt ππ¦
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms