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

Check for valid input in ARG likelihood #2114

Merged
merged 1 commit into from Oct 18, 2022

Conversation

JereKoskela
Copy link
Member

This outputs a readable error message when ARGs are requested for trees which aren't binary.

I haven't put in a check for unary nodes because those will legitimately appear on trees due to RE nodes.

Closes #2107

@codecov
Copy link

codecov bot commented Oct 15, 2022

Codecov Report

Merging #2114 (cc6025a) into main (360dfec) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2114   +/-   ##
=======================================
  Coverage   91.29%   91.29%           
=======================================
  Files          19       19           
  Lines       10852    10856    +4     
  Branches     2222     2224    +2     
=======================================
+ Hits         9907     9911    +4     
  Misses        516      516           
  Partials      429      429           
Flag Coverage Δ
C 91.29% <100.00%> (+<0.01%) ⬆️
python 98.73% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
msprime/likelihood.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

@jeromekelleher
Copy link
Member

Can you rebase once #2116 is merged please @JereKoskela?

@JereKoskela
Copy link
Member Author

Done @jeromekelleher

@jeromekelleher
Copy link
Member

Needs a test or two, can be something quite simple. Probably easiest to hand construct a few tree sequences that we'd like to reject.

@JereKoskela
Copy link
Member Author

I've added a test to cover the ValueError. It's only one, but any further tests seemed redundant since they'd just be more elaborate (and less human-readable) versions of the same scenario. Let me know if there's something else in particular we should be covering @jeromekelleher.

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

@mergify mergify bot merged commit 4e10f8b into tskit-dev:main Oct 18, 2022
@GertjanBisschop GertjanBisschop mentioned this pull request Dec 6, 2023
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.

segmentation fault when trying to run msprime.log_arg_likelihood()
2 participants