-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added testing for disease predicates #151
Conversation
Hi @lnrekerle thanks for the code! I added a few improvements/fixes to the code. Regarding the questions.
I think we should let the user to provide a set of "specific diseases" - these are the diseases the user is interested to see. Let me call these query diseases. The query diseases act as a filter. If we have a cohort with 5 diseases and the user provides 2 query diseases, at most 2 query diseases will make it into results. If zero or (perhaps) just one of the query diseases is in fact represented in the cohort, the code should probably explode since this is likely a bug. Otherwise, we would either return an empty result or a result with correlation for one disease only, which IMO is not what the user wants to see. Besides supporting the query diseases, IMO many times the users will want to see all diseases of the cohort. We should make this easy. One way to do this is to write a function like this: class CohortAnalysis:
# bla bla bla
def compare_genotype_by_diseases(
self,
genotype_predicate: GenotypePolyPredicate,
disease_ids: typing.Optional[typing.Sequence[hpotk.TermId]] = None,
) -> GenotypePhenotypeAnalysisResult:
pass The function takes a genotype poly predicate, which can be (as you know) anything, and an optional sequence of disease IDs formatted as
This question is a little hard for me to understand, I'll try my best though. def compare_genotype_by_phenotype(
self,
genotype_predicate: GenotypePolyPredicate,
phenotype_predicate: PhenotypePolyPredicate,
) -> GenotypePhenotypeAnalysisResult:
pass This will become a central point of the entire analysis. All convenience functions that we currently have on This may seem like a huge change, but we actually +- have this in This sounds like a good subject for the next meeting. Please think about the requirements. Right now we |
closes #137
I added a disease test, and proof that it works in the RPGRIP1 notebook.
A couple questions before I push this tho:
Thank you @pnrobinson @ielis