diff --git a/Makefile b/Makefile index 054993d0..2adf93cd 100644 --- a/Makefile +++ b/Makefile @@ -43,3 +43,11 @@ PortalStudy: Superdataset: jq '.schema += input | del('.schema.required') | .schema["$$id"] = "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-superdataset"' registered-json-schemas/PortalDataset.json registered-json-schemas/super_rules.json > registered-json-schemas/Superdataset.json +PortalPublication: + yq ea '. as $$item ireduce ({}; . * $$item )' modules/DCC/Portal.yaml modules/Other/PublicationEnum.yaml > relevant_enums.yaml + cat header.yaml modules/Template/PortalPublication.yaml relevant_enums.yaml > temp.yaml + gen-json-schema --top-class=PortalPublication --no-metadata --not-closed --title-from=title temp.yaml > tmp.json + json-dereference -s tmp.json -o tmp.json + jq '."$$defs".PortalPublication | ."$$id"="https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-portalpublication"' tmp.json > registered-json-schemas/PortalPublication.json + rm -f tmp.json temp.yaml relevant_enums.yaml + @echo "--- Saved registered-json-schemas/PortalPublication.json ---" diff --git a/NF.jsonld b/NF.jsonld index 77c96a3e..eb14061e 100644 --- a/NF.jsonld +++ b/NF.jsonld @@ -755,6 +755,23 @@ "sms:required": "sms:false", "sms:validationRules": [] }, + { + "@id": "bts:PublicationAccessibilityEnum", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "PublicationAccessibilityEnum", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "PublicationAccessibilityEnum", + "sms:required": "sms:false", + "sms:validationRules": [] + }, { "@id": "bts:Metadata", "@type": "rdfs:Class", @@ -1095,6 +1112,23 @@ "sms:required": "sms:false", "sms:validationRules": [] }, + { + "@id": "bts:PublicationTypeEnum", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "PublicationTypeEnum", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "PublicationTypeEnum", + "sms:required": "sms:false", + "sms:validationRules": [] + }, { "@id": "bts:Resource", "@type": "rdfs:Class", @@ -34800,6 +34834,154 @@ "sms:required": "sms:true", "sms:validationRules": [] }, + { + "@id": "bts:PublicationTemplate", + "@type": "rdfs:Class", + "rdfs:comment": "A generalized data model template for Publications to be hopefully used across dccs", + "rdfs:label": "PublicationTemplate", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "PublicationTemplate", + "sms:required": "sms:false", + "sms:requiresDependency": [ + { + "@id": "bts:GrantNumber" + }, + { + "@id": "bts:Doi" + }, + { + "@id": "bts:Journal" + }, + { + "@id": "bts:Pmid" + }, + { + "@id": "bts:Title" + }, + { + "@id": "bts:Year" + }, + { + "@id": "bts:Author" + }, + { + "@id": "bts:Abstract" + }, + { + "@id": "bts:Accessibility" + } + ], + "sms:validationRules": [] + }, + { + "@id": "bts:GrantNumber", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "GrantNumber", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "grantNumber", + "sms:required": "sms:false", + "sms:validationRules": [] + }, + { + "@id": "bts:Journal", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "Journal", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "journal", + "sms:required": "sms:false", + "sms:validationRules": [] + }, + { + "@id": "bts:Pmid", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "Pmid", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "pmid", + "sms:required": "sms:false", + "sms:validationRules": [] + }, + { + "@id": "bts:Year", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "Year", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "year", + "sms:required": "sms:false", + "sms:validationRules": [] + }, + { + "@id": "bts:Abstract", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "Abstract", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "abstract", + "sms:required": "sms:false", + "sms:validationRules": [] + }, + { + "@id": "bts:Accessibility", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "Accessibility", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "accessibility", + "sms:required": "sms:false", + "sms:validationRules": [] + }, { "@id": "bts:MassSpecAssayTemplate", "@type": "rdfs:Class", @@ -36227,6 +36409,80 @@ ], "sms:validationRules": [] }, + { + "@id": "bts:PortalPublication", + "@type": "rdfs:Class", + "rdfs:comment": "A slightly more specialized publication concept intended for the specific scope of the NF Portal.", + "rdfs:label": "PortalPublication", + "rdfs:subClassOf": [ + { + "@id": "bts:PublicationTemplate" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "PortalPublication", + "sms:required": "sms:false", + "sms:requiresDependency": [ + { + "@id": "bts:PublicationType" + }, + { + "@id": "bts:DiseaseFocus" + }, + { + "@id": "bts:Dataset" + }, + { + "@id": "bts:Manifestation" + }, + { + "@id": "bts:FundingAgency" + }, + { + "@id": "bts:StudyId" + }, + { + "@id": "bts:StudyName" + } + ], + "sms:validationRules": [] + }, + { + "@id": "bts:PublicationType", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "PublicationType", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "publicationType", + "sms:required": "sms:false", + "sms:validationRules": [] + }, + { + "@id": "bts:Dataset", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "Dataset", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "dataset", + "sms:required": "sms:false", + "sms:validationRules": [] + }, { "@id": "bts:GenomicsAssayTemplateExtended", "@type": "rdfs:Class", @@ -39699,6 +39955,23 @@ "sms:required": "sms:false", "sms:validationRules": [] }, + { + "@id": "bts:Secondary", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "Secondary", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "Secondary", + "sms:required": "sms:false", + "sms:validationRules": [] + }, { "@id": "bts:Braindevelopment", "@type": "rdfs:Class", @@ -39835,6 +40108,23 @@ "sms:required": "sms:false", "sms:validationRules": [] }, + { + "@id": "bts:RestrictedAccess", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "RestrictedAccess", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "Restricted Access", + "sms:required": "sms:false", + "sms:validationRules": [] + }, { "@id": "bts:ODC-ODbL", "@type": "rdfs:Class", @@ -39971,6 +40261,23 @@ "sms:required": "sms:false", "sms:validationRules": [] }, + { + "@id": "bts:Primary", + "@type": "rdfs:Class", + "rdfs:comment": "TBD", + "rdfs:label": "Primary", + "rdfs:subClassOf": [ + { + "@id": "bts:Thing" + } + ], + "schema:isPartOf": { + "@id": "http://schema.biothings.io" + }, + "sms:displayName": "Primary", + "sms:required": "sms:false", + "sms:validationRules": [] + }, { "@id": "bts:CC-BY", "@type": "rdfs:Class", diff --git a/modules/Other/PublicationEnum.yaml b/modules/Other/PublicationEnum.yaml new file mode 100644 index 00000000..09d362a3 --- /dev/null +++ b/modules/Other/PublicationEnum.yaml @@ -0,0 +1,18 @@ +enums: + PublicationTypeEnum: + permissible_values: + Primary: + description: This publication is used as a primary publication for the dataset + meaning: + Secondary: + description: This publication is used as a secondary publication for the dataset + meaning: + + PublicationAccessibilityEnum: + permissible_values: + Open Access: + description: This publication is open access + meaning: + Restricted Access: + description: This publication is restricted access + meaning: diff --git a/modules/Template/PortalPublication.yaml b/modules/Template/PortalPublication.yaml new file mode 100644 index 00000000..1c7a7b4c --- /dev/null +++ b/modules/Template/PortalPublication.yaml @@ -0,0 +1,89 @@ +####################################### +# Portal +####################################### + +# Note: this template definition uses the alternate syntax with 'attribute' + +classes: + PublicationTemplate: + description: A generalized data model template for Publications to be hopefully used across dccs + notes: + - This structure is based on a CSV file from MC2 annotations with customized fields as attributes. + attributes: + grantNumber: + title: Grant Number + range: string + required: false + doi: + title: Digital Object Identifier + range: string + required: true + journal: + title: Journal + range: string + required: true + pmid: + title: PubMed ID + range: string + required: true + title: + title: Title + range: string + required: true + year: + title: Year + range: integer + required: true + author: + title: Author(s) + range: string + multivalued: true + required: true + abstract: + title: Abstract + range: string + required: true + accessibility: + title: Accessibility + range: PublicationAccessibilityEnum + required: false + + PortalPublication: + is_a: PublicationTemplate + description: A slightly more specialized publication concept intended for the specific scope of the NF Portal. + attributes: + publicationType: + title: Publication Type + description: > + Type of publication in relation to the linked study on the NF Portal. + A primary publication is the main publication for the study and may describe data or resources generated from the study. + A secondary publication references or describes reuse of resources for the linked study. + range: PublicationTypeEnum + required: true + diseaseFocus: + title: Disease Focus + range: DiseaseFocusEnum + multivalued: true + required: false + dataset: + title: Linked Datasets + range: string + multivalued: true + required: false + manifestation: + title: Manifestation + range: string + required: false + fundingAgency: + title: Linked Funder(s) + range: string + multivalued: true + required: true + studyId: + title: Linked Study ID + range: string + required: true + studyName: + title: Linked Study Name + range: string + required: true diff --git a/registered-json-schemas/PortalPublication.json b/registered-json-schemas/PortalPublication.json new file mode 100644 index 00000000..96b5606c --- /dev/null +++ b/registered-json-schemas/PortalPublication.json @@ -0,0 +1,120 @@ +{ + "additionalProperties": false, + "description": "A slightly more specialized publication concept intended for the specific scope of the NF Portal.", + "properties": { + "abstract": { + "title": "Abstract", + "type": "string" + }, + "accessibility": { + "title": "Accessibility", + "description": "", + "enum": [ + "Open Access", + "Restricted Access" + ], + "type": "string" + }, + "author": { + "items": { + "type": "string" + }, + "title": "Author(s)", + "type": "array" + }, + "dataset": { + "items": { + "type": "string" + }, + "title": "Linked Datasets", + "type": "array" + }, + "diseaseFocus": { + "items": { + "description": "", + "enum": [ + "Neurofibromatosis type 1", + "NF2-related schwannomatosis", + "SMARCB1-related schwannomatosis", + "LZTR1-related schwannomatosis", + "22q-related schwannomatosis", + "Schwannomatosis-NOS", + "Schwannomatosis-NEC", + "Multiple" + ], + "title": "Disease Focus", + "type": "string" + }, + "title": "Disease Focus", + "type": "array" + }, + "doi": { + "title": "Digital Object Identifier", + "type": "string" + }, + "fundingAgency": { + "items": { + "type": "string" + }, + "title": "Linked Funder(s)", + "type": "array" + }, + "grantNumber": { + "title": "Grant Number", + "type": "string" + }, + "journal": { + "title": "Journal", + "type": "string" + }, + "manifestation": { + "title": "Manifestation", + "type": "string" + }, + "pmid": { + "title": "PubMed ID", + "type": "string" + }, + "publicationType": { + "description": "Type of publication in relation to the linked study on the NF Portal. A primary publication is the main publication for the study and may describe data or resources generated from the study. A secondary publication references or describes reuse of resources for the linked study.\n", + "title": "Publication Type", + "enum": [ + "Primary", + "Secondary" + ], + "type": "string" + }, + "studyId": { + "title": "Linked Study ID", + "type": "string" + }, + "studyName": { + "title": "Linked Study Name", + "type": "string" + }, + "title": { + "title": "Title", + "type": "string" + }, + "year": { + "title": "Year", + "type": "integer" + } + }, + "required": [ + "publicationType", + "fundingAgency", + "studyId", + "studyName", + "doi", + "journal", + "pmid", + "title", + "year", + "author", + "abstract" + ], + "title": "PortalPublication", + "type": "object", + "$id": "https://repo-prod.prod.sagebase.org/repo/v1/schema/type/registered/org.synapse.nf-portalpublication" +}