diff --git a/src/App.vue b/src/App.vue index 202b5a008e4674a6cddf97e52cd224f723a1eede..794fed2460215195e33b711ebe8ec1c7d756be49 100644 --- a/src/App.vue +++ b/src/App.vue @@ -267,8 +267,8 @@ export default { }, members: [], - pid: "o:582674", - //pid: "o:582678",thhis is the assay one + pid: "o:584804", + piddoc: {}, collection: "", sampleCollection: "", @@ -834,8 +834,11 @@ export default { this.form.sections[2].categories[2].fields.push( fields.getField("0-Small-molecule") ); + this.form.sections[2].categories[2].fields.push( + fields.getField("0-Organism-assayTarget") + ); var organism_assayTarget = fields.getField("0-Organism"); - organism_assayTarget.type = "skos:Concept"; + organism_assayTarget.label = "Assay Target Organism"; organism_assayTarget.subjectType = "organism_assayTarget"; organism_assayTarget.visible = false; @@ -849,7 +852,8 @@ export default { var cell_organism_assayTarget = fields.getField("0-Cellular-organism"); //cell_organism_assayTarget.description = ["Cellular organism", "Organism"]; cell_organism_assayTarget.label = "Assay Target Cellular Organism"; - cell_organism_assayTarget.subjectType = "cellular_organism_assayTarget"; + cell_organism_assayTarget.type = + "pharmaWien:cellular_organism_assayTarget"; cell_organism_assayTarget.category = ["organismAssayTarget"]; // cell_organism_assayTarget.topcategory = "assayTarget"; cell_organism_assayTarget.visible = false; @@ -859,7 +863,8 @@ export default { var viruses_organism_assayTarget = fields.getField("0-Viruses"); //viruses_organism_assayTarget.description = ["Viruses", "Organism"]; viruses_organism_assayTarget.label = "Assay Target Viruses"; - viruses_organism_assayTarget.subjectType = "viruses_assayTarget"; + viruses_organism_assayTarget.type = + "pharmaWien:viruses_organism_assayTarget"; // cell_organism_assayTarget.topcategory = "assayTarget"; viruses_organism_assayTarget.category = ["organismAssayTarget"]; @@ -870,7 +875,8 @@ export default { var viroids_organism_assayTarget = fields.getField("0-Viroids"); //viroids_organism_assayTarget.description = ["Viroids", "Organism"]; viroids_organism_assayTarget.label = "Assay Target Viroids"; - viroids_organism_assayTarget.subjectType = "viroids_assayTarget"; + viroids_organism_assayTarget.subjectType = + "pharmaWien:viroids_organism_assayTarget"; viroids_organism_assayTarget.category = ["organismAssayTarget"]; // cell_organism_assayTarget.topcategory = "assayTarget"; viroids_organism_assayTarget.visible = false; diff --git a/src/components/display/pharma_display/PhDJsonld.vue b/src/components/display/pharma_display/PhDJsonld.vue index 2065a1544fca0877fc730e87166c7a977d5d4de8..5c42badf50b582da142fd5303faf9a34fce9dbd9 100644 --- a/src/components/display/pharma_display/PhDJsonld.vue +++ b/src/components/display/pharma_display/PhDJsonld.vue @@ -453,7 +453,7 @@ export default { n_subjects[i].data = subjects[i]; } - //console.log("pharmaData", n_subjects); + console.log("pharmaData", n_subjects); return n_subjects; } }, @@ -548,6 +548,7 @@ export default { var elem = this.pharmaData.filter( pharmaData => pharmaData.category === cat ); + return elem; }, getSelectionElem: function(categ, selection) { diff --git a/src/components/input/pharma-input-fields/PhInputForm.vue b/src/components/input/pharma-input-fields/PhInputForm.vue index d4e61954f42a10da7be72f15a34bf712caf540d3..554088bd59b745405a1e1407d5ef6dd73c9a4ce8 100644 --- a/src/components/input/pharma-input-fields/PhInputForm.vue +++ b/src/components/input/pharma-input-fields/PhInputForm.vue @@ -186,7 +186,7 @@ :text="'skos:prefLabel'" :nested="['@value']" v-on:input-select="f.value=$event;updateSubfields(f.multiplicable,c.fields,f)" - :freeText="{'@type': [f.subjectType],'skos:prefLabel': [{'@value':''}]}" + :freeText="{'@type': [f.type],'skos:prefLabel': [{'@value':''}]}" ></ph-selection> </v-flex> @@ -569,9 +569,9 @@ export default { } } return w; - } + }, - /*selectInput: function(f, event) { + selectInput: function(f, event) { if (event) { f.value = event["@id"]; if (event["@type"]) { @@ -595,7 +595,7 @@ export default { f["skos:prefLabel"] = []; } this.$emit("form-input-" + f.component, f); - },*/ + } }, mounted: function() { this.$store.dispatch("loadLanguages"); diff --git a/src/store/modules/vocabulary.js b/src/store/modules/vocabulary.js index 7b638d212b847b1475ab7200be23e1859427f101..bfd1fe8affac8244f45e10198e67bfbee2ce8ea6 100644 --- a/src/store/modules/vocabulary.js +++ b/src/store/modules/vocabulary.js @@ -497,7 +497,7 @@ const state = { assay_organism: { terms: [ { - "@type": "skos:Concept", + "@type": "pharmaWien:assayOrg", "skos:prefLabel": [ { "@value": "Cellular organism", @@ -507,7 +507,7 @@ const state = { "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_131567"] }, { - "@type": "skos:Concept", + "@type": "pharmaWien:assayOrg", "skos:prefLabel": [ { "@value": "Viruses", @@ -517,7 +517,42 @@ const state = { "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_10239"] }, { - "@type": "skos:Concept", + "@type": "pharmaWien:assayOrg", + "skos:prefLabel": [ + { + "@value": "Viroids", + "@language": "eng" + } + ], + "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_12884"] + } + ], + loaded: true + }, + assayTarget_organism: { + terms: [ + { + "@type": "pharmaWien:assayOrg_assayTarget", + "skos:prefLabel": [ + { + "@value": "Cellular organism", + "@language": "eng" + } + ], + "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_131567"] + }, + { + "@type": "pharmaWien:assayOrg_assayTarget", + "skos:prefLabel": [ + { + "@value": "Viruses", + "@language": "eng" + } + ], + "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_10239"] + }, + { + "@type": "pharmaWien:assayOrg_assayTarget", "skos:prefLabel": [ { "@value": "Viroids", @@ -527,13 +562,12 @@ const state = { "skos:exactMatch": ["http://purl.obolibrary.org/obo/NCBITaxon_12884"] } ], - loaded: true }, assay_detection: { terms: [ { - "@type": "skos:Concept", + "@type": "pharmaWien:assayDetection", "skos:prefLabel": [ { "@value": "Physical detection method", @@ -543,7 +577,7 @@ const state = { "skos:exactMatch": ["http://www.bioassayontology.org/bao#BAO_0000035"] }, { - "@type": "skos:Concept", + "@type": "pharmaWien:assayDetection", "skos:prefLabel": [ { "@value": "Detection instrument", diff --git a/src/utils/fields.js b/src/utils/fields.js index a83a58dcb0ec151e793651caf94643b5ff72e2c5..4d5fc7edd9e2712356faf6741288a17cfcf5cf9f 100644 --- a/src/utils/fields.js +++ b/src/utils/fields.js @@ -216,7 +216,7 @@ const fields = [ id: "1-Isoform", predicate: "dcterms:subject", type: "pharmaWien:isoform_protein", - subjectType: "isoform", + //subjectType: "isoform", label: "Isoform:", value: "", required: false, @@ -234,7 +234,7 @@ const fields = [ id: "1-Protein-sequence-alteration", predicate: "dcterms:subject", type: "pharmaWien:proteinSequenceAlteration_protein", - subjectType: "ProteinSequenceAlteration", + //subjectType: "ProteinSequenceAlteration", label: "Protein Sequence alteration:", value: "", required: false, @@ -252,7 +252,7 @@ const fields = [ id: "1-Protein-modification", predicate: "dcterms:subject", type: "pharmaWien:proteinModifaction_protein", - subjectType: "ProteinModifaction", + //subjectType: "ProteinModifaction", label: "Protein modifaction:", value: "", required: false, @@ -712,6 +712,7 @@ const fields = [ ontology: "mondo", topId: "MONDO_0000001", ontClass: "", + category: ["disease"], //ontClass: "MONDO_0000001", //ontClass: "MONDO_0000620", //baseurl: "http://purl.obolibrary.org/obo/", @@ -1031,6 +1032,7 @@ const fields = [ ontClass: "NCIT_C16847", topId: "NCIT_C16847", description: "Research technique:", + category: ["technique"], freefield: true, infoRef: "http://www.ontobee.org/ontology/NCIT?iri=http://purl.obolibrary.org/obo/NCIT_C20368", @@ -1051,6 +1053,7 @@ const fields = [ ontClass: "NCIT_C19160", topId: "NCIT_C19160", freefield: true, + category: ["discipline"], description: "Occupation or Discipline:", infoRef: "http://purl.obolibrary.org/obo/NCIT_C19160", info: "Info here " @@ -1250,6 +1253,27 @@ const fields = [ "The organism related to the target / meta-target of the bioassay. It includes both bacterium and eukaryote.", infoRef: "BAO:0000551" }, + { + id: "0-Organism-assayTarget", + predicate: "dcterms:subject", + type: "skos:Concept", + //subjectType: "AssayOrganism:", + label: "Assay Target Organism", + description: "Organism", + value: "", + component: "selection", + freefield: false, + commit: true, + visible: false, + vocabulary: "assayTarget_organism", + stateVoc: "organism_assay_target", + category: ["assayTarget"], + subcategory: ["organismAssayTarget"], + multiplicable: true, + info: + "The organism related to the target / meta-target of the bioassay. It includes both bacterium and eukaryote.", + infoRef: "BAO:0000551" + }, { id: "0-Cellular-organism", predicate: "dcterms:subject", @@ -1424,7 +1448,7 @@ const fields = [ id: "0-detection", predicate: "dcterms:subject", type: "skos:Concept", - subjectType: "assay_detection", + //subjectType: "assay_detection", label: "Detection method:", description: "selection", value: "", @@ -1446,8 +1470,8 @@ const fields = [ { id: "0-detection_method", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "physical_detection_method", + type: "pharmaWien:physicalDetectionMethod", + //subjectType: "physical_detection_method", label: "Physical detection method:", value: "", required: false, @@ -1466,8 +1490,8 @@ const fields = [ { id: "0-detection_instrument", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "detection_instrument", + type: "pharmaWien:physicalDetectionInstrument", + //subjectType: "detection_instrument", label: "Detection instrument:", value: "", required: false, @@ -1585,7 +1609,7 @@ export default { }, getFieldbySubject: function(subject) { for (var i = 0; i < fields.length; i++) { - if (fields[i]["subjectType"] === subject) { + if (fields[i]["type"] === subject) { var field = JSON.parse(JSON.stringify(fields[i])); field.id = field.id + "_" + uuid.generate(); return field;