-
Notifications
You must be signed in to change notification settings - Fork 8
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
fix: relative aggregation of samples for variants and lineages over time plots #382
Conversation
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.
Nice easy fix for the problem.
Could you please add a plot with only one sample (for one date) and another with several samples, distributed over several dates?
pangolin_calls["lineage_count"] < 10, "lineage" | ||
] = "other (< 10 occ.)" | ||
pangolin_calls["lineage_count"] < threshold, "lineage" | ||
] = "other (< low occ.)" |
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.
Please insert here the masking threshold number. It would make sense to cast it to an integer before.
threshold = len(calls) / 10 | ||
calls.loc[ | ||
calls["total occurrence"] < threshold, "alteration" | ||
] = "other (< low occ.)" |
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.
same here, see above
Ah and please fill out the Description, Related Issue and Checklist of this PR ;) |
Just a quick pointer to string formatting best practices: https://realpython.com/python-string-formatting/ :) |
Description
Changing the threshold for the appearance of lineages and variants in the plots from a static to a relative value, so that for a smaller number of samples the variants and lineages are plotted.Related Issue
#339Checklist
snakefmt workflow/
andblack workflow/
if needed.CODE_OF_CONDUCT.md
document.CONTRIBUTING.md
guide.