microbiomedata / nmdc-schema

National Microbiome Data Collaborative (NMDC) unified data model
https://microbiomedata.github.io/nmdc-schema/
Creative Commons Zero v1.0 Universal
27 stars 8 forks source link

ValueError: : Unknown CURIE prefix: @base from RDF conversion #502

Open turbomam opened 1 year ago

turbomam commented 1 year ago
poetry run linkml-convert \
        --output data_7.ttl \
        --target-class Database \
        --schema src/schema/nmdc.yaml data_7.json

see also #500

turbomam commented 1 year ago

The RDF conversion does work for the following collections:

But not for these:

It doesn't complain about activity_set, but that collection has been empty as long as I've been working on this

I have been skipping these large collections:

The NMDC MongoDB has a read_QC_analysis_activity_set but the v7 schema expects a read_qc_analysis_activity_set. I haven't mapped those yet, so have not tried to instantiate them or convert them to RDF

turbomam commented 1 year ago

RDF dumping works after adding the following to the if collection_name == "data_object_set" section of util/migrate_7.py:

if ":" not in document['id']:
    logger.error(f"illegal document id: {document['id']}")
    document['id'] = f"bare:{document['id']}"

(Along with defining the bare prefix in src/schema/nmdc.yaml)

aclum commented 9 months ago

@turbomam can this be closed? RDF conversion is working now.