Crate forrustts[−][src]
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 |
Structs
Edge | An Edge is a transmission event |
MutationRecord | A MutationRecord is the minimal information needed about a mutation to track it on a tree sequence. |
Node | A Node of a tree sequence |
SamplesInfo | Information about samples used for table simpilfication. |
Segment | A segment is a half-open
interval of |
SimplificationBuffers | Holds internal memory used by simplification machinery. |
SimplificationFlags | Boolean flags affecting simplification behavior. |
SimplificationOutput | Useful information output by table simplification. |
Site | A Site is the location and ancestral state of a tables::MutationRecord |
TableCollection | A collection of node, edge, site, and mutation tables. |
TableSortingFlags | Modifies behavior of
|
TableValidationFlags | Modifies behavior of
|
Enums
ForrusttsError | Primary error type. |
TablesError | Error type related to |
Statics
NULL_ID | Equals -1 (minus one). Primary use is to indicate a null Node id. |
Functions
simplify_from_edge_buffer | Simplify a |
simplify_tables | Simplify a |
simplify_tables_without_state | Simplify a |
validate_edge_table | Perform a data integrity check on an |
version | Get the forrustts version number. |
Type Definitions
EdgeBuffer | Data type used for edge buffering.
Simplification of simulated data happens
via |
EdgeTable | An edge table |
IdType | Integer type used to refer to Node objects. |
MutationTable | A Mutation table |
NodeTable | A node table |
Position | Integer type used to refer to a genomic coordinate/position |
SiteTable | A site table |
TablesResult | Result type for operations on tables |
Time | Time is recorded as a discrete, signed integer. |