-
Notifications
You must be signed in to change notification settings - Fork 24
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
Creating a file for the code shared by all _frequencies
functions
#690
base: master
Are you sure you want to change the base?
Conversation
The tests for the plotting functions are still only on SNP frequencies. Is that good enough? |
@alimanfoo, I might have found a solution that works for what I wanted to do (namely, import shared testing functions for plotting frequencies into the various |
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.
Hi @jonbrenas, thanks so much. A few comments...
tests/anoph/conftest.py
Outdated
transcript_ids = [ | ||
t.split(";")[0].split("=")[1] for t in df_transcripts.loc[:, "attributes"] | ||
] |
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 relies on the ID appearing first within the attributes. Is there a safer and more obvious way to get the IDs? E.g., via gff3_parse_attributes()
in util
module?
Thanks @jonbrenas. As suggested in the code review above, it might be even better to name these utility functions like "check_..." instead of "test_..." then no need for skipping. If the importing of functions between test modules seems to work then I guess we're OK! I still don't understand the mechanics of how pytest imports test modules. But if you've confirmed it works then no objection. |
Thanks @alimanfoo. This all makes a lot of sense. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #690 +/- ##
==========================================
+ Coverage 94.57% 94.96% +0.39%
==========================================
Files 40 45 +5
Lines 4187 4612 +425
==========================================
+ Hits 3960 4380 +420
- Misses 227 232 +5 ☔ View full report in Codecov by Sentry. |
Addresses #664 .
I moved the functions to enable the computation of frequencies and the plotting functions (which required to define a new
AnophelesFrequency
class). I still want to move the tests of the plotting functions to their own file instead oftest_snp_frq.py
.