Module nimna_model

Module nimna_model

Settings

This module implements facilities to set a Compound's folding parameters. To that end, it provides the settings macro, which allows to declaratively set any folding parameters desired.

Example usage

Here, we apply settings to a Compound, setting the temperature to 37 °C and forbidding G --- U base pairs.

let
  opts = settings(
    temperature = 37.0, # Set the temperature.
    noGU = 1 # Forbid G --- U base pairs.
  )
 rnaOfInterest = compound"... the sequence ...".update(opts)

Procs

proc toParams(s: Settings): Parameters {.
raises: [], tags: []
.}
Convert Settings to Parameters
proc toScaledParams(s: Settings): ScaledParameters {.
raises: [], tags: []
.}
Converts Settings to ScaledParameters for partition function folding.
proc update(c: Compound; p: Parameters): Compound {.
discardable, raises: [], tags: []
.}
Updates Parameters of a Compound. Returns the Compound for further processing.
proc update(c: Compound; p: ScaledParameters): Compound {.
discardable, raises: [], tags: []
.}
Updates ScaledParameters of a Compound. Returns the Compound for further processing.
proc update(c: Compound; s: Settings): Compound {.
inline, discardable, raises: [], tags: []
.}
Updates Parameters and ScaledParameters of a Compound from Settings. Returns the Compound for further processing.

Macros

macro settings(xs: varargs[untyped]): Settings

Creates Settings from a set of directives. e.g.:

temperature = 20.0