diff --git a/build.gradle b/build.gradle index c837b477..492165a5 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group "org.nrg.xnatx.plugins" -version "1.5.0" +version "1.5.1" description "PIXI Plugin for XNAT." repositories { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f371643e..a5952066 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/org/nrg/xnatx/plugins/pixi/xenografts/services/impl/HibernateCellLineEntityService.java b/src/main/java/org/nrg/xnatx/plugins/pixi/xenografts/services/impl/HibernateCellLineEntityService.java index 9c9c1da2..babb8a27 100644 --- a/src/main/java/org/nrg/xnatx/plugins/pixi/xenografts/services/impl/HibernateCellLineEntityService.java +++ b/src/main/java/org/nrg/xnatx/plugins/pixi/xenografts/services/impl/HibernateCellLineEntityService.java @@ -29,12 +29,16 @@ public boolean hasSubjectReferences(final String sourceId) { @Override protected CellLine toDTO(CellLineEntity cellLineEntity) { - return CellLine.builder() + CellLine cell = CellLine.builder() .sourceId(cellLineEntity.getSourceId()) .source(cellLineEntity.getSource()) .sourceURL(cellLineEntity.getSourceURL()) .createdBy(cellLineEntity.getCreatedBy()) .build(); + cell.setPrimarySite(cellLineEntity.getPrimarySite()); + cell.setTumorType(cellLineEntity.getTumorType()); + return cell; + } @Override @@ -50,5 +54,7 @@ protected void updateEntity(CellLineEntity cellLineEntity, CellLine cellLine) { cellLineEntity.setSource(cellLine.getSource()); cellLineEntity.setSourceURL(cellLine.getSourceURL()); cellLineEntity.setCreatedBy(cellLine.getCreatedBy()); + cellLineEntity.setTumorType(cellLine.getTumorType()); + cellLineEntity.setPrimarySite(cellLine.getPrimarySite()); } } diff --git a/src/main/resources/META-INF/resources/scripts/xnat/plugin/pixi/pixi-xenograft.js b/src/main/resources/META-INF/resources/scripts/xnat/plugin/pixi/pixi-xenograft.js index f92a5cb0..c0869fda 100644 --- a/src/main/resources/META-INF/resources/scripts/xnat/plugin/pixi/pixi-xenograft.js +++ b/src/main/resources/META-INF/resources/scripts/xnat/plugin/pixi/pixi-xenograft.js @@ -106,6 +106,18 @@ XNAT.plugin.pixi.pdxs = getObject(XNAT.plugin.pixi.pdxs || {}); label: self.xenograftType + ' URL', id: 'sourceURL', description: 'Optional: A link to this ' + self.xenograftType + ' at the data source provider (if available).' + }).element, + XNAT.ui.panel.input.text({ + name: 'tumorType', + label: self.xenograftType + ' Tumor Type', + id: 'tumorType', + description: 'Optional: Tumor type' + }).element, + XNAT.ui.panel.input.text({ + name: 'primarySite', + label: self.xenograftType + ' Primary Site', + id: 'primarySite', + description: 'Optional: Primary Site' }).element ]; } @@ -148,6 +160,8 @@ XNAT.plugin.pixi.pdxs = getObject(XNAT.plugin.pixi.pdxs || {}); const sourceIdEl = document.getElementById("sourceId"); const sourceEl = document.getElementById("source"); const sourceURLEl = document.getElementById("sourceURL"); + const tumorTypeEl = document.getElementById("tumorType"); + const primarySiteEl = document.getElementById("primarySite"); // validator for sourceId (i.e. PDX ID and Cell Line ID) let validateSourceId = XNAT.validate(sourceIdEl).reset().chain(); @@ -182,10 +196,12 @@ XNAT.plugin.pixi.pdxs = getObject(XNAT.plugin.pixi.pdxs || {}); let xenograftToSubmit = { sourceId: sourceIdEl.value, source: sourceEl.value, - sourceURL: sourceURLEl.value + sourceURL: sourceURLEl.value, + tumorType: tumorTypeEl.value, + primarySite: primarySiteEl.value }; - if (self.xenograftType === "PDX") { + if (self.xenograftType === "Patient-Derived Tumor") { const storageEl = document.getElementById("storage"); xenograftToSubmit['storage'] = storageEl.value; } diff --git a/src/main/resources/schemas/pixi/display/pixi_cellLineData_display.xml b/src/main/resources/schemas/pixi/display/pixi_cellLineData_display.xml index e704d5db..3e83389d 100644 --- a/src/main/resources/schemas/pixi/display/pixi_cellLineData_display.xml +++ b/src/main/resources/schemas/pixi/display/pixi_cellLineData_display.xml @@ -47,6 +47,12 @@ + + + + + + @@ -133,6 +139,8 @@ + + @@ -153,6 +161,8 @@ + + @@ -161,6 +171,8 @@ + + @@ -170,6 +182,8 @@ + + @@ -180,6 +194,12 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/schemas/pixi/display/pixi_pdxData_display.xml b/src/main/resources/schemas/pixi/display/pixi_pdxData_display.xml index 1873aba0..66d330ee 100644 --- a/src/main/resources/schemas/pixi/display/pixi_pdxData_display.xml +++ b/src/main/resources/schemas/pixi/display/pixi_pdxData_display.xml @@ -47,6 +47,12 @@ + + + + + + @@ -137,6 +143,8 @@ + + @@ -149,6 +157,8 @@ + + @@ -161,6 +171,8 @@ + + @@ -171,6 +183,8 @@ + + @@ -182,6 +196,8 @@ + + @@ -194,6 +210,12 @@ + + + + + + \ No newline at end of file