monarch-initiative / omim

Data ingest pipeline for OMIM.
7 stars 3 forks source link

Make codebase compatible w/ latest ODK #114

Open joeflack4 opened 3 months ago

joeflack4 commented 3 months ago

Overview

As of now, I'm getting errors if I run on obolibrary/odkfull: latest or dev. Right now we are stuck to v1.4.3.

Sub-tasks

Error details

Err: KeyError: "['subject_label'] not in index" Happens when: creating mondo_exactmatch_omimps.sssom.owl

Details

``` sh run.sh make mondo_genes.robot.tsv; beep sssom convert mondo_exactmatch_omimps.sssom.tsv -O owl -o mondo_exactmatch_omimps.sssom.owl /usr/local/lib/python3.10/dist-packages/sssom/util.py:168: FutureWarning: Downcasting behavior in `replace` is deprecated and will be removed in a future version. To retain the old behavior, explicitly call `result.infer_objects(copy=False)`. To opt-in to the future behavior, set `pd.set_option('future.no_silent_downcasting', True)` df.replace("", np.nan, inplace=True) Traceback (most recent call last): File "/usr/local/bin/sssom", line 8, in sys.exit(main()) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/usr/local/lib/python3.10/dist-packages/sssom/cli.py", line 161, in convert convert_file(input_path=input, output=output, output_format=output_format) File "/usr/local/lib/python3.10/dist-packages/sssom/io.py", line 50, in convert_file write_func(doc, output, serialisation=fileformat) # type:ignore File "/usr/local/lib/python3.10/dist-packages/sssom/writers.py", line 162, in write_owl graph = to_owl_graph(msdf) File "/usr/local/lib/python3.10/dist-packages/sssom/writers.py", line 173, in to_owl_graph msdf.df = invert_mappings( File "/usr/local/lib/python3.10/dist-packages/sssom/util.py", line 1462, in invert_mappings inverted_df = inverted_df[df.columns] File "/usr/local/lib/python3.10/dist-packages/pandas/core/frame.py", line 4108, in __getitem__ indexer = self.columns._get_indexer_strict(key, "columns")[1] File "/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py", line 6200, in _get_indexer_strict self._raise_if_missing(keyarr, indexer, axis_name) File "/usr/local/lib/python3.10/dist-packages/pandas/core/indexes/base.py", line 6252, in _raise_if_missing raise KeyError(f"{not_found} not in index") KeyError: "['subject_label'] not in index" make: *** [makefile:23: mondo_exactmatch_omimps.sssom.owl] Error 1 ```

joeflack4 commented 3 months ago

@matentzn @twhetzel FYI

Set this to low priority, though perhaps it should be medium.

matentzn commented 3 months ago

If this happens in the latest ODK this is a high priority issue.

joeflack4 commented 3 months ago

It does. High it is~