This page describes the basic operations we expect providers of RADx metadata will perform. In some cases the RADx Data Hub support team may be able to help you perform these operations, please contact us at the RADx Support contact address.
While many of the artifacts (or examples of them) mentioned in this section can be found in the RADx metadata-specification GitHub repository, their primary location for easy viewing is in the CEDAR repository. You can find the latest links in the README file of the GitHub repository.
Detailed explanations of CEDAR operations described in this manual are described in the CEDAR User's Guide.
RADx Metadata Specification Template
The RADx Metadata Specification Template specifies the metadata format to describe data files or other digital objects submitted to the RADx Data Hub. You can create metadata that conforms to this specification in several ways, as described in the next section.
Because the RADx Metadata Specification Template is a JSON Schema, it can be used to validate the Metadata Instances described in the next section. There are online tools as well as software libraries that can be used to perform this validation. The validation only addresses the syntactic organization of the Metadata Instance, it does not check to see if the contents of metadata fields are meaningful.
RADx Metadata Instances: Creating Metadata Descriptions
We use the term Metadata Instance to refer to a JSON-LD file that conforms to the RADx Metadata Specification template. There are several ways you may want to create a Metadata Instance. Creating a Metadata Instance by Hand (CEDAR)
The simplest way to create a valid metadata Instance is to find the Metadata Specification Template, click on the metadata tag or the drop-down menu item 'Populate', and fill out the resulting form and save it. You can view the result while the Metadata Editor is open by using the JSON-LD button at the bottom of the screen, and copy and paste the revealed text document to a text file for viewing.
Creating a Reusable Metadata Instance (CEDAR)
In another scenario, you may want to partially fill out a Metadata Instance with information that will be the same in many other Metadata Instances. Then that Instance can be used as a 'prefilled with defaults' document from which others can create their own documents. To do this, manually create the Metadata Instance that will contain the shared 'default' data. To let others copy it, make it read-only accessible to their accounts using the drop-down 'Share' menu. (You can specify the name of their account, or you can give the group 'Everybody' read permission.) If you give them the name of the document, they can search for it, and use the drop-down menu in the file viewer dashboard to make a copy of it in their own directory. They can edit their copy (which will include the values you have already set) to produce a new Metadata Instance.
Automatically Generating a Metadata Instance (external)
The rigorous way to create a CEDAR Metadata Instance is to understand the content in the CEDAR Template, Element, and Field Instances guidance. This is an important reference but there is a significant shortcut available.
The easiest way to generate Metadata Instances computationally is to start by creating an example Metadata Instance that has all the metadata fields filled out that you care about. Use recognizable dummy values (e.g., 'zzzz' for text, '9999' for numbers) that you can search for later. Save your Metadata Instance and transfer the saved text into a text editor.
Now you can search for all your dummy entries, to see the exact section of the document you need to replace with your own values. You could imagine a gigantic print statement in your source code to print the document all at once, or separate print statements for each variable of interest. While the order of items at the same level does not matter, the JSON nesting must be preserved.
You have a choice when it comes to filling out the @id for the document (usually near the top) and the metadata parameters about the document (when it was created or update, by whom, etc.). You either have to set those to 'null', as suggested here, and leave them unfilled; or alternatively, you can use the CEDAR REST API to submit your Metadata Instance and turn it into a fully described CEDAR Metadata Instance document. (The API returns the identifier of the Instance, which you can use to retrieve it.) Eventually we may make this last step an automated part of the RADx ingest pipeline; in the meantime, performing some submissions of your content to CEDAR can help you verify that you are correctly completing a well-formed Metadata Instance.
It is also possible to validate a Metadata Instance against the Metadata Specification Template, as described earlier. We recommend you make this a part of your Metadata Instance generation pipeline.