Plumbing

GeneRegulatorySystems.Models.Plumbing.AdjustType
Adjust <: Instant{FlatState}

Instantly adjust counts.

Specification

Specified in JSON as one of

  • {"{set}": <adjustment>}, setting counts to constant values
  • {"{add}": <adjustment>}, adding constant values to counts
  • {"{multiply}": <adjustment>}, multiplying constant values with counts

where <adjustment> is a JSON object mapping species names to nonnegative adjustment values. Nested JSON objects will be flattened, joining keys on "." such that for example

{"{multiply}": {
    "a": {
        "proteins": 0.5,
        "mnras": 0.5
    }
}}

is equivalent to:

{"{multiply}": {
    "a.proteins": 0.5,
    "a.mnras": 0.5
}}

Invocation

(f!::Adjust)(x::FlatState, _Δt::Float64; _...)

Instantly apply flattened f!.adjustment to x.counts using f!.adjust.

Adjusted values will be rounded down to Ints (which is relevant if f!.adjust is *).

source
GeneRegulatorySystems.Models.Plumbing.FilterType
Filter <: Instant{FlatState}

Instantly remove all species counts that have names not matching a pattern.

Specification

Specified in JSON as {"{filter}": "<regex>"} where <regex> is any JSON string that represents a valid Julia regular expression (in PCRE2 syntax). \ characters must be escaped by \\. For example, \\.(pre)?mrnas$ will only retain species with names that end in either .premrnas or .mrnas.

Invocation

(f!::Filter)(x::FlatState, _Δt::Float64; _...)

Remove all mappings from x.counts whose key does not match f!.kinds.

source
GeneRegulatorySystems.Models.Plumbing.MergeType
Merge <: Instant{Branched}

Instantly collapse a Branched state to a FlatState by replacing the stem with aggregated counts from the branches.

Specification

Currently, only + is supported as aggregation. Specified in JSON as {"{merge}": "+"}.

Invocation

(f!::Merge)(x::Branched, _Δt::Float64; _...)

Use the function f!.merge to aggregate all of the x.branches and return a new FlatState with the aggregated counts, but retaining x.stem.t and x.stem.randomness.

source
GeneRegulatorySystems.Models.Plumbing.SeedType
Seed <: Instant{FlatState}

Instantly reseed the current randomness.

Specification

Specified in JSON as {"{seed}": <seed>} where <seed> is any JSON string.

Invocation

(f!::Seed)(x::FlatState, _Δt::Float64 = Inf; _...)

Reseed x.randomness but otherwise leave x unchanged.

source
GeneRegulatorySystems.Models.Plumbing.WaitType
Wait <: Model{FlatState}

Do nothing for a while.

Specification

Specified in JSON as {"{wait}": true}.

Invocation

(::Wait)(x, Δt::Float64; _...)

Advance simulation time by Δt but do not otherwise change state.

source