Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: mapping_justification must be supplied #56

Closed
caufieldjh opened this issue Jul 20, 2022 · 1 comment · Fixed by #57
Closed

ValueError: mapping_justification must be supplied #56

caufieldjh opened this issue Jul 20, 2022 · 1 comment · Fixed by #57

Comments

@caufieldjh
Copy link
Collaborator

When running a fresh transform like the following:

python run.py --input ../Bioportal/4store-export-2022-07-20/data/ --get_bioportal_metadata --ncbo_key [key] --remap_types --write_curies

the process fails upon trying to load the SSSOM maps:

Looking for records in ../Bioportal/4store-export-2022-07-20/data/
976 files found.
Setting up ROBOT...
ROBOT path: /home/harry/BioPortal-to-KGX/robot
ROBOT evironment variables: -Xmx12g -XX:+UseG1GC
Loading type maps from mappings/
WARNING:root:No prefix map provided (not recommended), trying to use defaults..
Traceback (most recent call last):
  File "run.py", line 81, in <module>
    run()
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "run.py", line 69, in run
    transform_status = do_transforms(data_filepaths, kgx_validate, robot_validate, pandas_validate, 
  File "/home/harry/BioPortal-to-KGX/bioportal_to_kgx/functions.py", line 121, in do_transforms
    this_table = read_sssom_table(os.path.join(MAPPING_DIR,filepath))
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/deprecation.py", line 260, in _inner
    return function(*args, **kwargs)
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/sssom/parsers.py", line 84, in read_sssom_table
    return parse_sssom_table(
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/sssom/parsers.py", line 183, in parse_sssom_table
    msdf = from_sssom_dataframe(
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/sssom/parsers.py", line 382, in from_sssom_dataframe
    mlist.append(_prepare_mapping(Mapping(**mdict)))
  File "<string>", line 42, in __init__
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/sssom_schema/datamodel/sssom_schema.py", line 258, in __post_init__
    self.MissingRequiredField("mapping_justification")
  File "/home/harry/bioportal-to-kgx-env/lib/python3.8/site-packages/linkml_runtime-1.2.0rc3-py3.8.egg/linkml_runtime/utils/yamlutils.py", line 246, in MissingRequiredField
    raise ValueError(f"{field_name} must be supplied")
ValueError: mapping_justification must be supplied

As the stack trace indicates, this is due to a missing required field in the maps as per the sssom_schema.
They need to include mapping_justification.

@caufieldjh
Copy link
Collaborator Author

See also: mapping-commons/sssom#150
mapping_justification replaces match_type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant