-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #256 from monarch-initiative/enhance-phenotype-pre…
…dicate-tests Test phenotype predicate utility methods
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import hpotk | ||
|
||
from gpsea.model import Cohort | ||
|
||
from gpsea.analysis.predicate.phenotype import PhenotypePolyPredicate | ||
from gpsea.analysis.predicate.phenotype import prepare_hpo_terms_of_interest, prepare_predicates_for_terms_of_interest | ||
|
||
|
||
def test_prepare_hpo_terms_of_interest( | ||
suox_cohort: Cohort, | ||
hpo: hpotk.MinimalOntology, | ||
): | ||
terms = prepare_hpo_terms_of_interest( | ||
cohort=suox_cohort, | ||
hpo=hpo, | ||
) | ||
|
||
assert len(terms) == 66 | ||
|
||
|
||
def test_prepare_predicates_for_terms_of_interest( | ||
suox_cohort: Cohort, | ||
hpo: hpotk.MinimalOntology, | ||
): | ||
predicates = prepare_predicates_for_terms_of_interest( | ||
cohort=suox_cohort, | ||
hpo=hpo, | ||
) | ||
|
||
assert len(predicates) == 66 | ||
assert all(isinstance(p, PhenotypePolyPredicate) for p in predicates) |