Expand description
Rust library for forward time population genetic simulation with tree sequence recording.
§Overview
This package is a port of many ideas from fwdpp from C++ to rust.
Currently, this should be viewed as experimental.
§Differences from tskit
The tables model differs from tskit
in some important ways:
- Time moves from the past to the present. Thus, child nodes have time values greater than those of their parents.
- The data layout is “array of structures” while
tskit
is a “structure of arrays”. - Metadata is not part of the tables.
Often, what one thinks of as metadata is data
used during the simulation. Thus, it is not
part of a
TableCollection
and is something that would only be useful to write when transfering final results to atskit::TableCollection
. - Mutation table data are different. See
MutationRecord
. - Time is measured as an integer (see
Time
), as are genomic locations (seePosition
). Intskit
, both are Cdouble
, the equivalent off64
.
§Where to find examples
In the examples/
directory of the project repository.
Modules§
- nested_
forward_ list - Compact representation of multiple forward linked lists.
- tskit_
tools - Data interchange to
tskit
format usingtskit
.
Structs§
- Edge
- An Edge is a transmission event
- Mutation
Record - A MutationRecord is the minimal information needed about a mutation to track it on a tree sequence.
- Node
- A Node of a tree sequence
- Samples
Info - Information about samples used for table simpilfication.
- Segment
- A segment is a half-open
interval of
crate::Position
s associated with acrate::Node
. - Simplification
Buffers - Holds internal memory used by simplification machinery.
- Simplification
Flags - Boolean flags affecting simplification behavior.
- Simplification
Output - Useful information output by table simplification.
- Site
- A Site is the location and ancestral state of a tables::MutationRecord
- Table
Collection - A collection of node, edge, site, and mutation tables.
- Table
Sorting Flags - Modifies behavior of
TableCollection::sort_tables
- Table
Validation Flags - Modifies behavior of
TableCollection::validate
Enums§
- Forrustts
Error - Primary error type.
- Tables
Error - Error type related to
TableCollection
Statics§
Functions§
- simplify_
from_ edge_ buffer - Simplify a
TableCollection
from anEdgeBuffer
. - simplify_
tables - Simplify a
TableCollection
. - simplify_
tables_ without_ state - Simplify a
TableCollection
. - validate_
edge_ table - Perform a data integrity check on an
EdgeTable
. - version
- Get the forrustts version number.
Type Aliases§
- Edge
Buffer - Data type used for edge buffering.
Simplification of simulated data happens
via
crate::simplify_from_edge_buffer()
. - Edge
Table - An edge table
- IdType
- Integer type used to refer to Node objects.
- Mutation
Table - A Mutation table
- Node
Table - A node table
- Position
- Integer type used to refer to a genomic coordinate/position
- Site
Table - A site table
- Tables
Result - Result type for operations on tables
- Time
- Time is recorded as a discrete, signed integer.