Skip to content

Commit

Permalink
Amend tests to reflect changes in EFO
Browse files Browse the repository at this point in the history
  • Loading branch information
tskir committed Nov 17, 2022
1 parent 88eb3a3 commit c4f12e7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ def test_file_batch_input(rootdir):
])
assert result.exit_code == 0
output = open('/tmp/ontoma-1.txt').read()
assert 'EFO_0000270' in output
assert 'MONDO_0004979' in output
# assert 'MONDO_0002279' in output # Related synonyms are not processed by this version.
13 changes: 5 additions & 8 deletions tests/test_ontoma.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,18 @@
def test_find_term_asthma(ontclient):
assert_result_ot_label(
ontclient.find_term('asthma'),
['EFO_0000270']
['MONDO_0004979']
)


def test_is_included(ontclient):
assert ontclient.filter_identifiers_by_efo_current(['ORDO:354']) == ['ORDO:354']
# FIXME: This represents a term which is in EFO, but perhaps should not be considered by OnToma, because this is
# FIXME: a body part rather than a disease/drug response/etc.
assert ontclient.filter_identifiers_by_efo_current(['UBERON:0000310']) == ['UBERON:0000310']
assert ontclient.filter_identifiers_by_efo_current(['MONDO:0018149']) == ['MONDO:0018149']


def test_suggest_hp_term_not_excluded(ontclient):
assert_result_ot_label(
ontclient.find_term('hypogammaglobulinemia'),
['Orphanet_183669']
['MONDO_0015977']
)


Expand All @@ -29,7 +26,7 @@ def test_catch_ordo(ontclient):
)
assert_result_ot_label(
ontclient.find_term('OMIM:208250', code=True),
{'EFO_0009028', 'MONDO_0008828'}
{'EFO_0009028'}
)


Expand All @@ -42,5 +39,5 @@ def test_query_comma(ontclient):
def test_find_term_alzheimer(ontclient):
assert_result_ot_label(
ontclient.find_term('alzheimer\'s disease'),
['EFO_0000249']
['MONDO_0004975']
)
10 changes: 5 additions & 5 deletions tests/test_phewascat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
def test_find_term_asthma(ontclient):
assert_result_ot_label(
ontclient.find_term('asthma'),
['EFO_0000270']
['MONDO_0004979']
)


def test_efo_direct_match(ontclient):
# The test deliberately expects no results, since a match from “Dementias” to “EFO_0004718” is a fuzzy one and
# cannot be assumed of high quality.
assert not ontclient.find_term('Dementias')
# The test deliberately expects no results, since a match from “Xeroderma Pigmentosa” to “MONDO_0019600” is a fuzzy
# one and cannot be assumed of high quality.
assert not ontclient.find_term('Xeroderma Pigmentosa')


def test_otzooma_mappings_whitespace(ontclient):
Expand All @@ -24,7 +24,7 @@ def test_otzooma_mappings_whitespace(ontclient):
def test_efo_match_with_apostrophe(ontclient):
assert_result_ot_label(
ontclient.find_term('Alzheimer\'s disease'),
['EFO_0000249']
['MONDO_0004975']
)


Expand Down

0 comments on commit c4f12e7

Please sign in to comment.