Skip to content

Adamant is a JSON schema-based metadata creation tool for various research data management workflows.

License

Notifications You must be signed in to change notification settings

scOpenLab/scOpenLabAdamant

 
 

Repository files navigation

ScOpenLab Adamant

This is a fork of Adamant for use at the ScOpenLab. It was forked from the original repository at: https://github.com/csihda/adamant The main changes are:

  • Revomal of ElabFTW
  • Setup a submit function in the server API for uploading the form data to and S3 bucket.
  • Remove default forms and add a form for Xenium Slide Metadata.

Workflow:

  1. Open our Adamant webpage at: http://10.128.131.169:3000/ (TEMPORARY DEV INSTANCE).

  2. Select the "xenium_slide.json" form {DBDAB585-0D1F-4A10-B58C-7904CD0D9581}

  3. Click the "RENDER" button {9FD0EC79-37D1-4975-AAC0-0B52A08EDB79}

  4. Fill in the form

    • Fill in the slide metadata {757512AC-6480-4903-B305-D4E8FDFA86EB}

    • For each region: Add and fill a "Xenium Slide Region" section {D595C269-F817-409A-B279-66EA45F2717F} {338D37B2-1E49-40FE-B2BA-EFC3FE149DD2}

  5. Click the "COMPILE" button {F6A0F686-1F43-469B-88B0-07E98DE9F436}

  6. Click the "PROCEED" button

{0B61723A-4944-4248-995A-A036B4A3FE1E}
  1. Click the "Submit Slide Metadata" button {3612ED58-E365-4915-B814-628DFB2B981D}

The slide metadata in json format are submitted to the ScOpenLab S3 bucket. Resubmitting a form with the same slide id will overwrite the previous submission!

How the slide metadata files will be used

{2818CD58-6F6D-49C2-8AF2-E3E34BAC80A8} THe slide metadata will then be read from the bucket at the end of ech region run by the `endofrun.sh` script on the Xenium instrument, and used to automate data transfer to the bucket. See here for more details: https://github.com/scOpenLab/xenium_metadata_writer/blob/main/README.md#workflow

Deployment

We recommend deploying Adamant with docker-compose, which can be done with ease:

  • $ git clone https://github.com/csihda/adamant.git—clone the repository
  • $ cd adamant—go to adamant project directory
  • adamant$ docker−compose build—build the docker images for both back-end and front-end
  • adamant$ docker−compose up -d—start both client and server containers, i.e., the whole system

By default, the deployed system can be accessed at http://localhost:3000.

Development details

Supported JSON schema keywords

Currently, Adamant supports the rendering and editing of JSON schemas with a specification version draft 4 and 7. The following table lists all the implemented JSON schema keywords in the current version of Adamant. Note that the id keyword only works with the JSON schema specification version draft 4, whereas $id is used for the newer specification drafts. Lastly, the contentEncoding keyword is intended to be used with the specification version draft 7 or newer.

Field Type Implemented Keywords Note
String title, id, $id, description, type, enum, contentEncoding, default, minLength, maxLength contentEncoding can only receive a string value of "base64"
Number title, id, $id, description, type, enum, default, minimum, maximum
Integer title, id, $id, description, type, enum, default, minimum, maximum
Boolean title, id, $id, description, type, default
Array title , id, $id, description, type, default, items, minItems, maxItems, uniqueItems
Object title, id, $id, description, type, properties, required

Development Setup

Setting up Adamant on a local machine for development:

  • $ git clone https://github.com/csihda/adamant.git—clone the repository
  • $ cd adamant—go to adamant project directory
  • adamant$ npm install—install the dependencies for the client-side
  • adamant$ cd backend—go to backend directory
  • adamant/backend$ python -m venv venv—create a python virtual environment
  • adamant/backend$ ./venv/Scripts/activate—activate the virtual environment
  • adamant/backend$ pip install -r requirements.txt—install the dependencies for the back-end
  • adamant/backend$ cd ..—go back to adamant project directory
  • adamant$ yarn start-api—start the back-end
  • adamant$ yarn start—on a new terminal, in the adamant project directory, start the front-end

By default, Adamant is accessible at http://localhost:3000.

Citation

Please cite this paper if you use this code/tool in your publication.

@article{ 10.12688/f1000research.110875.2,
author = {Chaerony Siffa, I and Schäfer, J and Becker, MM},
title = {Adamant: a JSON schema-based metadata editor for research data management workflows 
[version 2; peer review: 3 approved]},
journal = {F1000Research},
volume = {11},
year = {2022},
number = {475},
doi = {10.12688/f1000research.110875.2}
}

DOI:10.12688/f1000research.110875.2

About

Adamant is a JSON schema-based metadata creation tool for various research data management workflows.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.8%
  • Other 1.2%