Expand description
rust support for demes.
§Introduction
This crate provides:
- Support for reading
YAMLdescriptions ofdemesmodels. Seeloadsandload. - Support for building a demes model using
rustcode. SeeGraphBuilder.
The output of any of these operations is a fully-resolved
Graph.
§More information
- See here for
an overview of
demes.
§Technical details
YAMLandGraphBuilderinputs support the Human Data Model (HDM) described in the demes specification- A
Graphis fully-resolved according to the Machine Data Model (MDM) described in the specification.
§Features
The following cargo features are available:
json: enables reading/writing aGraphin JSON format.
Modules§
- ffi
ffi - Define a foreign function interface (FFI) for this crate.
Structs§
- Asymmetric
Migration - An asymmetric migration epoch.
- Cloning
Rate - The cloning rate of an
Epoch. - Deme
- A resolved deme.
- Deme
Defaults - Deme-level defaults
- Deme
Size - The size of a
Demeat a givenTime. - Epoch
- A resolved epoch
- Generation
Time - Generation time.
- Graph
- A resolved demes Graph.
- Graph
Builder - This type allows building a
Graphusing code rather then using text input. - Graph
Defaults - Top-level defaults
- Input
Cloning Rate - Input value for
CloningRate, used when loading or building graphs. - Input
Deme Size - Input value for
DemeSize, used when loading or building graphs. - Input
Generation Time - Input value for
GenerationTime, used when loading or building graphs. - Input
Migration Rate - Input value for
MigrationRate, used when loading or building graphs. - Input
Proportion - Input value for
Proportion, used when loading or building graphs. - Input
Selfing Rate - Input value for
SelfingRate, used when loading or building graphs. - Input
Time - Input value for
Time, used when loading or building graphs. - Metadata
- Top-level metadata
- Migration
Rate - A migration rate.
- Proportion
- An ancestry proportion.
- Pulse
- A resolved Pulse event
- Selfing
Rate - The selfing rate of an
Epoch. - Time
- Store time values.
- Time
Interval - A half-open time interval
[present, past). - TopLevel
Deme Defaults - Top-level defaults for a
Deme. - Unresolved
Deme History - HDM data for a
Deme - Unresolved
Epoch - HDM representation of an epoch.
- Unresolved
Migration - An unresolved migration epoch.
- Unresolved
Pulse - An unresolved Pulse event.
Enums§
- Builder
Error - Error type raised by
GraphBuilder - DemeId
- A deme can be identified as an index or as a name
- Demes
Error - Error type for this crate.
- Size
Function - Specify how deme sizes change during an
Epoch. - Time
Units - The time units of a graph
Functions§
- load
- Build a
Graphfrom a type implementingstd::io::Read. - load_
json json - Load a
Graphfrom a JSON reader. - loads
- Build a
Graphfrom an in-memorystr. - loads_
json json - Generate a
Graphfrom 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.tomlfile of this crate.