tiny-plot: legend sorted by natural order, other reliability improvements#286
Merged
taimontgomery merged 7 commits intomasterfrom Mar 3, 2023
Merged
tiny-plot: legend sorted by natural order, other reliability improvements#286taimontgomery merged 7 commits intomasterfrom
taimontgomery merged 7 commits intomasterfrom
Conversation
- Fixes an edge case that occurs when the outgroup has all zero counts in one or both conditions. Previously this would result in the outgroup having an entry in the legend without any points being plotted - Fixes an edge case that occurs when there is no outgroup, and the first group has all zero counts in one or both conditions. Previously this first plotted group wouldn't be handled as a zero count group, so it would have an entry in the legend without any points being plotted. - Properly creates an empty scatter plot when neither the outgroup nor the other groups can be plotted due to one or both conditions having all zero counts.
- Correct handling of empty plots, per recent changes to scatter_grouped() - Corrections to z-order calculation to prevent outgroup from sharing z-order with any other groups, and to prevent shared z-order between the lines and one of the groups. Fortunately the way mpl breaks z-order ties always worked out in our favor since the outgroup was plotted first - Doc string filled out
…tended order of point groups
…ilently skipped if inputs are empty (due to class filters, etc.)
For each worker exception: - The tracebacks are printed to stdout so that they end up in the logfile At the conclusion of plotting: - The replot instructions are printed only once - A summary of the exceptions organized by plot type is printed (no noisy tracebacks) - The user-friendly message + summary is printed to stderr so that users see it during pipeline runs Exception handling is also consistent regardless of sequential/multiprocessing or debug mode
Collaborator
|
Tested successfully with ram1 data. |
Member
Author
|
Exception handling in tiny-plot was also improved so that it is more useful during non-standalone runs. For each worker exception:
At the conclusion of plotting:
Exception handling is also consistent regardless of sequential/multiprocessing or debug mode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Scatter plot legends are now sorted by natural order while preserving the intended point layer order (groups with fewest points are plotted on top of the stack).
This PR also includes a number of reliability improvements:
Additionally, the
sorted_natural()function in tiny.rna.util now accepts akey=parameter just like Python'ssorted()doesCloses #285