Skip to content

Commit

Permalink
Delete 'issues JSON'
Browse files Browse the repository at this point in the history
- Delete: Dead code related to JSON output that would consolidate issues detected during the ingest build. This code was not just not being used; it was essentially deactivated. There was code for handling issues if they occurred, but no longer was there any code that would flag any issues.
  • Loading branch information
joeflack4 committed Sep 9, 2024
1 parent db4ddd2 commit 4fba4bf
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions omim2obo/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@

# Vars
OUTPATH = os.path.join(ROOT_DIR / 'omim.ttl')
ISSUES_OUTPATH = os.path.join(ROOT_DIR, 'omimIssues.json')
INCLUDED_URI = 'http://purl.obolibrary.org/obo/mondo#omim_included'


Expand Down Expand Up @@ -119,7 +118,6 @@ def get_graph():
# Main
def omim2obo(use_cache: bool = False):
"""Run program"""
issues = {}
graph = OmimGraph.get_graph()
download_files_tf: bool = not use_cache

Expand Down Expand Up @@ -350,22 +348,6 @@ def omim2obo(use_cache: bool = False):

with open(OUTPATH, 'w') as f:
f.write(graph.serialize(format='turtle'))
if issues:
print(f'Warning: Issues detected. Check for details: {ISSUES_OUTPATH}', file=sys.stderr)
with open(ISSUES_OUTPATH, 'w') as f:
json.dump(issues, f, indent=2)
# todo: report in TSV. remove when we are done looking over this issue
# - https://github.com/monarch-initiative/omim/issues/78
rows = []
for row in [
x['morbidmap.txt_original_row'] for x in issues['morbid_map']['issue:nonNumericPhenotypeId'].values()
]:
new_row = {}
new_row['Phenotype'], new_row['Gene Symbols'], new_row['MIM Number'], new_row['Cyto Location'] = \
row.split('\t')
rows.append(new_row)
missing_mimnum_report = pd.DataFrame(rows)
missing_mimnum_report.to_csv('~/Desktop/noMimNumsInPhenoLabels.tsv', sep='\t', index=False)


if __name__ == '__main__':
Expand Down

0 comments on commit 4fba4bf

Please sign in to comment.