From 30291f1f76e2cb19141b44127049f664b243486e Mon Sep 17 00:00:00 2001 From: Anh Nguyet Vu <32753274+anngvu@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:06:22 -0700 Subject: [PATCH] Feat/json schema workflow (#399) * Draft new workflow * Add utility script * Update Makefile * Update casing to be consistent * Update Makefile * Revise workflow file * Make workflow consistent with changes * Also update if workflow updates * Lint * Combine and rename main build and test workflow * Update * Add cli tool install to step * Revise cond and test * Rebuild NF.jsonld, json * Update workflow to propagate changes to Synapse schema registry as well * Update token ref * Lint * Add term * Rebuild NF.jsonld, json --------- Co-authored-by: nf-osi[bot] --- .../{schematic-ci.yml => main-ci.yml} | 17 +- .github/workflows/propagate.yml | 58 ++++++ .github/workflows/trigger-sync-dcc-site.yml | 27 --- Makefile | 8 +- NF.jsonld | 28 +++ modules/Assay/Assay.yaml | 2 + modules/Assay/Platform.yaml | 2 + registered-json-schemas/Dataset.json | 175 ++++++++++++++++ registered-json-schemas/PortalDataset.json | 1 + registered-json-schemas/PortalStudy.json | 4 + registered-json-schemas/Superdataset.json | 196 ++++++++++++++++++ registered-json-schemas/dataset.json | 135 ------------ registered-json-schemas/superdataset.json | 156 -------------- utils/enumerate.sh | 6 + 14 files changed, 492 insertions(+), 323 deletions(-) rename .github/workflows/{schematic-ci.yml => main-ci.yml} (88%) create mode 100644 .github/workflows/propagate.yml delete mode 100644 .github/workflows/trigger-sync-dcc-site.yml create mode 100644 registered-json-schemas/Dataset.json create mode 100644 registered-json-schemas/Superdataset.json delete mode 100644 registered-json-schemas/dataset.json delete mode 100644 registered-json-schemas/superdataset.json create mode 100755 utils/enumerate.sh diff --git a/.github/workflows/schematic-ci.yml b/.github/workflows/main-ci.yml similarity index 88% rename from .github/workflows/schematic-ci.yml rename to .github/workflows/main-ci.yml index 819dd0a8..52b1b74e 100644 --- a/.github/workflows/schematic-ci.yml +++ b/.github/workflows/main-ci.yml @@ -1,4 +1,4 @@ -name: schematic-ci +name: main-ci on: @@ -13,7 +13,6 @@ on: jobs: build: runs-on: ubuntu-20.04 - if: ${{ !contains(github.event.head_commit.message, '[skip schematic]') }} steps: - uses: actions/checkout@v4 @@ -28,13 +27,22 @@ jobs: bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install) git clone --depth 1 https://github.com/anngvu/retold.git make + + - name: Install tools and regenerate registered jsons for Superdataset, PortalDataset, etc + run: | + pip install linkml + npm install -g json-dereference-cli + make Dataset + make Superdataset + make PortalDataset + make PortalStudy - name: Commit files run: | git config --local user.email "nf-osi@sagebionetworks.org" git config --local user.name "nf-osi[bot]" - git add "NF.jsonld" - git commit -m "Build jsonld" + git add . + git commit -m "Rebuild NF.jsonld, json" - name: Push changes uses: ad-m/github-push-action@master @@ -42,6 +50,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.event.pull_request.head.ref }} + # Additionally test PRs test: name: Test with schematic diff --git a/.github/workflows/propagate.yml b/.github/workflows/propagate.yml new file mode 100644 index 00000000..a19479ad --- /dev/null +++ b/.github/workflows/propagate.yml @@ -0,0 +1,58 @@ +# When updates are merged into main, propagate data model updates to various places: +# 1. dcc-site uses assay, etc. for drop-down options; triggers a workflow in dcc-site that creates a PR to pull in new terms. +# 2. The Synapse schema registry has schemas for the NF entities such as portal studies and datasets. Push updated JSON schemas to the Synapse registry. +# +# Highly related but to be handled by separate workflow: +# Update data model version in DCA-prod for official releases (instead of every merge into main) + +name: Propagate data model updates + +on: + push: + branches: + - main + paths: + - NF.jsonld + +env: + REPO: nf-osi/dcc-site + REF: refs/heads/main + SYNAPSE_AUTH_TOKEN: ${{ secrets.DATA_MODEL_SERVICE }} + +jobs: + trigger-sync: + runs-on: ubuntu-latest + steps: + + - name: Dispatch update workflow for dcc-site + uses: benc-uk/workflow-dispatch@v1 + with: + workflow: Handle data model update + repo: ${{ env.REPO }} + ref: ${{ env.REF }} + token: ${{ secrets.SERVICE_TOKEN }} + + - uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Push to Synapse schema registry only JSON schemas that changed + run: | + CHANGED=$(git diff --name-only HEAD HEAD~1 registered-json-schemas) + for FILE in $CHANGED + do + REQUEST_BODY=$(jq '. + { concreteType: "org.sagebionetworks.repo.model.schema.CreateSchemaRequest", dryRun: false }' $FILE) + RESPONSE=$(curl -X POST https://repo-prod.prod.sagebase.org/repo/v1/schema/type/create/async/start \ + -H "Authorization: Bearer $SYNAPSE_AUTH_TOKEN" \ + -H "Content-Type: application/json" \ + -d "$REQUEST_BODY") + + # Will error if token not within response + TOKEN=$( echo $RESPONSE | jq -e -r '.token') + sleep 1 + STATUS=$(curl "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/create/async/get/$TOKEN" \ + -H "Authorization: Bearer $SYNAPSE_AUTH_TOKEN") + + echo $STATUS | jq -e '.newVersionInfo' + done + diff --git a/.github/workflows/trigger-sync-dcc-site.yml b/.github/workflows/trigger-sync-dcc-site.yml deleted file mode 100644 index b0dcac22..00000000 --- a/.github/workflows/trigger-sync-dcc-site.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Trigger dcc-site to create a PR for its `main` self that pulls in data model changes into study-schema drop-down options -# whenever there are pushes to `main` with relevant model changes - -name: Sync dcc-site - -on: - push: - branches: - - main - paths: - - NF.jsonld - -env: - REPO: nf-osi/dcc-site - REF: refs/heads/main - -jobs: - trigger-sync: - runs-on: ubuntu-latest - steps: - - - uses: benc-uk/workflow-dispatch@v1 - with: - workflow: Handle data model update - repo: ${{ env.REPO }} - ref: ${{ env.REF }} - token: ${{ secrets.SERVICE_TOKEN }} diff --git a/Makefile b/Makefile index 7e674c75..f4adc8e7 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,6 @@ PortalDataset: @echo "--- Saved registered-json-schemas/PortalDataset.json ---" - # yq '.slots |= with_entries(select(.value.in_subset[] == "portal"))' modules/props.yaml > relevant_props.yaml PortalStudy: yq eval-all '. as $$item ireduce ({}; . * $$item )' modules/Data/Data.yaml modules/DCC/Portal.yaml modules/Other/Organization.yaml > relevant_enums.yaml @@ -41,3 +40,10 @@ PortalStudy: rm tmp.json @echo "--- Saved registered-json-schemas/PortalStudy.json ---" +Dataset: + enum=$$(./utils/enumerate.sh assay); jq --argjson enum "$$enum" '.properties.assay.enum = $$enum' registered-json-schemas/Dataset.json > temp.json && mv temp.json registered-json-schemas/Dataset.json + + +Superdataset: + enum=$$(./utils/enumerate.sh assay); jq --argjson enum "$$enum" '.properties.assay.enum = $$enum' registered-json-schemas/Superdataset.json > temp.json && mv temp.json registered-json-schemas/Superdataset.json + diff --git a/NF.jsonld b/NF.jsonld index a0cc72bd..a48531eb 100644 --- a/NF.jsonld +++ b/NF.jsonld @@ -4890,6 +4890,8 @@ "@id" : "bts:ChildBehaviorChecklistforAges1.5-5" }, { "@id" : "bts:ChildBehaviorChecklistforAges6-18" + }, { + "@id" : "bts:CODEX" }, { "@id" : "bts:Corsiblocks" }, { @@ -5241,6 +5243,8 @@ "@id" : "bts:ChildBehaviorChecklistforAges1.5-5" }, { "@id" : "bts:ChildBehaviorChecklistforAges6-18" + }, { + "@id" : "bts:CODEX" }, { "@id" : "bts:Corsiblocks" }, { @@ -5784,6 +5788,8 @@ "@id" : "bts:MGIT-series" }, { "@id" : "bts:VarioskanLUX" + }, { + "@id" : "bts:Panorama1.0T" }, { "@id" : "bts:NotApplicable" } ], @@ -18086,6 +18092,17 @@ }, "sms:displayName" : "6", "sms:required" : "sms:false" + }, { + "@id" : "bts:CODEX", + "@type" : "rdfs:Class", + "rdfs:comment" : "TBD", + "rdfs:label" : "CODEX", + "rdfs:subClassOf" : [ ], + "schema:isPartOf" : { + "@id" : "http://schema.biothings.io/" + }, + "sms:displayName" : "CODEX", + "sms:required" : "sms:false" }, { "@id" : "bts:MissouriUniversityofScienceandTechnology", "@type" : "rdfs:Class", @@ -21298,6 +21315,17 @@ }, "sms:displayName" : "University of Texas Health Science Center, Tyler", "sms:required" : "sms:false" + }, { + "@id" : "bts:Panorama1.0T", + "@type" : "rdfs:Class", + "rdfs:comment" : "TBD", + "rdfs:label" : "Panorama1.0T", + "rdfs:subClassOf" : [ ], + "schema:isPartOf" : { + "@id" : "http://schema.biothings.io/" + }, + "sms:displayName" : "Panorama 1.0T", + "sms:required" : "sms:false" }, { "@id" : "bts:LI-COROdysseyCLx", "@type" : "rdfs:Class", diff --git a/modules/Assay/Assay.yaml b/modules/Assay/Assay.yaml index 114342b6..73c6d6b2 100644 --- a/modules/Assay/Assay.yaml +++ b/modules/Assay/Assay.yaml @@ -50,6 +50,8 @@ enums: "A standardized measure designed to detect behavioral and emotional problems in children and adolescents. It is completed by the parent/caretaker who spends the most time with the child and provides ratings for 20 competence and 120 problem items. [ NCI ]" meaning: http://purl.obolibrary.org/obo/NCIT_C165711 + CODEX: + description: CODEX imaging. Corsi blocks: description: > A visuospatial counterpart to the verbal-memory span task (Milner, 1971). Over the years, it has frequently been used to assess visuospatial short-term memory performance in adults diff --git a/modules/Assay/Platform.yaml b/modules/Assay/Platform.yaml index 1bd3e192..30c3ee29 100644 --- a/modules/Assay/Platform.yaml +++ b/modules/Assay/Platform.yaml @@ -214,5 +214,7 @@ enums: Varioskan LUX: description: Microplate reader for ELISAs, etc. source: https://www.thermofisher.com/us/en/home/life-science/lab-equipment/microplate-instruments/plate-readers/models/varioskan.html + Panorama 1.0T: + description: A conventional MRI scanner from Philips. Not Applicable: description: '' diff --git a/registered-json-schemas/Dataset.json b/registered-json-schemas/Dataset.json new file mode 100644 index 00000000..2ea7e9d2 --- /dev/null +++ b/registered-json-schemas/Dataset.json @@ -0,0 +1,175 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-dataset", + "properties": { + "assay": { + "enum": [ + "2D AlamarBlue absorbance", + "2D AlamarBlue fluorescence", + "3D confocal imaging", + "3D electron microscopy", + "3D imaging", + "3D microtissue viability", + "active avoidance learning behavior assay", + "array", + "ATAC-seq", + "atomic force microscopy", + "ATPase activity assay", + "autoradiography", + "bisulfite sequencing", + "blood chemistry measurement", + "blue native PAGE", + "body size trait measurement", + "BrdU proliferation assay", + "brightfield microscopy", + "calcium retention capacity assay", + "cAMP-Glo Max Assay", + "CAPP-seq", + "cell competition", + "cell count", + "cell proliferation", + "cell viability assay", + "Child Behavior Checklist for Ages 1.5-5", + "Child Behavior Checklist for Ages 6-18", + "Children's Dermatology Life Quality Index Questionnaire", + "ChIP-seq", + "clinical data", + "cNF-Skindex", + "CODEX", + "cognitive assessment", + "combination library screen", + "combination screen", + "complex II enzyme activity assay", + "compound screen", + "contextual conditioning behavior assay", + "conventional MRI", + "Corsi blocks", + "CUT&RUN", + "differential scanning calorimetry", + "DNA optical mapping", + "dynamic light scattering", + "EdU proliferation assay", + "electrochemiluminescence", + "electrophoretic light scattering", + "elevated plus maze test", + "ELISA", + "ERR bisulfite sequencing", + "FACE-Q Appearance-related Distress", + "FIA-MSMS", + "FLIPR high-throughput cellular screening", + "flow cytometry", + "Fluorescence In Situ Hybridization", + "focus forming assay", + "Focus group", + "FTIR spectroscopy", + "functional MRI", + "gait measurement", + "gel filtration chromatography", + "gel permeation chromatography", + "genotyping", + "HI-C", + "high content screen", + "high frequency ultrasound", + "high-performance liquid chromatography/tandem mass spectrometry", + "HPLC", + "immunoassay", + "immunocytochemistry", + "immunofluorescence", + "immunohistochemistry", + "in silico synthesis", + "in vitro tumorigenesis", + "in vivo bioluminescence", + "in vivo PDX viability", + "in vivo tumor growth", + "Interview", + "ISO-seq", + "jumping library", + "label free mass spectrometry", + "laser speckle imaging", + "light scattering assay", + "liquid chromatography-electrochemical detection", + "liquid chromatography/mass spectrometry", + "liquid chromatography/tandem mass spectrometry", + "lncRNA-seq", + "local field potential recording", + "long term potentiation assay", + "magnetic resonance spectroscopy", + "mass spectrometry", + "massively parallel reporter assay", + "Matrigel-based tumorigenesis assay", + "metabolic screening", + "methylation array", + "MIB/MS", + "microrheology", + "miRNA array", + "miRNA-seq", + "mRNA counts", + "MudPIT", + "multi-electrode array", + "n-back task", + "nanoparticle tracking analysis", + "neuropsychological assessment", + "next generation targeted sequencing", + "NIH Toolbox", + "NOMe-seq", + "novelty response behavior assay", + "open field test", + "optical coherence tomography", + "optical tomography", + "optokinetic reflex assay", + "oscillatory rheology", + "oxBS-seq", + "oxygen consumption assay", + "pattern electroretinogram", + "perineurial cell thickness", + "phase-contrast microscopy", + "photograph", + "polymerase chain reaction", + "positron emission tomography", + "PROMIS Cognitive Function", + "quantitative PCR", + "questionnaire", + "reactive oxygen species assay", + "reporter gene assay", + "rheometry", + "ribo-seq", + "Riccardi and Ablon scales", + "RNA array", + "RNA-seq", + "rotarod performance test", + "RPPA", + "SaferSeqS", + "sandwich ELISA", + "Sanger sequencing", + "scale", + "scCGI-seq", + "single molecule drug screen assay", + "single-cell RNA-seq", + "Skindex-16", + "small molecule library screen", + "SNP array", + "Social Responsiveness Scale", + "Social Responsiveness Scale, Second Edition", + "sorbitol dehydrogenase activity level assay", + "spatial frequency domain imaging", + "spatial transcriptomics", + "static light scattering", + "STR profile", + "survival", + "SUSHI", + "T cell receptor repertoire sequencing", + "targeted exome sequencing", + "TIDE", + "TMT quantitation", + "traction force microscopy", + "twin spot assay", + "ultra high-performance liquid chromatography/tandem mass spectrometry", + "Von Frey test", + "western blot", + "whole exome sequencing", + "whole genome sequencing", + "whole-cell patch clamp" + ] + } + } +} diff --git a/registered-json-schemas/PortalDataset.json b/registered-json-schemas/PortalDataset.json index 8d614fb6..26802419 100644 --- a/registered-json-schemas/PortalDataset.json +++ b/registered-json-schemas/PortalDataset.json @@ -30,6 +30,7 @@ "ChIP-seq", "Child Behavior Checklist for Ages 1.5-5", "Child Behavior Checklist for Ages 6-18", + "CODEX", "Corsi blocks", "DNA optical mapping", "ELISA", diff --git a/registered-json-schemas/PortalStudy.json b/registered-json-schemas/PortalStudy.json index 77b62ea4..b3192830 100644 --- a/registered-json-schemas/PortalStudy.json +++ b/registered-json-schemas/PortalStudy.json @@ -101,7 +101,10 @@ "items": { "description": "", "enum": [ + "Eutropics Pharmaceuticals", "Cincinnati Children's Hospital Medical Center", + "Memorial Sloane Kettering Cancer Center", + "Dana-Farber Cancer Institute", "Massachusetts General Hospital", "University of Tennessee, Health Science Center", "Dartmouth College", @@ -148,6 +151,7 @@ "Iowa State University", "Van Andel Research Institute", "University of California, Irvine", + "University of Cambridge", "University of North Carolina, Greensboro", "University of Toledo", "University of Louisville", diff --git a/registered-json-schemas/Superdataset.json b/registered-json-schemas/Superdataset.json new file mode 100644 index 00000000..a9a73cbe --- /dev/null +++ b/registered-json-schemas/Superdataset.json @@ -0,0 +1,196 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-superdataset", + "properties": { + "assay": { + "enum": [ + "2D AlamarBlue absorbance", + "2D AlamarBlue fluorescence", + "3D confocal imaging", + "3D electron microscopy", + "3D imaging", + "3D microtissue viability", + "active avoidance learning behavior assay", + "array", + "ATAC-seq", + "atomic force microscopy", + "ATPase activity assay", + "autoradiography", + "bisulfite sequencing", + "blood chemistry measurement", + "blue native PAGE", + "body size trait measurement", + "BrdU proliferation assay", + "brightfield microscopy", + "calcium retention capacity assay", + "cAMP-Glo Max Assay", + "CAPP-seq", + "cell competition", + "cell count", + "cell proliferation", + "cell viability assay", + "Child Behavior Checklist for Ages 1.5-5", + "Child Behavior Checklist for Ages 6-18", + "Children's Dermatology Life Quality Index Questionnaire", + "ChIP-seq", + "clinical data", + "cNF-Skindex", + "CODEX", + "cognitive assessment", + "combination library screen", + "combination screen", + "complex II enzyme activity assay", + "compound screen", + "contextual conditioning behavior assay", + "conventional MRI", + "Corsi blocks", + "CUT&RUN", + "differential scanning calorimetry", + "DNA optical mapping", + "dynamic light scattering", + "EdU proliferation assay", + "electrochemiluminescence", + "electrophoretic light scattering", + "elevated plus maze test", + "ELISA", + "ERR bisulfite sequencing", + "FACE-Q Appearance-related Distress", + "FIA-MSMS", + "FLIPR high-throughput cellular screening", + "flow cytometry", + "Fluorescence In Situ Hybridization", + "focus forming assay", + "Focus group", + "FTIR spectroscopy", + "functional MRI", + "gait measurement", + "gel filtration chromatography", + "gel permeation chromatography", + "genotyping", + "HI-C", + "high content screen", + "high frequency ultrasound", + "high-performance liquid chromatography/tandem mass spectrometry", + "HPLC", + "immunoassay", + "immunocytochemistry", + "immunofluorescence", + "immunohistochemistry", + "in silico synthesis", + "in vitro tumorigenesis", + "in vivo bioluminescence", + "in vivo PDX viability", + "in vivo tumor growth", + "Interview", + "ISO-seq", + "jumping library", + "label free mass spectrometry", + "laser speckle imaging", + "light scattering assay", + "liquid chromatography-electrochemical detection", + "liquid chromatography/mass spectrometry", + "liquid chromatography/tandem mass spectrometry", + "lncRNA-seq", + "local field potential recording", + "long term potentiation assay", + "magnetic resonance spectroscopy", + "mass spectrometry", + "massively parallel reporter assay", + "Matrigel-based tumorigenesis assay", + "metabolic screening", + "methylation array", + "MIB/MS", + "microrheology", + "miRNA array", + "miRNA-seq", + "mRNA counts", + "MudPIT", + "multi-electrode array", + "n-back task", + "nanoparticle tracking analysis", + "neuropsychological assessment", + "next generation targeted sequencing", + "NIH Toolbox", + "NOMe-seq", + "novelty response behavior assay", + "open field test", + "optical coherence tomography", + "optical tomography", + "optokinetic reflex assay", + "oscillatory rheology", + "oxBS-seq", + "oxygen consumption assay", + "pattern electroretinogram", + "perineurial cell thickness", + "phase-contrast microscopy", + "photograph", + "polymerase chain reaction", + "positron emission tomography", + "PROMIS Cognitive Function", + "quantitative PCR", + "questionnaire", + "reactive oxygen species assay", + "reporter gene assay", + "rheometry", + "ribo-seq", + "Riccardi and Ablon scales", + "RNA array", + "RNA-seq", + "rotarod performance test", + "RPPA", + "SaferSeqS", + "sandwich ELISA", + "Sanger sequencing", + "scale", + "scCGI-seq", + "single molecule drug screen assay", + "single-cell RNA-seq", + "Skindex-16", + "small molecule library screen", + "SNP array", + "Social Responsiveness Scale", + "Social Responsiveness Scale, Second Edition", + "sorbitol dehydrogenase activity level assay", + "spatial frequency domain imaging", + "spatial transcriptomics", + "static light scattering", + "STR profile", + "survival", + "SUSHI", + "T cell receptor repertoire sequencing", + "targeted exome sequencing", + "TIDE", + "TMT quantitation", + "traction force microscopy", + "twin spot assay", + "ultra high-performance liquid chromatography/tandem mass spectrometry", + "Von Frey test", + "western blot", + "whole exome sequencing", + "whole genome sequencing", + "whole-cell patch clamp" + ] + } + }, + "if": { + "properties": { + "concreteType": { + "const": "org.sagebionetworks.repo.model.Folder" + } + }, + "not": { + "properties": { + "name": { + "const": "Raw Data" + } + } + } + }, + "then": { + "properties": { + "contentType": { + "const": "dataset" + } + } + } +} diff --git a/registered-json-schemas/dataset.json b/registered-json-schemas/dataset.json deleted file mode 100644 index 020fa470..00000000 --- a/registered-json-schemas/dataset.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-dataset", - "properties": { - "assay": { - "enum": [ - "2D AlamarBlue absorbance", - "2D AlamarBlue fluorescence", - "2D CellTiter-Glo", - "2D Incucyte", - "3D confocal imaging", - "3D electron microscopy", - "3D imaging", - "3D microtissue viability", - "active avoidance learning behavior assay", - "array", - "ATAC-seq", - "atomic force microscopy", - "ATPase activity assay", - "autoradiography", - "bisulfite sequencing", - "blood chemistry measurement", - "blue native PAGE", - "body size trait measurement", - "brightfield microscopy", - "calcium retention capacity assay", - "cell competition", - "cell count", - "cell proliferation", - "cell viability assay", - "ChIP-seq", - "combination library screen", - "combination screen", - "compound screen", - "contextual conditioning behavior assay", - "conventional MRI", - "CUT&RUN", - "differential scanning calorimetry", - "DNA optical mapping", - "dynamic light scattering", - "electrochemiluminescence", - "elevated plus maze test", - "ELISA", - "ERR bisulfite sequencing", - "FIA-MSMS", - "flow cytometry", - "focus forming assay", - "FTIR spectroscopy", - "functional MRI", - "gait measurement", - "gel filtration chromatography", - "genotyping", - "HI-C", - "high content screen", - "high frequency ultrasound", - "high-performance liquid chromatography/tandem mass spectrometry", - "HPLC", - "immunoassay", - "immunocytochemistry", - "immunofluorescence", - "immunohistochemistry", - "in vitro tumorigenesis", - "in vivo bioluminescence", - "in vivo PDX viability", - "in vivo tumor growth", - "ISO-seq", - "label free mass spectrometry", - "laser speckle imaging", - "light scattering assay", - "liquid chromatography-electrochemical detection", - "liquid chromatography/mass spectrometry", - "liquid chromatography/tandem mass spectrometry", - "lncRNA-seq", - "local field potential recording", - "long term potentiation assay", - "magnetic resonance spectroscopy", - "massively parallel reporter assay", - "mass spectrometry", - "Matrigel-based tumorigenesis assay", - "methylation array", - "MIB/MS", - "miRNA array", - "miRNA-seq", - "mRNA counts", - "MudPIT", - "next generation targeted sequencing", - "NOMe-seq", - "novelty response behavior assay", - "open field test", - "optical coherence tomography", - "optokinetic reflex assay", - "oxBS-seq", - "oxygen consumption assay", - "pattern electroretinogram", - "perineurial cell thickness", - "phase-contrast microscopy", - "polymerase chain reaction", - "positron emission tomography", - "quantitative PCR", - "questionnaire", - "reactive oxygen species assay", - "reporter gene assay", - "rheometry", - "ribo-seq", - "Riccardi and Ablon scales", - "RNA array", - "RNA-seq", - "rotarod performance test", - "RPPA", - "sandwich ELISA", - "Sanger sequencing", - "scCGI-seq", - "single-cell RNA-seq", - "single molecule drug screen assay", - "small molecule library screen", - "SNP array", - "sorbitol dehydrogenase activity level assay", - "spatial frequency domain imaging", - "spatial transcriptomics", - "static light scattering", - "survival", - "SUSHI", - "T cell receptor repertoire sequencing", - "TMT quantitation", - "traction force microscopy", - "twin spot assay", - "ultra high-performance liquid chromatography/tandem mass spectrometry", - "western blot", - "whole-cell patch clamp", - "whole exome sequencing", - "whole genome sequencing" - ] - } - } -} diff --git a/registered-json-schemas/superdataset.json b/registered-json-schemas/superdataset.json deleted file mode 100644 index 03f55772..00000000 --- a/registered-json-schemas/superdataset.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-superdataset", - "properties": { - "assay": { - "enum": [ - "2D AlamarBlue absorbance", - "2D AlamarBlue fluorescence", - "2D CellTiter-Glo", - "2D Incucyte", - "3D confocal imaging", - "3D electron microscopy", - "3D imaging", - "3D microtissue viability", - "active avoidance learning behavior assay", - "array", - "ATAC-seq", - "atomic force microscopy", - "ATPase activity assay", - "autoradiography", - "bisulfite sequencing", - "blood chemistry measurement", - "blue native PAGE", - "body size trait measurement", - "brightfield microscopy", - "calcium retention capacity assay", - "cell competition", - "cell count", - "cell proliferation", - "cell viability assay", - "ChIP-seq", - "combination library screen", - "combination screen", - "compound screen", - "contextual conditioning behavior assay", - "conventional MRI", - "CUT&RUN", - "differential scanning calorimetry", - "DNA optical mapping", - "dynamic light scattering", - "electrochemiluminescence", - "elevated plus maze test", - "ELISA", - "ERR bisulfite sequencing", - "FIA-MSMS", - "flow cytometry", - "focus forming assay", - "FTIR spectroscopy", - "functional MRI", - "gait measurement", - "gel filtration chromatography", - "genotyping", - "HI-C", - "high content screen", - "high frequency ultrasound", - "high-performance liquid chromatography/tandem mass spectrometry", - "HPLC", - "immunoassay", - "immunocytochemistry", - "immunofluorescence", - "immunohistochemistry", - "in vitro tumorigenesis", - "in vivo bioluminescence", - "in vivo PDX viability", - "in vivo tumor growth", - "ISO-seq", - "label free mass spectrometry", - "laser speckle imaging", - "light scattering assay", - "liquid chromatography-electrochemical detection", - "liquid chromatography/mass spectrometry", - "liquid chromatography/tandem mass spectrometry", - "lncRNA-seq", - "local field potential recording", - "long term potentiation assay", - "magnetic resonance spectroscopy", - "massively parallel reporter assay", - "mass spectrometry", - "Matrigel-based tumorigenesis assay", - "methylation array", - "MIB/MS", - "miRNA array", - "miRNA-seq", - "mRNA counts", - "MudPIT", - "next generation targeted sequencing", - "NOMe-seq", - "novelty response behavior assay", - "open field test", - "optical coherence tomography", - "optokinetic reflex assay", - "oxBS-seq", - "oxygen consumption assay", - "pattern electroretinogram", - "perineurial cell thickness", - "phase-contrast microscopy", - "polymerase chain reaction", - "positron emission tomography", - "quantitative PCR", - "questionnaire", - "reactive oxygen species assay", - "reporter gene assay", - "rheometry", - "ribo-seq", - "Riccardi and Ablon scales", - "RNA array", - "RNA-seq", - "rotarod performance test", - "RPPA", - "sandwich ELISA", - "Sanger sequencing", - "scCGI-seq", - "single-cell RNA-seq", - "single molecule drug screen assay", - "small molecule library screen", - "SNP array", - "sorbitol dehydrogenase activity level assay", - "spatial frequency domain imaging", - "spatial transcriptomics", - "static light scattering", - "survival", - "SUSHI", - "T cell receptor repertoire sequencing", - "TMT quantitation", - "traction force microscopy", - "twin spot assay", - "ultra high-performance liquid chromatography/tandem mass spectrometry", - "western blot", - "whole-cell patch clamp", - "whole exome sequencing", - "whole genome sequencing" - ] - } - }, - "if": { - "properties": { - "concreteType": { - "const": "org.sagebionetworks.repo.model.Folder" - } - }, - "not": { - "properties": { - "name": { - "const": "Raw Data" - } - } - } - }, - "then": { - "properties": { - "contentType": { - "const": "dataset" - } - } - } -} diff --git a/utils/enumerate.sh b/utils/enumerate.sh new file mode 100755 index 00000000..9efd4e98 --- /dev/null +++ b/utils/enumerate.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# Extract enums as JSON array +class="bts:$1" + +cat NF.jsonld | jq --arg class "$class" '(."@graph"[] | select(."@id" == $class)."schema:rangeIncludes"[]."@id") as $ids | ."@graph"[] | select(."@id"|IN($ids))."sms:displayName"' | sort --ignore-case | jq -n '[inputs]'