cc.journeyman.simulated-genetics.genome

lightweight simulation of a genome.

create-genome

(create-genome)(create-genome father mother)

Create a new genome; if father and mother are passed, the result will comprise bits taken randomly from those genomes.

ethnically-biased-feature-index

macro

(ethnically-biased-feature-index genome start end)

Some feature values are associated with particular ethnicities.

expand-genome

(expand-genome genome)

TODO: write docs

extract-bits

(extract-bits g start end)

Extract, as an integer left-shifted by start, those bits from g indexed from start (inclusive) to end (exclusive).

gender-bit

The bit that encodes for gender

genome-mask

A mask which selects just the bits we’re interested in from a long.

male?

(male? genome)

true if this genome is male.

rand-genome

macro

(rand-genome)

Create a random genome.