Skip to content

Commit

Permalink
Merge pull request #135 from monarch-initiative/del-issues-json
Browse files Browse the repository at this point in the history
Delete 'issues JSON'
  • Loading branch information
joeflack4 authored Sep 21, 2024
2 parents af28f0e + 4fba4bf commit 1c87af1
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 @@ -365,22 +363,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 1c87af1

Please sign in to comment.