-
Notifications
You must be signed in to change notification settings - Fork 79
Add isolated_as_missing to ts.alignements #3294
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3294 +/- ##
==========================================
+ Coverage 89.65% 89.78% +0.13%
==========================================
Files 29 29
Lines 30607 30964 +357
Branches 5614 5665 +51
==========================================
+ Hits 27441 27802 +361
+ Misses 1780 1779 -1
+ Partials 1386 1383 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely a big help, but we should clarify how this relates to #1896 and what's going on more generally.
| (default) alignments will continue until the end of the tree sequence. | ||
| :param bool isolated_as_missing: If True (default), isolated samples without | ||
| mutations are treated as missing data and this method raises an error | ||
| when any are detected. If False, missing data are imputed with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| when any are detected. If False, missing data are imputed with the | |
| when any are detected. If False, missing data is imputed with the |
python/CHANGELOG.rst
Outdated
|
|
||
| - ``TreeSequence.alignments`` now accepts ``isolated_as_missing=False`` so that | ||
| alignments can be emitted for non-sample nodes (e.g., internal ARG nodes) when | ||
| missing data are imputed to the ancestral state. (:user:`benjeffery`, :issue:`3293`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| missing data are imputed to the ancestral state. (:user:`benjeffery`, :issue:`3293`) | |
| missing data is imputed to the ancestral state. (:user:`benjeffery`, :issue:`3293`) |
| tree._has_isolated_samples() for tree in self.trees() | ||
| ): | ||
| raise ValueError( | ||
| "Missing data not currently supported in alignments; see " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update this to suggest using isolated_as_missing, but note some caveats?
c343634 to
c3dcdcf
Compare
|
I've updated to add more detail in the docs and error. |
|
Looks good. Can you change the "data are" to "data is" please? (This is a hill I will die on!) |
Fixes #3293
This seemed to be quite straight-forward? Maybe when we added
isolated_as_missingwe just didn't apply it toalignements?