DemesUtil
slice(g, t)
Slice a Demes graph at a given time, return the top portion with times shifted to the slice time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
DemeGraph
|
The input resolved Demes graph. |
required |
t
|
float
|
The time in the past at which to slice the graph. |
required |
Source code in dadi/Demes/DemesUtil.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
swipe(g, t)
Returns a new demes graph with demography about the given time removed. Demes that existed before that time are removed, and demes that overlap with that time are given a constant size equal to their size at that time extending into the past.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
DemeGraph
|
The input demes graph object. |
required |
t
|
float
|
The time at which to erase preceding demographic events. |
required |
Source code in dadi/Demes/DemesUtil.py
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |