From fb16b7264598bda34f96719572ebc9264b125413 Mon Sep 17 00:00:00 2001 From: jrmartin Date: Fri, 27 Oct 2017 15:13:49 -0700 Subject: [PATCH] clean scripts for fewer js errors --- src/main/resources/projects/CA1/3.json | 55 ++++++++++---- src/main/resources/projects/CA1/script.js | 11 --- .../projects/CElegansMuscleModel/4.json | 24 ++++++- .../projects/EyeWireGanglionCell/9.json | 52 ++++++++++---- .../projects/EyeWireGanglionCell/script.js | 21 +++--- ...Networkcadb5b76a8857af6815e279d2f2ea674.js | 1 - .../projects/cElegansConnectome/16.json | 72 ++++++++++++------- 7 files changed, 155 insertions(+), 81 deletions(-) diff --git a/src/main/resources/projects/CA1/3.json b/src/main/resources/projects/CA1/3.json index 373506b7..cf388a9f 100644 --- a/src/main/resources/projects/CA1/3.json +++ b/src/main/resources/projects/CA1/3.json @@ -1,16 +1,41 @@ -{ "activeExperimentId" : 1, - "experiments" : [ { "aspectConfigurations" : [ ], - "description" : "Hippocampus CA1 pyramidal cell from M. Migliore, M. Ferrante, GA Ascoli (2005). The model shows how the back- and forward propagation of action potentials in the oblique dendrites of CA1 neurons could be modulated by local properties such as morphology or active conductances. The model was converted to NeuroML (Source: Open Source Brain)", - "id" : 1, - "lastModified" : "1436102517799", - "name" : "CA1 Experiment", - "script" : "/projects/CA1/script.js", - "status" : "COMPLETED" - } ], - "geppettoModel" : { "id" : 9, - "type" : "GEPPETTO_PROJECT", - "url" : "/projects/CA1/GeppettoModel.xmi" - }, - "id" : 3, - "name" : "CA1 Pyramidal Cell" +{ "activeExperimentId" : 1, + "experiments" : [ { "aspectConfigurations" : [ ], + "view": { + "id": 1, + "viewStates": { + "views": { + "TreeVisualiserDAT1": { + "widgetType": 3, + "isWidget": true, + "transparentBackground": false, + "name": "Hippocampus CA1 pyramidal cell model", + "size": { + "height": 448, + "width": 452 + }, + "position": { + "left": 147, + "top": 90 + }, + "dataType": "object", + "data": [ + "ca1.getType()" + ] + } + } + } + }, + "description" : "Hippocampus CA1 pyramidal cell from M. Migliore, M. Ferrante, GA Ascoli (2005). The model shows how the back- and forward propagation of action potentials in the oblique dendrites of CA1 neurons could be modulated by local properties such as morphology or active conductances. The model was converted to NeuroML (Source: Open Source Brain)", + "id" : 1, + "lastModified" : "1436102517799", + "name" : "CA1 Experiment", + "script" : "/projects/CA1/script.js", + "status" : "COMPLETED" + } ], + "geppettoModel" : { "id" : 9, + "type" : "GEPPETTO_PROJECT", + "url" : "/projects/CA1/GeppettoModel.xmi" + }, + "id" : 3, + "name" : "CA1 Pyramidal Cell" } \ No newline at end of file diff --git a/src/main/resources/projects/CA1/script.js b/src/main/resources/projects/CA1/script.js index ed27ac96..e69de29b 100644 --- a/src/main/resources/projects/CA1/script.js +++ b/src/main/resources/projects/CA1/script.js @@ -1,11 +0,0 @@ -G.addWidget(3,{isStateless:true}).setData(ca1.getType(),{expandNodes:true}); -TreeVisualiserDAT1.setPosition(147,90); -TreeVisualiserDAT1.setSize(448,452); -TreeVisualiserDAT1.setName("Hippocampus CA1 pyramidal cell model"); - -Model.neuroml.morphology_CA1.kad_dendrite_group.show(true) -var newPopup = G.addWidget(1,{isStateless:true}); -newPopup.setMessage(Project.getActiveExperiment().getDescription()); -newPopup.setPosition(950,98); -newPopup.setSize(138,500); -newPopup.setName("Description"); \ No newline at end of file diff --git a/src/main/resources/projects/CElegansMuscleModel/4.json b/src/main/resources/projects/CElegansMuscleModel/4.json index d5af4546..66d8fdd7 100644 --- a/src/main/resources/projects/CElegansMuscleModel/4.json +++ b/src/main/resources/projects/CElegansMuscleModel/4.json @@ -15,11 +15,33 @@ "net1.muscle[0].biophys.membraneProperties.ca_boyle_all.iDensity" ] } ], + "view": { + "id": 1, + "viewStates": { + "views": { + "Popup1": { + "widgetType": 1, + "isWidget": true, + "transparentBackground": false, + "name": "Description", + "size": { + "height": 160, + "width": 446 + }, + "position": { + "left": 147, + "top": 90 + }, + "dataType": "stringCommand", + "data": "Project.getActiveExperiment().getDescription()" + } + } + } + }, "description" : "This project is based on the OpenWorm muscle model. This simulates the electrical properties of a single C. elegans body wall muscle cell. The simulation was executed using NEURON. The original version is based on a paper by Boyle & Cohen in 2008.", "id" : 1, "lastModified" : "1436102517799", "name" : "Muscle cell NEURON simulation", - "script" : "/projects/CElegansMuscleModel/script.js", "simulationResults" : [ { "format" : "GEPPETTO_RECORDING", "id" : 1, "result" : { "id" : 1, diff --git a/src/main/resources/projects/EyeWireGanglionCell/9.json b/src/main/resources/projects/EyeWireGanglionCell/9.json index c9763cde..8e98dd91 100644 --- a/src/main/resources/projects/EyeWireGanglionCell/9.json +++ b/src/main/resources/projects/EyeWireGanglionCell/9.json @@ -1,16 +1,38 @@ -{ "activeExperimentId" : 1, - "experiments" : [ { "aspectConfigurations" : [ ], - "description" : "EyeWire is a game to map the brain from Sebastian Seung's Lab at MIT. This citizen science human-based computation game challenges players to map 3D neurons in a retina. Geppetto is visualizing in 3D a morphology of a Ganglion cell that was reconstructed using the game.", - "id" : 1, - "lastModified" : "1436102517799", - "name" : "Only morphology, no simulation", - "script" : "/projects/EyeWireGanglionCell/script.js", - "status" : "COMPLETED" - } ], - "geppettoModel" : { "id" : 9, - "type" : "GEPPETTO_PROJECT", - "url" : "/projects/EyeWireGanglionCell/GeppettoModel.xmi" - }, - "id" : 9, - "name" : "Ganglion Cell from EyeWire" +{ "activeExperimentId" : 1, + "experiments" : [ { "aspectConfigurations" : [ ], + "view": { + "id": 1, + "viewStates": { + "views": { + "Popup1": { + "widgetType": 1, + "isWidget": true, + "transparentBackground": false, + "name": "EyeWire Sample", + "size": { + "height": 172, + "width": 394 + }, + "position": { + "left": 147, + "top": 90 + }, + "dataType": "stringCommand", + "data":"Project.getActiveExperiment().getDescription()" + } + } + } + }, + "description" : "EyeWire is a game to map the brain from Sebastian Seung's Lab at MIT. This citizen science human-based computation game challenges players to map 3D neurons in a retina. Geppetto is visualizing in 3D a morphology of a Ganglion cell that was reconstructed using the game.", + "id" : 1, + "lastModified" : "1436102517799", + "name" : "Only morphology, no simulation", + "status" : "COMPLETED" + } ], + "geppettoModel" : { "id" : 9, + "type" : "GEPPETTO_PROJECT", + "url" : "/projects/EyeWireGanglionCell/GeppettoModel.xmi" + }, + "id" : 9, + "name" : "Ganglion Cell from EyeWire" } \ No newline at end of file diff --git a/src/main/resources/projects/EyeWireGanglionCell/script.js b/src/main/resources/projects/EyeWireGanglionCell/script.js index 2e0dd153..a34425d6 100644 --- a/src/main/resources/projects/EyeWireGanglionCell/script.js +++ b/src/main/resources/projects/EyeWireGanglionCell/script.js @@ -1,13 +1,8 @@ -G.addWidget(Widgets.POPUP); -Popup1.setName("EyeWire Sample"); -Popup1.setMessage(Project.getActiveExperiment().getDescription()); -Popup1.setSize(172.80000019073486,394.80000019073486) -Popup1.setPosition(129,77) -G.incrementCameraZoom(-0.16) -G.incrementCameraRotate(0, 0, 0.07) -$(".simulation-controls").children().attr('disabled', 'disabled') -$("#genericHelpBtn").removeAttr('disabled') -G.setCameraPosition(-7197.325,144949.009,101269.908) -G.setCameraRotation(2.961,-1.114,1.791,75645.966) -GEPPETTO.SceneController.setWireframe(true); -G.autoRotate(); \ No newline at end of file +Canvas1.incrementCameraZoom(-0.16) +Canvas1.incrementCameraRotate(0, 0, 0.07) +$(".simulation-controls").children().attr('disabled', 'disabled') +$("#genericHelpBtn").removeAttr('disabled') +Canvas1.setCameraPosition(-7197.325,144949.009,101269.908) +Canvas1.setCameraRotation(2.961,-1.114,1.791,75645.966) +GEPPETTO.SceneController.setWireframe(true); +Canvas1.autoRotate(); \ No newline at end of file diff --git a/src/main/resources/projects/Pharyngeal/PharyngealNetworkcadb5b76a8857af6815e279d2f2ea674.js b/src/main/resources/projects/Pharyngeal/PharyngealNetworkcadb5b76a8857af6815e279d2f2ea674.js index 3b5c405f..e69de29b 100644 --- a/src/main/resources/projects/Pharyngeal/PharyngealNetworkcadb5b76a8857af6815e279d2f2ea674.js +++ b/src/main/resources/projects/Pharyngeal/PharyngealNetworkcadb5b76a8857af6815e279d2f2ea674.js @@ -1 +0,0 @@ -initOSBGeppetto("network", PharyngealNetwork); \ No newline at end of file diff --git a/src/main/resources/projects/cElegansConnectome/16.json b/src/main/resources/projects/cElegansConnectome/16.json index 559372dc..0ddb4930 100644 --- a/src/main/resources/projects/cElegansConnectome/16.json +++ b/src/main/resources/projects/cElegansConnectome/16.json @@ -1,26 +1,48 @@ -{ "activeExperimentId" : 1, - "experiments" : [ { "aspectConfigurations" : [ { "id" : 1, - "instance" : "c302", - "simulatorConfiguration" : { "conversionServiceId" : "lemsConversion", - "id" : 1, - "length" : 0, - "parameters" : { "target" : "network_CElegans" }, - "simulatorId" : "neuronSimulator", - "timestep" : 0.0001 - }, - "watchedVariables" : [ ] - } ], - "description" : "Caenorhabditis elegans is a free-living (not parasitic), transparent nematode (roundworm), about 1 mm in length, that lives in temperate soil environments. This network model of its nervous system was generated using c302, an experimental framework from the OpenWorm project for generating network models in NeuroML 2 based on C. elegans connectivity data.", - "id" : 1, - "lastModified" : "1436102517799", - "name" : "C. elegans connectome", - "script" : "/projects/cElegansConnectome/script.js", - "status" : "COMPLETED" - } ], - "geppettoModel" : { "id" : 6, - "type" : "GEPPETTO_PROJECT", - "url" : "/projects/cElegansConnectome/GeppettoModel.xmi" - }, - "id" : 16, - "name" : "C. elegans multi-compartment connectome" +{ "activeExperimentId" : 1, + "experiments" : [ { "aspectConfigurations" : [ { "id" : 1, + "instance" : "c302", + "simulatorConfiguration" : { "conversionServiceId" : "lemsConversion", + "id" : 1, + "length" : 0, + "parameters" : { "target" : "network_CElegans" }, + "simulatorId" : "neuronSimulator", + "timestep" : 0.0001 + }, + "watchedVariables" : [ ] + } ], + "view": { + "id": 1, + "viewStates": { + "views": { + "Popup1": { + "widgetType": 1, + "isWidget": true, + "transparentBackground": false, + "name": "Description", + "size": { + "height": 172, + "width": 394 + }, + "position": { + "left": 147, + "top": 90 + }, + "dataType": "stringCommand", + "data": "Project.getActiveExperiment().getDescription()" + } + } + } + }, + "description" : "Caenorhabditis elegans is a free-living (not parasitic), transparent nematode (roundworm), about 1 mm in length, that lives in temperate soil environments. This network model of its nervous system was generated using c302, an experimental framework from the OpenWorm project for generating network models in NeuroML 2 based on C. elegans connectivity data.", + "id" : 1, + "lastModified" : "1436102517799", + "name" : "C. elegans connectome", + "status" : "COMPLETED" + } ], + "geppettoModel" : { "id" : 6, + "type" : "GEPPETTO_PROJECT", + "url" : "/projects/cElegansConnectome/GeppettoModel.xmi" + }, + "id" : 16, + "name" : "C. elegans multi-compartment connectome" } \ No newline at end of file