Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional_nodes DTWF/FIXED_PEDIGREE #2176

Merged
merged 1 commit into from May 23, 2023

Conversation

GertjanBisschop
Copy link
Member

algorithms.py outline for tracking additional_nodes for DTWF and FIXED_PEDIGREE models.

@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Merging #2176 (51b4381) into main (5583e5b) will increase coverage by 7.22%.
The diff coverage is 100.00%.

❗ Current head 51b4381 differs from pull request most recent head 4cf4cf3. Consider uploading reports for the commit 4cf4cf3 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2176      +/-   ##
==========================================
+ Coverage   91.46%   98.68%   +7.22%     
==========================================
  Files          20       11       -9     
  Lines       11210     3950    -7260     
  Branches     2280      900    -1380     
==========================================
- Hits        10253     3898    -6355     
+ Misses        521       28     -493     
+ Partials      436       24     -412     
Flag Coverage Δ
C ?
python 98.68% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
msprime/__init__.py 100.00% <ø> (ø)
msprime/ancestry.py 98.66% <100.00%> (+0.02%) ⬆️

... and 9 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5583e5b...4cf4cf3. Read the comment docs.

algorithms.py Outdated
@@ -771,6 +771,12 @@ def flush_edges(self):
self.tables.edges.add_row(left, right, parent, child)
self.edge_buffer = []

def update_node_flag(self, node_id, flag):
self.flush_edges()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this flush_edges? Should probably be done in the other function we just added?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding flush_edges() to store_additional_nodes_edges() would flush the edges twice in some cases, as it is also called by store_node().

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see - should we call flush_edges to the non-store-node path in store_additional_nodes_edges then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a surprising side-effect to have here in update_node_flag

@GertjanBisschop GertjanBisschop marked this pull request as ready for review May 15, 2023 14:50
Copy link
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants