Skip to content

Commit

Permalink
Created prelim yaml file for PortalPublication (#542)
Browse files Browse the repository at this point in the history
* Created prelim yaml file for PortalPublication

* Rebuild NF.jsonld, json

* Add compilation step

* Created a parent publication model and an nf specific model. Anh nyuget edits were also incorporated

* Rebuild NF.jsonld, json

* Updated PortalPublication with new Enum for StudyUse

* Rebuild NF.jsonld, json

* fixed string vs int for pmid

* Fixed string vs int for pmid

* Rebuild NF.jsonld, json

* Update make step

* Rebuild NF.jsonld, json

* Made requested changes to PortalPublication model, along with fixed typos

* Rebuild NF.jsonld, json

* Update Makefile, make final revisions, recompile

* Rebuild NF.jsonld, json

---------

Co-authored-by: nf-osi[bot] <[email protected]>
Co-authored-by: Anh Nguyet Vu <[email protected]>
Co-authored-by: Anh Nguyet Vu <[email protected]>
  • Loading branch information
4 people authored Nov 25, 2024
1 parent 15a0c13 commit 4c2a051
Show file tree
Hide file tree
Showing 5 changed files with 542 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ---"
307 changes: 307 additions & 0 deletions NF.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
18 changes: 18 additions & 0 deletions modules/Other/PublicationEnum.yaml
Original file line number Diff line number Diff line change
@@ -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:
Loading

0 comments on commit 4c2a051

Please sign in to comment.