@@ -20,12 +20,12 @@ namespace fwdpp
20
20
const std::vector<TS_NODE_INT>& samples,
21
21
const mcont_t & mutations,
22
22
const bool record_neutral,
23
- const bool record_selected, const double start ,
24
- const double stop)
23
+ const bool record_selected, const bool skip_fixed ,
24
+ const double start, const double stop)
25
25
// / \todo Document
26
26
// / \version 0.7.0 Added to library
27
27
// / \version 0.7.1 Change behavior to skip sites fixed in the sample
28
- // / \version 0.7.4 Add [start, stop) arguments
28
+ // / \version 0.7.4 Add [start, stop) arguments. Add option to skip fixed variants.
29
29
{
30
30
if (!(stop > start))
31
31
{
@@ -61,7 +61,9 @@ namespace fwdpp
61
61
auto tc = tree.leaf_counts [mut->node ]
62
62
+ tree.preserved_leaf_counts
63
63
[mut->node ];
64
- if (tc < tree.sample_size )
64
+ if (!skip_fixed
65
+ || (skip_fixed
66
+ && tc < tree.sample_size ))
65
67
{
66
68
// Mutation leads to a polymorphism
67
69
bool is_neutral
@@ -109,11 +111,11 @@ namespace fwdpp
109
111
const std::vector<TS_NODE_INT>& samples,
110
112
const mcont_t & mutations,
111
113
const bool record_neutral,
112
- const bool record_selected)
114
+ const bool record_selected, const bool skip_fixed )
113
115
{
114
- return generate_data_matrix (tables, samples, mutations,
115
- record_neutral, record_selected, 0 . ,
116
- tables.genome_length ());
116
+ return generate_data_matrix (
117
+ tables, samples, mutations, record_neutral, record_selected,
118
+ skip_fixed, 0 ., tables.genome_length ());
117
119
}
118
120
119
121
} // namespace ts
0 commit comments