ncbo / BioPortal-to-KGX

Assemble a BioPortal Knowledge Graph
BSD 3-Clause "New" or "Revised" License
4 stars 1 forks source link

Transform for `RDL` fails #59

Closed caufieldjh closed 2 years ago

caufieldjh commented 2 years ago

Transform for RDL fails:

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 170, in do_transforms
    metadata = (header.split(NAMESPACE))[1]
IndexError: list index out of range
caufieldjh commented 2 years ago

Also ESSO, with a very similar error.

I think this occurs if "data.bioontology.org" isn't present in the header of the input file for whatever reason, though this is the first line of the input for ESSO:

## GRAPH http://data.bioontology.org/ontologies/ESSO/submissions/5
caufieldjh commented 2 years ago

And this is the first line of RDL:

## GRAPH http://data.bioontology.org/ontologies/RDL/submissions/1
caufieldjh commented 2 years ago

For comparison, here is the header for DRON:

## GRAPH http://data.bioontology.org/ontologies/DRON/submissions/14

No obvious difference here.

caufieldjh commented 2 years ago

Similar to #58 , so these should complete on retry. Should still try to catch the IndexError so it doesn't stop transform runs prematurely.