Crate demes

Source
Expand description

rust support for demes.

§Introduction

This crate provides:

  • Support for reading YAML descriptions of demes models. See loads and load.
  • Support for building a demes model using rust code. See GraphBuilder.

The output of any of these operations is a fully-resolved Graph.

§More information

  • See here for an overview of demes.

§Technical details

§Features

The following cargo features are available:

  • json: enables reading/writing a Graph in JSON format.

Modules§

ffi
Define a foreign function interface (FFI) for this crate.

Structs§

AsymmetricMigration
An asymmetric migration epoch.
CloningRate
The cloning rate of an Epoch.
Deme
A resolved deme.
DemeDefaults
Deme-level defaults
DemeSize
The size of a Deme at a given Time.
Epoch
A resolved epoch
GenerationTime
Generation time.
Graph
A resolved demes Graph.
GraphBuilder
This type allows building a Graph using code rather then using text input.
GraphDefaults
Top-level defaults
InputCloningRate
Input value for CloningRate, used when loading or building graphs.
InputDemeSize
Input value for DemeSize, used when loading or building graphs.
InputGenerationTime
Input value for GenerationTime, used when loading or building graphs.
InputMigrationRate
Input value for MigrationRate, used when loading or building graphs.
InputProportion
Input value for Proportion, used when loading or building graphs.
InputSelfingRate
Input value for SelfingRate, used when loading or building graphs.
InputTime
Input value for Time, used when loading or building graphs.
Metadata
Top-level metadata
MigrationRate
A migration rate.
Proportion
An ancestry proportion.
Pulse
A resolved Pulse event
SelfingRate
The selfing rate of an Epoch.
Time
Store time values.
TimeInterval
A half-open time interval [present, past).
TopLevelDemeDefaults
Top-level defaults for a Deme.
UnresolvedDemeHistory
HDM data for a Deme
UnresolvedEpoch
HDM representation of an epoch.
UnresolvedMigration
An unresolved migration epoch.
UnresolvedPulse
An unresolved Pulse event.

Enums§

BuilderError
Error type raised by GraphBuilder
DemeId
A deme can be identified as an index or as a name
DemesError
Error type for this crate.
SizeFunction
Specify how deme sizes change during an Epoch.
TimeUnits
The time units of a graph

Functions§

load
Build a Graph from a type implementing std::io::Read.
load_jsonjson
Load a Graph from a JSON reader.
loads
Build a Graph from an in-memory str.
loads_jsonjson
Generate a Graph from a JSON string.
round_time_to_integer_generations
Convert a time value into generations, rounding output to closest integer.
version
Return the package version given in the Cargo.toml file of this crate.