haploid_lowd Overview

The following lists all methods and attributes of haploid_lowd, grouped according to purpose and function. Member functions are shown with the prefix ‘’haploid_lowd.*’‘. If you have initialized for example as pop=haploid_lowd(L), the prefix in your program needs to be pop.*.

Note

Clicking on the name of the function will take you to a more detailed explanation listing all arguments.

Initialization

haploid_lowd.__init__ Construct a low-dimensional population with certain parameters.
haploid_lowd.copy Copy population into new instance.

Attributes

haploid_lowd.L Number of loci (read-only)
haploid_lowd.number_of_loci Number of loci (read-only)
haploid_lowd.N Population size (read-only)
haploid_lowd.population_size Population size (read-only)
haploid_lowd.generation Current generation (read-only)
haploid_lowd.carrying_capacity current carrying capacity of the environment
haploid_lowd.circular is the genome circular?
haploid_lowd.outcrossing_rate outcrossing rate (probability of sexual reproduction per generation)
haploid_lowd.recombination_model Model of recombination to use

Status

haploid_lowd.status Print a status list of the population parameters

Initialize the Population

haploid_lowd.set_wildtype Initialize population of N individuals with the - allele at all loci (wildtype)
haploid_lowd.set_allele_frequencies Initialize the population in linkage equilibrium with specified allele frequencies.
haploid_lowd.set_genotypes Initialize population with fixed counts for specific genotypes.

Set the fitness landscape

haploid_lowd.set_fitness_additive Set an additive fitness landscape.
haploid_lowd.set_fitness_function Set the fitness landscape for individual genotypes.
haploid_lowd.set_fitness_coefficients Set the fitness landscape in Fourier space for individual Fourier coefficients.

Mutation and Recombination

haploid_lowd.circular is the genome circular?
haploid_lowd.outcrossing_rate outcrossing rate (probability of sexual reproduction per generation)
haploid_lowd.recombination_model Model of recombination to use
haploid_lowd.set_recombination_rates Set the recombination rate(s).
haploid_lowd.get_recombination_rates Get recombination rates.
haploid_lowd.set_mutation_rates Set the mutation rate(s).
haploid_lowd.get_mutation_rates Get one or several mutation rates.

Evolution

haploid_lowd.evolve Evolve for some generations
haploid_lowd.evolve_deterministic Evolve for some generations deterministically (skips the resampling)
haploid_lowd.evolve_norec Evolve for some generations without recombination

Random Sampling

haploid_lowd.random_genomes Get random genomes according sampled from the population.

Get allele/genotype frequencies

haploid_lowd.get_allele_frequency Get the frequency of the + allele
haploid_lowd.get_allele_frequencies Get the frequencies of all + alleles
haploid_lowd.get_genotype_frequency Get the frequency of a genotype
haploid_lowd.get_genotype_frequencies Get the frequency of each genotype.
haploid_lowd.get_pair_frequency Get the frequency of genotypes with the + allele at both loci.
haploid_lowd.get_chi Get chi of an allele in the -/+ basis
haploid_lowd.get_chi2 Get \(\chi_{ij}\)
haploid_lowd.get_LD Get linkage disequilibrium
haploid_lowd.get_moment Get moment of two alleles in the -/+ basis
haploid_lowd.allele_entropy get the allele entropy of the population
haploid_lowd.genotype_entropy Get the genotype entropy of the population ..

Analyze the fitness distribution

haploid_lowd.get_fitness Get fitness values of a genotype
haploid_lowd.get_fitnesses Get the fitness of all possible genotypes.
haploid_lowd.get_fitness_statistics haploid_lowd_get_fitness_statistics(haploid_lowd self) -> stat
haploid_lowd.get_fitness_histogram Get the histogram of the fitness of a sample from the population.
haploid_lowd.plot_fitness_histogram Plot the histogram of the fitness of a sample from the population.

Divergence and Diversity

haploid_lowd.get_divergence_statistics Get the mean and variance of the divergence of a population sample – same as mean and variance of allele frequencies.
haploid_lowd.get_diversity_statistics Get the mean and variance of the diversity of a population sample
haploid_lowd.get_divergence_histogram Get the histogram of the divergence of a population sample.
haploid_lowd.get_diversity_histogram Get the histogram of the diversity in a sample from the population.
haploid_lowd.plot_divergence_histogram Plot the histogram of the divergence of a population sample.
haploid_lowd.plot_diversity_histogram Plot the histogram of the diversity of a population sample.