diff --git a/CHANGELOG b/CHANGELOG index fa49ad394f4fc9d7af2c1da7c48949278edd6c2a..6f38b6fe064e297a192544e7aac676decfeee533 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,78 +1,47 @@ -minerva (12.1.0~beta.4) experimental; urgency=medium - * Bug fix: partial zooming is disabled due to issues with hierarchical overlay - * Bug fix: search results were not visible after initial search on top map - * Bug fix: going to export page and back was breaking a map - * Bug fix: export of special characters in pdf is working - - -- Piotr Gawron <piotr.gawron@uni.lu> Wed, 17 Oct 2018 14:00:00 +0200 - -minerva (12.1.0~beta.3) experimental; urgency=medium - * Bug fix: double login with new LDAP credentials doesn't raise error - * Bug fix: empty LDAP filter doesn't raise error - * Bug fix: migration scripts work with database without superadmin privileges - * Bug fix: export didn't work - * Bug fix: coordinates of selected area wasn't processed properly when they - exceeded canvas - - -- Piotr Gawron <piotr.gawron@uni.lu> Thu, 11 Oct 2018 14:00:00 +0200 - -minerva (12.1.0~beta.2) experimental; urgency=medium - * Bug fix: postgres migration script fixed to work with new docker compose - * Bug fix: double click on user add button disabled - * Bug fix: privileges are mirrored correctly across different popups - * Bug fix: plugin tab css fixed - * Small improvement: all ldap parameters are configurable - - -- Piotr Gawron <piotr.gawron@uni.lu> Tue, 2 Oct 2018 11:00:00 +0200 - -minerva (12.1.0~beta.1) experimental; urgency=medium - * Bug fix: uploading sbml file with no ids in glyphs returned error that - could not be easily understand - * Bug fix: sometimes single variant in genomic view was hidden from initial - view - * Bug fix: ds_store files in subfolders crashed zip upload - * Bug fix: when creating new user default privileges were not filled +minerva (12.1.0) stable; urgency=medium * Small improvement: default privilege value for 'Custom overlays' added * Small improvement: explicit logging of successful and unsuccessful logins * Small improvement: clicking on search result icon (on the map) change tab to the corresponding search results - * Bug fix: passwords in the configuration tab are hidden with '*' - * Bug fix: user has access to transparency level when creating custom semantic - view (without this parametere functionality was very difficult to use) - * Bug fix: loading invalid plugin doesn't render empty div anymore - * Bug fix: sorting of custom overlays was broken when description of overlay - was present - * Bug fix: when there is a problem with adjusting font in complexes (because - the font should be smaller than 1pt) description is not drawn anymore - - -- Piotr Gawron <piotr.gawron@uni.lu> Tue, 18 Sep 2018 20:00:00 +0200 - -minerva (12.1.0~beta.0) experimental; urgency=medium * Small improvement: option to remove additional overlays generated by custom semantic zoom * Small improvement: 'Reduced modulation' edge was displayed differently in CellDesigner and Minerva * Small improvement: user-friendly documentation for plugin URL field * Small improvement: plugins have to access information about active submap - * Small improvement: miriam support for VMH reaction and VMH metabolite - - -- Piotr Gawron <piotr.gawron@uni.lu> Wed, 05 Sep 2018 17:00:00 +0200 - -minerva (12.1.0~alpha.0) experimental; urgency=medium * Feature: genome browser with gene variants * Feature: support of all CellDesigner element modifications * Feature: ldap authentication * Feature: multicolored anchors for data overlays * Feature: minerva is distributed using rpm packages - * Bug fix: annotations for elements with mutation in name (like "BID (p15)") - weren't provided properly * Small improvement: annotations from RHEA are handled * Small improvement: changing of Terms of Service url allows admin to reset the status of ToS acceptance for all users * Small improvement: description of a grouped results in improved * Small improvement: selection of required annotation on map upload improved + * Bug fix: annotations for elements with mutation in name (like "BID (p15)") + weren't provided properly + * Bug fix: passwords in the configuration tab are hidden with '*' + * Bug fix: user has access to transparency level when creating custom semantic + view (without this parametere functionality was very difficult to use) + * Bug fix: loading invalid plugin doesn't render empty div anymore + * Bug fix: sorting of custom overlays was broken when description of overlay + was present + * Bug fix: when there is a problem with adjusting font in complexes (because + the font should be smaller than 1pt) description is not drawn anymore + * Bug fix: going to export page and back was breaking a map + * Bug fix: coordinates of selected area wasn't processed properly when they + exceeded canvas + * Bug fix: postgres migration script fixed to work with new docker compose + * Bug fix: double click on user add button disabled + * Bug fix: privileges are mirrored correctly across different popups + * Bug fix: plugin tab css fixed + * Bug fix: uploading sbml file with no ids in glyphs returned error that + could not be easily understand + * Bug fix: ds_store files in subfolders crashed zip upload + * Bug fix: when creating new user default privileges were not filled - -- Piotr Gawron <piotr.gawron@uni.lu> Fri, 03 Aug 2018 10:00:00 +0200 + -- Piotr Gawron <piotr.gawron@uni.lu> Mon, 29 Oct 2018 13:00:00 +0200 minerva (12.0.4) stable; urgency=medium * Bug fix: CellDesigner modifications that are drawn as reaction are handled diff --git a/frontend-js/src/main/js/gui/CommentDialog.js b/frontend-js/src/main/js/gui/CommentDialog.js index 41bf2073baeb6215502df1f3467ba27d18303fa3..de7ad0e8ec1e81b47ee84bef28bc65e6b62dbb85 100644 --- a/frontend-js/src/main/js/gui/CommentDialog.js +++ b/frontend-js/src/main/js/gui/CommentDialog.js @@ -29,6 +29,7 @@ function CommentDialog(params) { var self = this; self._createGui(); $(self.getElement()).dialog({ + title: "Add comment", autoOpen: false, resizable: false, width: window.innerWidth / 2, diff --git a/frontend-js/src/main/js/gui/Legend.js b/frontend-js/src/main/js/gui/Legend.js index 6be26eeed210a85883737b46b9949064d4a40b75..a976ab7a3e54e87c0575a4c5b8a62c900330b4ad 100644 --- a/frontend-js/src/main/js/gui/Legend.js +++ b/frontend-js/src/main/js/gui/Legend.js @@ -39,8 +39,10 @@ Legend.prototype._initializeGui = function () { var legendDiv = Functions.createElement({ type: "div", id: "legend-div", - className: "carousel slide" + className: "carousel" }); + legendDiv.setAttribute("data-ride", "carousel"); + self.getElement().appendChild(legendDiv); var indicators = Functions.createElement({ diff --git a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js index 4655bf308c31a6a27afc54d8a6b2f1681be001b5..b33a5ef53a40f20a5a9a695de013677e0a06ae90 100644 --- a/frontend-js/src/main/js/gui/admin/AddProjectDialog.js +++ b/frontend-js/src/main/js/gui/admin/AddProjectDialog.js @@ -286,11 +286,6 @@ AddProjectDialog.prototype.createGeneralTabContent = function () { help: 'If this checkbox is checked, the uploaded model will be displayed in SBGN format, instead of default ' + 'CellDesigner format.' })); - table.appendChild(self.createCheckboxRow({ - labelName: "Custom semantic zooming:", - defaultValue: false, - inputName: "project-semantic-zooming" - })); table.appendChild(self.createCheckboxRow({ labelName: "Custom semantic zooming contains multiple overlays:", defaultValue: false, @@ -709,7 +704,6 @@ AddProjectDialog.prototype.init = function () { self.bindProjectUploadPreferences(user, "autoResize", "project-auto-margin"); self.bindProjectUploadPreferences(user, "validateMiriam", "project-verify-annotations"); self.bindProjectUploadPreferences(user, "cacheData", "project-cache-data"); - self.bindProjectUploadPreferences(user, "semanticZooming", "project-semantic-zooming"); self.bindProjectUploadPreferences(user, "semanticZoomingContainsMultipleOverlays", "project-semantic-zooming-contains-multiple-overlays"); self.bindProjectUploadPreferences(user, "sbgn", "project-sbgn-visualization"); }); @@ -1072,14 +1066,6 @@ AddProjectDialog.prototype.isSbgn = function () { return $("[name='project-sbgn-visualization']", this.getElement()).is(':checked'); }; -/** - * - * @returns {boolean} - */ -AddProjectDialog.prototype.isSemanticZooming = function () { - return $("[name='project-semantic-zooming']", this.getElement()).is(':checked'); -}; - /** * * @returns {boolean} @@ -1158,7 +1144,6 @@ AddProjectDialog.prototype.onSaveClicked = function () { "organism": self.getOrganism(), "mapCanvasType": self.getMapCanvasTypeId(), "sbgn": self.isSbgn(), - "semantic-zoom": self.isSemanticZooming(), "semantic-zoom-contains-multiple-layouts": self.isSemanticZoomingContainsMultipleOverlays(), "annotate": self.isAnnotateAutomatically(), "verify-annotations": self.isVerifyAnnotations(), diff --git a/frontend-js/src/main/js/map/canvas/OpenLayers/OpenLayerPolyline.js b/frontend-js/src/main/js/map/canvas/OpenLayers/OpenLayerPolyline.js index e87a516537fcec87d8c331c54d834e7413f6ac08..6ee77ee55986f8721bb867c97b5d81b45482e6e7 100644 --- a/frontend-js/src/main/js/map/canvas/OpenLayers/OpenLayerPolyline.js +++ b/frontend-js/src/main/js/map/canvas/OpenLayers/OpenLayerPolyline.js @@ -83,7 +83,7 @@ OpenLayerPolyline.prototype.isShown = function () { OpenLayerPolyline.prototype.getBounds = function () { var self = this; - var extent = self.getOpenLayersRectangle().getGeometry().getExtent(); + var extent = self.getOpenLayersPolyline().getGeometry().getExtent(); var projection1 = [extent[0], extent[1]]; var p1 = self.getMap().fromProjectionToPoint(projection1); diff --git a/frontend-js/src/main/js/map/data/UserPreferences.js b/frontend-js/src/main/js/map/data/UserPreferences.js index fba86c1bec960a5e282514b8dd16415fa4a4b0f4..427e7a06c859829efed95baac859da7480b799d9 100644 --- a/frontend-js/src/main/js/map/data/UserPreferences.js +++ b/frontend-js/src/main/js/map/data/UserPreferences.js @@ -56,7 +56,6 @@ UserPreferences.prototype.update = function (userPreferences) { * @param {boolean} projectUpload.validate-miriam * @param {boolean} projectUpload.validate-miriam * @param {boolean} projectUpload.cache-data - * @param {boolean} projectUpload.semantic-zooming * @param {boolean} projectUpload.sbgn */ UserPreferences.prototype.setProjectUpload = function (projectUpload) { @@ -65,7 +64,6 @@ UserPreferences.prototype.setProjectUpload = function (projectUpload) { validateMiriam: projectUpload["validate-miriam"], annotateModel: projectUpload["annotate-model"], cacheData: projectUpload["cache-data"], - semanticZooming: projectUpload["semantic-zooming"], semanticZoomingContainsMultipleOverlays: projectUpload["semantic-zooming-contains-multiple-overlays"], sbgn: projectUpload["sbgn"] }; @@ -183,7 +181,6 @@ UserPreferences.prototype.toExport = function () { "annotate-model": this._projectUpload.annotateModel, "cache-data": this._projectUpload.cacheData, "sbgn": this._projectUpload.sbgn, - "semantic-zooming": this._projectUpload.semanticZooming, "semantic-zooming-contains-multiple-overlays":this._projectUpload.semanticZoomingContainsMultipleOverlays }, "element-annotators": this._elementAnnotators, diff --git a/frontend-js/src/main/js/map/surface/ReactionSurface.js b/frontend-js/src/main/js/map/surface/ReactionSurface.js index b750368fcbf609325c0c9f31d3c5835b3cf59167..2ceeb217ea0c1e6937105dccb991150ceca44dfa 100644 --- a/frontend-js/src/main/js/map/surface/ReactionSurface.js +++ b/frontend-js/src/main/js/map/surface/ReactionSurface.js @@ -87,7 +87,7 @@ ReactionSurface.prototype.setColor = function (color) { strokeColor: color }); } - this.customized = true; + this.setCustomized(true); }; /** @@ -163,7 +163,7 @@ ReactionSurface.prototype.changedToDefault = function () { strokeWeight: 5 }); } - this.customized = false; + this.setCustomized(false); }; /** @@ -177,7 +177,7 @@ ReactionSurface.prototype.changedToCustomized = function () { strokeWeight: this.getWidth() }); } - this.customized = true; + this.setCustomized(true); }; /** diff --git a/frontend-js/src/test/js/map/canvas/OpenLayers/OpenLayersPolyline-test.js b/frontend-js/src/test/js/map/canvas/OpenLayers/OpenLayersPolyline-test.js new file mode 100644 index 0000000000000000000000000000000000000000..f6107f6b544f5c27ed3e063da5ffa39433a5fdc4 --- /dev/null +++ b/frontend-js/src/test/js/map/canvas/OpenLayers/OpenLayersPolyline-test.js @@ -0,0 +1,44 @@ +"use strict"; +require("../../../mocha-config"); + +// noinspection JSUnusedLocalSymbols +var logger = require('../../../logger'); + +var OpenLayerCanvas = require('../../../../../main/js/map/canvas/OpenLayers/OpenLayerCanvas'); +var OpenLayerPolyline = require('../../../../../main/js/map/canvas/OpenLayers/OpenLayerPolyline'); +var Bounds = require('../../../../../main/js/map/canvas/Bounds'); +var Point = require('../../../../../main/js/map/canvas/Point'); + +var SelectionContextMenu = require('../../../../../main/js/gui/SelectionContextMenu'); + +var chai = require('chai'); +var assert = chai.assert; + +describe('OpenLayerPolyline', function () { + var testOptions = { + center: new Point(0, 0), + tileSize: 256, + width: 300, + height: 600, + zoom: 3, + minZoom: 2, + maxZoom: 10, + backgroundOverlays: [{ + id: 1, + name: "overlay", + directory: "overlay_dir" + }] + }; + it("getBounds", function () { + var canvas = new OpenLayerCanvas(testDiv, testOptions); + var path = [new Point(0, 0), new Point(10, 5)]; + + var polyline = canvas.createPolyline({ + strokeWeight: 1, + strokeColor: "#00ff00", + path: path + }); + polyline.show(); + assert.ok(polyline.getBounds()); + }); +}); diff --git a/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java b/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java index 7a6362cdbd28df18b2911f7d312c84013381d017..ab20f54a5e8146c7c246a97d22cffbf2b03cdde5 100644 --- a/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java +++ b/model-command/src/main/java/lcsb/mapviewer/commands/CreateHierarchyCommand.java @@ -6,12 +6,12 @@ import java.util.HashSet; import java.util.List; import java.util.Set; +import org.apache.commons.lang3.math.NumberUtils; import org.apache.log4j.Logger; import lcsb.mapviewer.common.Configuration; import lcsb.mapviewer.common.exception.InvalidStateException; import lcsb.mapviewer.common.exception.NotImplementedException; -import lcsb.mapviewer.model.map.BioEntity; import lcsb.mapviewer.model.map.compartment.Compartment; import lcsb.mapviewer.model.map.compartment.PathwayCompartment; import lcsb.mapviewer.model.map.layout.graphics.Layer; @@ -60,8 +60,8 @@ public class CreateHierarchyCommand extends ModelCommand { private double maxZoomFactor; /** - * Default constructor that intializes data. - * + * Default constructor that initializes data. + * * @param model * model on which command will be executed * @param maxZoomFactor @@ -105,12 +105,21 @@ public class CreateHierarchyCommand extends ModelCommand { setParentingAndChildreningOfNonComplexChildrens(sortedAliases); model.getElements().addAll(compacts); sortedAliases = model.getElementsSortedBySize(); - preSettingOfVisibilityLevel(sortedAliases, maxZoomFactor); settingOfTransparencyLevel(sortedAliases); + setDefaultVisibilityLevel(sortedAliases); + setStatus(ModelCommandStatus.EXECUTED); } + private void setDefaultVisibilityLevel(List<Element> sortedAliases) { + for (Element element: sortedAliases) { + if (element.getVisibilityLevel()==null||element.getVisibilityLevel().isEmpty()) { + element.setVisibilityLevel(0); + } + } + } + @Override protected void redoImplementation() { throw new NotImplementedException(); @@ -122,10 +131,9 @@ public class CreateHierarchyCommand extends ModelCommand { protected void clean() { for (Element alias : getModel().getElements()) { alias.setCompartment(null); - alias.setTransparencyLevel(""); - } - for (BioEntity bioEntity : getModel().getBioEntities()) { - bioEntity.setVisibilityLevel("0"); + if (alias.getTransparencyLevel() == null || alias.getTransparencyLevel().isEmpty()) { + alias.setTransparencyLevel(""); + } } Set<Compartment> toRemove = new HashSet<>(); for (Compartment alias : getModel().getCompartments()) { @@ -183,16 +191,8 @@ public class CreateHierarchyCommand extends ModelCommand { assignToCompartments(); } - /** - * Computes visibility levels for aliases based on the size. - * - * @param sortedAliases - * list of aliases - * @param maxZoomFactor - * max scale used on the map - */ - private void preSettingOfVisibilityLevel(List<Element> sortedAliases, double maxZoomFactor) { - for (Element alias : sortedAliases) { + private int computeVisibility(Element alias) { + if (!NumberUtils.isNumber(alias.getVisibilityLevel())) { double rate = computeRate(alias, Configuration.MIN_VISIBLE_OBJECT_SIZE); int logValue = (int) ((int) Math.ceil(Math.log(rate)) / LOG_4); boolean hasCompartment = alias.getCompartment() != null; @@ -210,63 +210,73 @@ public class CreateHierarchyCommand extends ModelCommand { logValue = zoomLevels; } } - alias.setVisibilityLevel(logValue + ""); + return logValue; + } else { + return Integer.valueOf(alias.getVisibilityLevel()); } } /** * Sets transparency level in hierarchical view for compartment alias. - * + * * @param compartment - * comaprtment alias + * compartment alias */ private void settingTransparencyLevelForCompartment(Compartment compartment) { - int maxVisibilityLevel = Integer.MAX_VALUE; - double rate = computeRate(compartment, Configuration.MAX_VISIBLE_OBJECT_SIZE); - maxVisibilityLevel = (int) ((int) Math.ceil(Math.log(rate)) / LOG_4); - for (Element child : compartment.getElements()) { - maxVisibilityLevel = Math.min(maxVisibilityLevel, Integer.valueOf(child.getVisibilityLevel())); - } - if (maxVisibilityLevel >= zoomLevels) { - maxVisibilityLevel = zoomLevels; - } - if (maxVisibilityLevel <= 0) { - maxVisibilityLevel = 1; + if (compartment.getTransparencyLevel() == null || compartment.getTransparencyLevel().isEmpty()) { + int maxVisibilityLevel = Integer.MAX_VALUE; + double rate = computeRate(compartment, Configuration.MAX_VISIBLE_OBJECT_SIZE); + maxVisibilityLevel = (int) ((int) Math.ceil(Math.log(rate)) / LOG_4); + for (Element child : compartment.getElements()) { + maxVisibilityLevel = Math.min(maxVisibilityLevel, Integer.valueOf(computeVisibility(child))); + } + if (maxVisibilityLevel >= zoomLevels) { + maxVisibilityLevel = zoomLevels; + } + if (maxVisibilityLevel <= 0) { + maxVisibilityLevel = 1; + } + compartment.setTransparencyLevel(maxVisibilityLevel + ""); } - compartment.setTransparencyLevel(maxVisibilityLevel + ""); for (Element child : compartment.getElements()) { - child.setVisibilityLevel(compartment.getTransparencyLevel()); + if (child.getVisibilityLevel() == null || child.getVisibilityLevel().isEmpty()) { + child.setVisibilityLevel(compartment.getTransparencyLevel()); + } } } /** * Sets transparency level in hierarchical view for complex alias. - * + * * @param complex * complex alias */ private void settingTransparencyLevelForComplex(Complex complex) { - int maxVisibilityLevel = Integer.MAX_VALUE; - double rate = computeRate(complex, Configuration.MAX_VISIBLE_OBJECT_SIZE); - maxVisibilityLevel = (int) ((int) Math.ceil(Math.log(rate)) / LOG_4); - for (Element child : complex.getElements()) { - maxVisibilityLevel = Math.min(maxVisibilityLevel, Integer.valueOf(child.getVisibilityLevel())); - } - if (maxVisibilityLevel >= zoomLevels) { - maxVisibilityLevel = zoomLevels; - } - if (maxVisibilityLevel <= 0) { - maxVisibilityLevel = 1; + if (complex.getTransparencyLevel() == null || complex.getTransparencyLevel().isEmpty()) { + int maxVisibilityLevel = Integer.MAX_VALUE; + double rate = computeRate(complex, Configuration.MAX_VISIBLE_OBJECT_SIZE); + maxVisibilityLevel = (int) ((int) Math.ceil(Math.log(rate)) / LOG_4); + for (Element child : complex.getElements()) { + maxVisibilityLevel = Math.min(maxVisibilityLevel, Integer.valueOf(computeVisibility(child))); + } + if (maxVisibilityLevel >= zoomLevels) { + maxVisibilityLevel = zoomLevels; + } + if (maxVisibilityLevel <= 0) { + maxVisibilityLevel = 1; + } + complex.setTransparencyLevel(maxVisibilityLevel + ""); } - complex.setTransparencyLevel(maxVisibilityLevel + ""); for (Element child : complex.getElements()) { - child.setVisibilityLevel(complex.getTransparencyLevel()); + if (child.getVisibilityLevel() == null || child.getVisibilityLevel().isEmpty()) { + child.setVisibilityLevel(complex.getTransparencyLevel()); + } } } /** * Sets transparency level in hierarchical view for all elements. - * + * * @param sortedAliases * list of aliases */ @@ -277,14 +287,16 @@ public class CreateHierarchyCommand extends ModelCommand { } else if (alias instanceof Complex) { settingTransparencyLevelForComplex((Complex) alias); } else { - alias.setTransparencyLevel("0"); + if (alias.getTransparencyLevel() == null || alias.getTransparencyLevel().isEmpty()) { + alias.setTransparencyLevel("0"); + } } } } /** * Removes invalid compartment children. - * + * * @param sortedAliases * list of aliases */ @@ -304,7 +316,7 @@ public class CreateHierarchyCommand extends ModelCommand { /** * Sets parent for elements. - * + * * @param sortedAliases * list of aliases */ @@ -337,7 +349,7 @@ public class CreateHierarchyCommand extends ModelCommand { /** * Set parents for the elements in hierarchical view. - * + * * @param sortedAliases * list of aliases */ @@ -369,11 +381,11 @@ public class CreateHierarchyCommand extends ModelCommand { /** * Computes the ratio between the minimal object that should be visible, and * alias visible on the top level. - * + * * @param alias * alias for which computation is done * @param limit - * size of the minimal visibe object + * size of the minimal visible object * @return ratio between the minimal object that should be visible, and alias * visible on the top level */ diff --git a/model-command/src/test/java/lcsb/mapviewer/commands/CreateHierarchyCommandTest.java b/model-command/src/test/java/lcsb/mapviewer/commands/CreateHierarchyCommandTest.java index 7047e094100318c2aba0bf6b41fe80272a288b7f..87f960d7952a1504565b2dd9d267769e0c608439 100644 --- a/model-command/src/test/java/lcsb/mapviewer/commands/CreateHierarchyCommandTest.java +++ b/model-command/src/test/java/lcsb/mapviewer/commands/CreateHierarchyCommandTest.java @@ -9,7 +9,9 @@ import static org.junit.Assert.fail; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.nio.charset.StandardCharsets; +import java.util.HashMap; import java.util.HashSet; +import java.util.Map; import java.util.Set; import org.apache.log4j.Logger; @@ -25,6 +27,7 @@ import lcsb.mapviewer.model.map.compartment.PathwayCompartment; import lcsb.mapviewer.model.map.model.Model; import lcsb.mapviewer.model.map.species.Element; import lcsb.mapviewer.model.map.species.Species; +import lcsb.mapviewer.modelutils.map.ElementUtils; public class CreateHierarchyCommandTest extends CommandTestFunctions { Logger logger = Logger.getLogger(CreateHierarchyCommandTest.class); @@ -304,4 +307,71 @@ public class CreateHierarchyCommandTest extends CommandTestFunctions { } } + @Test + public void testHierarchyWithCustomSemanticZooming() throws Exception { + try { + Model model = getModelForFile("testFiles/custom_semantic_zooming.xml", false); + + Map<Element, String> visibilityLevels = new HashMap<>(); + for (Element element : model.getElements()) { + if (element.getVisibilityLevel() != null && !element.getVisibilityLevel().isEmpty()) { + visibilityLevels.put(element, element.getVisibilityLevel()); + } + } + + new CreateHierarchyCommand(model, 4, 80).execute(); + + for (Element element : model.getElements()) { + if (visibilityLevels.get(element) != null) { + assertEquals("Visibility level changed, but shouldn't", visibilityLevels.get(element), + element.getVisibilityLevel()); + } + } + + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } + + @Test + public void testHierarchyWithCustomSemanticZoomingPathwayLevels() throws Exception { + try { + ElementUtils eu = new ElementUtils(); + Model model = getModelForFile("testFiles/custom_semantic_zooming.xml", false); + + Map<Element, String> visibilityLevels = new HashMap<>(); + for (Element element : model.getElements()) { + if (element.getVisibilityLevel() != null && !element.getVisibilityLevel().isEmpty()) { + visibilityLevels.put(element, element.getVisibilityLevel()); + } + } + + new CreateHierarchyCommand(model, 4, 80).execute(); + + for (Element element : model.getElements()) { + if (visibilityLevels.get(element) == null) { + int visibilityLevel = Integer.parseInt(element.getVisibilityLevel()); + if (element.getCompartment() != null) { + int parentTransparency = Integer.parseInt(element.getCompartment().getTransparencyLevel()); + assertEquals( + eu.getElementTag(element) + eu.getElementTag(element.getCompartment()) + + "Element should be directly visible when parent is transparent", + parentTransparency, visibilityLevel); + } else if (element instanceof Species) { + int parentTransparency = Integer.parseInt(((Species) element).getComplex().getTransparencyLevel()); + assertEquals( + eu.getElementTag(element) + eu.getElementTag(((Species) element).getComplex()) + + "Element should be directly visible when parent is transparent", + parentTransparency, visibilityLevel); + } + } + } + + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } + } diff --git a/model-command/testFiles/custom_semantic_zooming.xml b/model-command/testFiles/custom_semantic_zooming.xml new file mode 100644 index 0000000000000000000000000000000000000000..736899cb21c573b480920833537d6151426122a6 --- /dev/null +++ b/model-command/testFiles/custom_semantic_zooming.xml @@ -0,0 +1,1195 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml xmlns="http://www.sbml.org/sbml/level2/version4" xmlns:celldesigner="http://www.sbml.org/2001/ns/celldesigner" level="2" version="4"> +<model metaid="untitled" id="untitled"> +<annotation> +<celldesigner:extension> +<celldesigner:modelVersion>4.0</celldesigner:modelVersion> +<celldesigner:modelDisplay sizeX="2500" sizeY="2000"/> +<celldesigner:listOfCompartmentAliases> +<celldesigner:compartmentAlias id="ca1" compartment="c1"> +<celldesigner:class>SQUARE</celldesigner:class> +<celldesigner:bounds x="1495.0" y="85.0" w="550.0" h="440.0"/> +<celldesigner:namePoint x="1944.5" y="488.5"/> +<celldesigner:doubleLine thickness="12.0" outerWidth="2.0" innerWidth="1.0"/> +<celldesigner:paint color="ffcccc00" scheme="Color"/> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:compartmentAlias> +<celldesigner:compartmentAlias id="ca2" compartment="c2"> +<celldesigner:class>SQUARE</celldesigner:class> +<celldesigner:bounds x="1140.0" y="45.0" w="1270.0" h="1315.0"/> +<celldesigner:namePoint x="1767.0" y="1308.0"/> +<celldesigner:doubleLine thickness="12.0" outerWidth="2.0" innerWidth="1.0"/> +<celldesigner:paint color="ffcccc00" scheme="Color"/> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:compartmentAlias> +<celldesigner:compartmentAlias id="ca3" compartment="c3"> +<celldesigner:class>SQUARE</celldesigner:class> +<celldesigner:bounds x="90.0" y="30.0" w="1020.0" h="1940.0"/> +<celldesigner:namePoint x="585.0" y="1933.5"/> +<celldesigner:doubleLine thickness="12.0" outerWidth="2.0" innerWidth="1.0"/> +<celldesigner:paint color="ffcccc00" scheme="Color"/> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:compartmentAlias> +<celldesigner:compartmentAlias id="ca4" compartment="c4"> +<celldesigner:class>SQUARE</celldesigner:class> +<celldesigner:bounds x="1125.0" y="1405.0" w="1310.0" h="570.0"/> +<celldesigner:namePoint x="1762.0" y="1938.5"/> +<celldesigner:doubleLine thickness="12.0" outerWidth="2.0" innerWidth="1.0"/> +<celldesigner:paint color="ffcccc00" scheme="Color"/> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:compartmentAlias> +</celldesigner:listOfCompartmentAliases> +<celldesigner:listOfComplexSpeciesAliases/> +<celldesigner:listOfSpeciesAliases> +<celldesigner:speciesAlias id="sa1" species="s1" compartmentAlias="ca1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1525.0" y="185.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="30.0" y="100.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa3" species="s3" compartmentAlias="ca1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1725.0" y="305.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="230.0" y="220.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa5" species="s5" compartmentAlias="ca1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1935.0" y="305.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="440.0" y="220.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa6" species="s6" compartmentAlias="ca1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1927.5" y="178.75" w="95.0" h="32.5"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="432.5" y="93.75"/> +<celldesigner:boxSize width="95.0" height="32.5"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffffff66" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa7" species="s7" compartmentAlias="ca1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1940.0" y="412.5" w="70.0" h="25.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="445.0" y="327.5"/> +<celldesigner:boxSize width="70.0" height="25.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccff66" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa8" species="s8" compartmentAlias="ca1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1530.0" y="305.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="35.0" y="220.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa9" species="s9" compartmentAlias="ca2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1230.0" y="960.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="90.0" y="915.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa10" species="s10" compartmentAlias="ca2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1350.0" y="955.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="210.0" y="910.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa11" species="s11" compartmentAlias="ca2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1460.0" y="955.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="320.0" y="910.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa12" species="s12" compartmentAlias="ca2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1570.0" y="955.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="430.0" y="910.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa13" species="s13" compartmentAlias="ca2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1630.0" y="790.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="490.0" y="745.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa17" species="s16" compartmentAlias="ca1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1540.0" y="445.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="45.0" y="360.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa19" species="s18" compartmentAlias="ca2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1360.0" y="1170.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="220.0" y="1125.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa20" species="s19" compartmentAlias="ca2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1210.0" y="790.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="70.0" y="745.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa16" species="s17" compartmentAlias="ca1"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1700.0" y="445.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="205.0" y="360.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa21" species="s20" compartmentAlias="ca3"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="850.0" y="1140.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="760.0" y="1110.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa22" species="s21" compartmentAlias="ca4"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1200.0" y="1460.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="75.0" y="55.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa23" species="s22" compartmentAlias="ca4"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1340.0" y="1580.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="215.0" y="175.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa25" species="s23" compartmentAlias="ca2"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1610.0" y="1160.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="470.0" y="1115.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +<celldesigner:speciesAlias id="sa26" species="s24" compartmentAlias="ca4"> +<celldesigner:activity>inactive</celldesigner:activity> +<celldesigner:bounds x="1540.0" y="1510.0" w="80.0" h="40.0"/> +<celldesigner:font size="12"/> +<celldesigner:view state="usual"/> +<celldesigner:usualView> +<celldesigner:innerPosition x="415.0" y="105.0"/> +<celldesigner:boxSize width="80.0" height="40.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="ffccffcc" scheme="Color"/> +</celldesigner:usualView> +<celldesigner:briefView> +<celldesigner:innerPosition x="0.0" y="0.0"/> +<celldesigner:boxSize width="80.0" height="60.0"/> +<celldesigner:singleLine width="1.0"/> +<celldesigner:paint color="3fff0000" scheme="Color"/> +</celldesigner:briefView> +<celldesigner:info state="empty" angle="-1.5707963267948966"/> +</celldesigner:speciesAlias> +</celldesigner:listOfSpeciesAliases> +<celldesigner:listOfGroups/> +<celldesigner:listOfProteins> +<celldesigner:protein id="pr1" name="BID" type="GENERIC"/> +<celldesigner:protein id="pr3" name="BAD" type="GENERIC"/> +<celldesigner:protein id="pr5" name="DAD" type="GENERIC"/> +<celldesigner:protein id="pr6" name="B" type="GENERIC"/> +<celldesigner:protein id="pr7" name="AAA" type="GENERIC"/> +<celldesigner:protein id="pr8" name="AA0" type="GENERIC"/> +<celldesigner:protein id="pr9" name="AA1" type="GENERIC"/> +<celldesigner:protein id="pr10" name="AA3" type="GENERIC"/> +<celldesigner:protein id="pr11" name="empty" type="GENERIC"/> +<celldesigner:protein id="pr12" name="ST1" type="GENERIC"/> +<celldesigner:protein id="pr14" name="T1" type="GENERIC"/> +<celldesigner:protein id="pr15" name="S2T2" type="GENERIC"/> +<celldesigner:protein id="pr13" name="S0T1" type="GENERIC"/> +<celldesigner:protein id="pr16" name="S2" type="GENERIC"/> +<celldesigner:protein id="pr17" name="TL0" type="GENERIC"/> +<celldesigner:protein id="pr18" name="TL1" type="GENERIC"/> +<celldesigner:protein id="pr19" name="S0" type="GENERIC"/> +<celldesigner:protein id="pr20" name="T2" type="GENERIC"/> +</celldesigner:listOfProteins> +<celldesigner:listOfGenes> +<celldesigner:gene id="gn1" name="E" type="GENE"> +<celldesigner:listOfRegions> +<celldesigner:region id="tr1" name="Ee" size="0.2" pos="0.03" type="CodingRegion" active="false"/> +<celldesigner:region id="tr2" name="Ef" size="0.16" pos="0.26999999999999996" type="CodingRegion" active="false"/> +<celldesigner:region id="tr3" name="Eg" size="0.1" pos="0.46" type="transcriptionStartingSiteL" active="false"/> +<celldesigner:region id="tr4" name="Eh" size="0.1" pos="0.72" type="transcriptionStartingSiteR" active="false"/> +</celldesigner:listOfRegions> +</celldesigner:gene> +</celldesigner:listOfGenes> +<celldesigner:listOfRNAs/> +<celldesigner:listOfAntisenseRNAs/> +<celldesigner:listOfLayers> +<celldesigner:layer id="1" name="Layer0001" locked="false" visible="true"> +<celldesigner:listOfTexts> +<celldesigner:layerSpeciesAlias x="0.0" y="0.0"> +<celldesigner:layerNotes> +zoom1 +</celldesigner:layerNotes> +<celldesigner:bounds x="1345.0" y="72.5" w="890.0" h="515.0"/> +<celldesigner:paint color="ff000000"/> +<celldesigner:font size="11"/> +</celldesigner:layerSpeciesAlias> +<celldesigner:layerSpeciesAlias x="0.0" y="0.0"> +<celldesigner:layerNotes> +Sem +</celldesigner:layerNotes> +<celldesigner:bounds x="1210.0" y="935.0" w="480.0" h="90.0"/> +<celldesigner:paint color="ff000000"/> +<celldesigner:font size="11"/> +</celldesigner:layerSpeciesAlias> +<celldesigner:layerSpeciesAlias x="0.0" y="0.0"> +<celldesigner:layerNotes> +Tran +</celldesigner:layerNotes> +<celldesigner:bounds x="45.0" y="15.0" w="2415.0" h="1980.0"/> +<celldesigner:paint color="ff000000"/> +<celldesigner:font size="11"/> +</celldesigner:layerSpeciesAlias> +</celldesigner:listOfTexts> +</celldesigner:layer> +</celldesigner:listOfLayers> +<celldesigner:listOfBlockDiagrams/> +</celldesigner:extension> +</annotation> +<listOfUnitDefinitions> +<unitDefinition metaid="substance" id="substance" name="substance"> +<listOfUnits> +<unit metaid="CDMT00007" kind="mole"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="volume" id="volume" name="volume"> +<listOfUnits> +<unit metaid="CDMT00008" kind="litre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="area" id="area" name="area"> +<listOfUnits> +<unit metaid="CDMT00009" kind="metre" exponent="2"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="length" id="length" name="length"> +<listOfUnits> +<unit metaid="CDMT00014" kind="metre"/> +</listOfUnits> +</unitDefinition> +<unitDefinition metaid="time" id="time" name="time"> +<listOfUnits> +<unit metaid="CDMT00015" kind="second"/> +</listOfUnits> +</unitDefinition> +</listOfUnitDefinitions> +<listOfCompartments> +<compartment metaid="default" id="default" size="1" units="volume"/> +<compartment metaid="c2" id="c2" name="Cell" size="1" units="volume" outside="default"> +<annotation> +<celldesigner:extension> +<celldesigner:name>Cell</celldesigner:name> +</celldesigner:extension> +</annotation> +</compartment> +<compartment metaid="c1" id="c1" name="nucleus" size="1" units="volume" outside="c2"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 2 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:name>nucleus</celldesigner:name> +</celldesigner:extension> +</annotation> +</compartment> +<compartment metaid="c3" id="c3" name="pink" size="1" units="volume" outside="default"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 1 +TransparencyZoomLevelVisibility: 2 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:name>pink</celldesigner:name> +</celldesigner:extension> +</annotation> +</compartment> +<compartment metaid="c4" id="c4" name="black" size="1" units="volume" outside="default"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 3 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:name>black</celldesigner:name> +</celldesigner:extension> +</annotation> +</compartment> +</listOfCompartments> +<listOfSpecies> +<species metaid="s1" id="s1" name="BID" compartment="c1" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 2 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr1</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/"> +<rdf:Description rdf:about="#s1"> +<bqmodel:isDescribedBy> +<rdf:Bag> +<rdf:li rdf:resource="urn:miriam:uniprot:Q9BXM7"/> +</rdf:Bag> +</bqmodel:isDescribedBy> +</rdf:Description> +</rdf:RDF> +</annotation> +</species> +<species metaid="s3" id="s3" name="BAD" compartment="c1" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 3 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr3</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/"> +<rdf:Description rdf:about="#s3"> +<bqmodel:isDescribedBy> +<rdf:Bag> +<rdf:li rdf:resource="urn:miriam:hgnc:936"/> +</rdf:Bag> +</bqmodel:isDescribedBy> +<bqmodel:isDescribedBy> +<rdf:Bag> +<rdf:li rdf:resource="urn:miriam:rhea:12345"/> +</rdf:Bag> +</bqmodel:isDescribedBy> +</rdf:Description> +</rdf:RDF> +</annotation> +</species> +<species metaid="s5" id="s5" name="DAD" compartment="c1" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 0 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr5</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s6" id="s6" name="E" compartment="c1" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 3 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>GENE</celldesigner:class> +<celldesigner:geneReference>gn1</celldesigner:geneReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s7" id="s7" name="DAD" compartment="c1" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 3 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>SIMPLE_MOLECULE</celldesigner:class> +<celldesigner:name>DAD</celldesigner:name> +</celldesigner:speciesIdentity> +</celldesigner:extension> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/"> +<rdf:Description rdf:about="#s7"> +<bqmodel:isDescribedBy> +<rdf:Bag> +<rdf:li rdf:resource="urn:miriam:rhea:21220"/> +</rdf:Bag> +</bqmodel:isDescribedBy> +</rdf:Description> +</rdf:RDF> +</annotation> +</species> +<species metaid="s8" id="s8" name="B" compartment="c1" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr6</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s9" id="s9" name="AAA" compartment="c2" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr7</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s10" id="s10" name="AA0" compartment="c2" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 0 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr8</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s11" id="s11" name="AA1" compartment="c2" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 1 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr9</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s12" id="s12" name="AA3" compartment="c2" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 3 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr10</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s13" id="s13" name="empty" compartment="c2" initialAmount="0"> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr11</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s16" id="s16" name="ST1" compartment="c1" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 1 +TransparencyZoomLevelVisibility: 1 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr12</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s18" id="s18" name="T1" compartment="c2" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>TransparencyZoomLevelVisibility: 1 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr14</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s19" id="s19" name="S2T2" compartment="c2" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 2 +TransparencyZoomLevelVisibility: 1 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr15</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s17" id="s17" name="S0T1" compartment="c1" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>TransparencyZoomLevelVisibility: 1 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr13</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s20" id="s20" name="S2" compartment="c3" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 2 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr16</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s21" id="s21" name="TL0" compartment="c4" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>TransparencyZoomLevelVisibility: 0 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr17</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s22" id="s22" name="TL1" compartment="c4" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>TransparencyZoomLevelVisibility: 1 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr18</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s23" id="s23" name="S0" compartment="c2" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>SemanticZoomLevelVisibility: 0 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr19</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +<species metaid="s24" id="s24" name="T2" compartment="c4" initialAmount="0"> +<notes> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title/> +</head> +<body>TransparencyZoomLevelVisibility: 2 +</body> +</html> +</notes> +<annotation> +<celldesigner:extension> +<celldesigner:positionToCompartment>inside</celldesigner:positionToCompartment> +<celldesigner:speciesIdentity> +<celldesigner:class>PROTEIN</celldesigner:class> +<celldesigner:proteinReference>pr20</celldesigner:proteinReference> +</celldesigner:speciesIdentity> +</celldesigner:extension> +</annotation> +</species> +</listOfSpecies> +<listOfReactions> +<reaction metaid="re1" id="re1" reversible="false"> +<annotation> +<celldesigner:extension> +<celldesigner:reactionType>STATE_TRANSITION</celldesigner:reactionType> +<celldesigner:baseReactants> +<celldesigner:baseReactant species="s1" alias="sa1"/> +</celldesigner:baseReactants> +<celldesigner:baseProducts> +<celldesigner:baseProduct species="s3" alias="sa3"/> +</celldesigner:baseProducts> +<celldesigner:connectScheme connectPolicy="direct" rectangleIndex="0"> +<celldesigner:listOfLineDirection> +<celldesigner:lineDirection index="0" value="unknown"/> +</celldesigner:listOfLineDirection> +</celldesigner:connectScheme> +<celldesigner:line width="1.0" color="ff000000"/> +</celldesigner:extension> +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:bqbiol="http://biomodels.net/biology-qualifiers/" xmlns:bqmodel="http://biomodels.net/model-qualifiers/"> +<rdf:Description rdf:about="#re1"> +<bqmodel:isDescribedBy> +<rdf:Bag> +<rdf:li rdf:resource="urn:miriam:rhea:16508"/> +</rdf:Bag> +</bqmodel:isDescribedBy> +</rdf:Description> +</rdf:RDF> +</annotation> +<listOfReactants> +<speciesReference metaid="CDMT00001" species="s1"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa1</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfReactants> +<listOfProducts> +<speciesReference metaid="CDMT00002" species="s3"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa3</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfProducts> +</reaction> +<reaction metaid="re4" id="re4" reversible="false"> +<annotation> +<celldesigner:extension> +<celldesigner:reactionType>REDUCED_MODULATION</celldesigner:reactionType> +<celldesigner:baseReactants> +<celldesigner:baseReactant species="s3" alias="sa3"> +<celldesigner:linkAnchor position="E"/> +</celldesigner:baseReactant> +</celldesigner:baseReactants> +<celldesigner:baseProducts> +<celldesigner:baseProduct species="s5" alias="sa5"> +<celldesigner:linkAnchor position="W"/> +</celldesigner:baseProduct> +</celldesigner:baseProducts> +<celldesigner:connectScheme connectPolicy="direct"> +<celldesigner:listOfLineDirection> +<celldesigner:lineDirection index="0" value="unknown"/> +</celldesigner:listOfLineDirection> +</celldesigner:connectScheme> +<celldesigner:line width="1.0" color="ff000000"/> +</celldesigner:extension> +</annotation> +<listOfReactants> +<speciesReference metaid="CDMT00010" species="s3"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa3</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfReactants> +<listOfProducts> +<speciesReference metaid="CDMT00011" species="s5"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa5</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfProducts> +</reaction> +<reaction metaid="re5" id="re5" reversible="false"> +<annotation> +<celldesigner:extension> +<celldesigner:reactionType>STATE_TRANSITION</celldesigner:reactionType> +<celldesigner:baseReactants> +<celldesigner:baseReactant species="s6" alias="sa6"> +<celldesigner:linkAnchor position="S"/> +</celldesigner:baseReactant> +</celldesigner:baseReactants> +<celldesigner:baseProducts> +<celldesigner:baseProduct species="s5" alias="sa5"> +<celldesigner:linkAnchor position="N"/> +</celldesigner:baseProduct> +</celldesigner:baseProducts> +<celldesigner:connectScheme connectPolicy="direct" rectangleIndex="0"> +<celldesigner:listOfLineDirection> +<celldesigner:lineDirection index="0" value="unknown"/> +</celldesigner:listOfLineDirection> +</celldesigner:connectScheme> +<celldesigner:line width="1.0" color="ff000000"/> +</celldesigner:extension> +</annotation> +<listOfReactants> +<speciesReference metaid="CDMT00012" species="s6"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa6</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfReactants> +<listOfProducts> +<speciesReference metaid="CDMT00013" species="s5"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa5</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfProducts> +</reaction> +<reaction metaid="re6" id="re6" reversible="false"> +<annotation> +<celldesigner:extension> +<celldesigner:reactionType>POSITIVE_INFLUENCE</celldesigner:reactionType> +<celldesigner:baseReactants> +<celldesigner:baseReactant species="s5" alias="sa5"> +<celldesigner:linkAnchor position="S"/> +</celldesigner:baseReactant> +</celldesigner:baseReactants> +<celldesigner:baseProducts> +<celldesigner:baseProduct species="s7" alias="sa7"> +<celldesigner:linkAnchor position="N"/> +</celldesigner:baseProduct> +</celldesigner:baseProducts> +<celldesigner:connectScheme connectPolicy="direct"> +<celldesigner:listOfLineDirection> +<celldesigner:lineDirection index="0" value="unknown"/> +</celldesigner:listOfLineDirection> +</celldesigner:connectScheme> +<celldesigner:line width="1.0" color="ff000000"/> +</celldesigner:extension> +</annotation> +<listOfReactants> +<speciesReference metaid="CDMT00005" species="s5"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa5</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfReactants> +<listOfProducts> +<speciesReference metaid="CDMT00006" species="s7"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa7</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfProducts> +</reaction> +<reaction metaid="re7" id="re7" reversible="false"> +<annotation> +<celldesigner:extension> +<celldesigner:reactionType>STATE_TRANSITION</celldesigner:reactionType> +<celldesigner:baseReactants> +<celldesigner:baseReactant species="s8" alias="sa8"/> +</celldesigner:baseReactants> +<celldesigner:baseProducts> +<celldesigner:baseProduct species="s3" alias="sa3"/> +</celldesigner:baseProducts> +<celldesigner:connectScheme connectPolicy="direct" rectangleIndex="0"> +<celldesigner:listOfLineDirection> +<celldesigner:lineDirection index="0" value="unknown"/> +</celldesigner:listOfLineDirection> +</celldesigner:connectScheme> +<celldesigner:line width="1.0" color="ff000000"/> +</celldesigner:extension> +</annotation> +<listOfReactants> +<speciesReference metaid="CDMT00003" species="s8"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa8</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfReactants> +<listOfProducts> +<speciesReference metaid="CDMT00004" species="s3"> +<annotation> +<celldesigner:extension> +<celldesigner:alias>sa3</celldesigner:alias> +</celldesigner:extension> +</annotation> +</speciesReference> +</listOfProducts> +</reaction> +</listOfReactions> +</model> +</sbml> diff --git a/model/src/main/java/lcsb/mapviewer/model/map/MiriamType.java b/model/src/main/java/lcsb/mapviewer/model/map/MiriamType.java index 5cdce9d91ecd41feac15217bd81a8f4721713a4c..0b458250840d9ca44b1d9972419c0e7d944b857a 100644 --- a/model/src/main/java/lcsb/mapviewer/model/map/MiriamType.java +++ b/model/src/main/java/lcsb/mapviewer/model/map/MiriamType.java @@ -465,20 +465,20 @@ public enum MiriamType { new Class<?>[] {}, null), /** - * VMH reaction + * VMH metabolite: https://vmh.uni.lu/. */ - VMH_REACTION("VMH reaction", // - "http://vmh.uni.lu/", // - new String[] { "urn:miriam:vmhreaction", "http://identifiers.org/vmhreaction/" }, // - new Class<?>[] { Reaction.class }, "MIR:00000640"), + VMH_METABOLITE("VMH metabolite", // + "https://vmh.uni.lu/", // + "urn:miriam:vmhmetabolite", // + new Class<?>[] { Chemical.class }, "MIR:00000636"), /** - * VMH reaction + * VMH reaction: https://vmh.uni.lu/. */ - VMH_METABOLITE("VMH metabolite", // - "http://vmh.uni.lu/", // - new String[] { "urn:miriam:vmhmetabolite", "http://identifiers.org/vmhmetabolite/" }, // - new Class<?>[] { Chemical.class }, "MIR:00000636"), + VMH_REACTION("VMH reaction", // + "https://vmh.uni.lu/", // + "urn:miriam:vmhreaction", // + new Class<?>[] { Reaction.class }, "MIR:00000640"), /** * Wikidata: https://www.wikidata.org/. diff --git a/model/src/test/java/lcsb/mapviewer/model/map/MiriamTypeTest.java b/model/src/test/java/lcsb/mapviewer/model/map/MiriamTypeTest.java index 75aad77291d822abd604338c02b98538737a6caa..5e6f427b8cc6ba075f4de2d5bfbc651364dee584 100644 --- a/model/src/test/java/lcsb/mapviewer/model/map/MiriamTypeTest.java +++ b/model/src/test/java/lcsb/mapviewer/model/map/MiriamTypeTest.java @@ -88,16 +88,27 @@ public class MiriamTypeTest { assertNull(MiriamType.getTypeByCommonName("xyz")); } - @Test - public void testGetMiriamByUri1() throws Exception { - try { - MiriamData md = MiriamType.getMiriamByUri("urn:miriam:panther.family:PTHR19384:SF5"); - assertTrue(new MiriamData(MiriamType.PANTHER, "PTHR19384:SF5").equals(md)); - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } + @Test + public void testGetMiriamByUri1() throws Exception { + try { + MiriamData md = MiriamType.getMiriamByUri("urn:miriam:panther.family:PTHR19384:SF5"); + assertTrue(new MiriamData(MiriamType.PANTHER, "PTHR19384:SF5").equals(md)); + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } + + @Test + public void testGetMiriamForVmhMetabolite() throws Exception { + try { + MiriamData md = MiriamType.getMiriamByUri("urn:miriam:vmhmetabolite:o2"); + assertNotNull(md); + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } @Test public void testGetMiriamByUri2() throws Exception { diff --git a/rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java b/rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java index 528c189b5d01beacf58f447900357a3f34efa075..2872961ab979a2a2f4bfa8c13c8963c65ca3a3eb 100644 --- a/rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java +++ b/rest-api/src/main/java/lcsb/mapviewer/api/projects/ProjectRestImpl.java @@ -378,7 +378,6 @@ public class ProjectRestImpl extends BaseRestImpl { params.projectName(getFirstValue(data.get("name"))); params.projectOrganism(getFirstValue(data.get("organism"))); params.sbgnFormat(getFirstValue(data.get("sbgn"))); - params.semanticZoom(getFirstValue(data.get("semantic-zoom"))); params.semanticZoomContainsMultipleLayouts(getFirstValue(data.get("semantic-zoom-contains-multiple-layouts"))); params.version(getFirstValue(data.get("version"))); params.annotations(getFirstValue(data.get("annotate"))); diff --git a/rest-api/src/main/java/lcsb/mapviewer/api/projects/overlays/OverlayRestImpl.java b/rest-api/src/main/java/lcsb/mapviewer/api/projects/overlays/OverlayRestImpl.java index de4428df9f88304e9b3591f8c7f2d899d4935bda..c0540b1f76da9760f3947807504d305998ca2202 100644 --- a/rest-api/src/main/java/lcsb/mapviewer/api/projects/overlays/OverlayRestImpl.java +++ b/rest-api/src/main/java/lcsb/mapviewer/api/projects/overlays/OverlayRestImpl.java @@ -143,7 +143,7 @@ public class OverlayRestImpl extends BaseRestImpl { if (columns != null && !columns.trim().isEmpty()) { columnSet = columns.split(","); } else { - columnSet = new String[] { "modelId", "idObject", "value", "color", "uniqueId" }; + columnSet = new String[] { "modelId", "idObject", "value", "color", "uniqueId", "width" }; } List<Map<String, Object>> result = new ArrayList<>(); @@ -426,6 +426,12 @@ public class OverlayRestImpl extends BaseRestImpl { } } else if (column.equals("description")) { value = colorSchema.getDescription(); + } else if (column.equals("width")) { + if (bioEntity instanceof Reaction) { + value = colorSchema.getLineWidth(); + } else { + continue; + } } else if (column.equals("type")) { if (colorSchema instanceof GeneVariationColorSchema) { value = ColorSchemaType.GENETIC_VARIANT; diff --git a/service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java b/service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java index 94e6941ca0410fc960ae95a773116183261cf293..db4b994f6c1b9ca1fc0bbfcdbfccd03734112b28 100644 --- a/service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java +++ b/service/src/main/java/lcsb/mapviewer/services/impl/ProjectService.java @@ -604,17 +604,11 @@ public class ProjectService implements IProjectService { projectDao.flush(); List<BuildInLayout> buildInLayouts = new ArrayList<>(); - BuildInLayout nested = null; - if (params.isSemanticZoom()) { - nested = BuildInLayout.SEMANTIC; - } else { - nested = BuildInLayout.NESTED; - } if (params.isNetworkLayoutAsDefault()) { buildInLayouts.add(BuildInLayout.NORMAL); - buildInLayouts.add(nested); + buildInLayouts.add(BuildInLayout.NESTED); } else { - buildInLayouts.add(nested); + buildInLayouts.add(BuildInLayout.NESTED); buildInLayouts.add(BuildInLayout.NORMAL); } buildInLayouts.add(BuildInLayout.CLEAN); @@ -633,7 +627,7 @@ public class ProjectService implements IProjectService { topLayout.setHierarchicalView(buildInLayout.isNested()); topModel.addLayout(0, topLayout); List<Layout> semanticLevelOverlays = new ArrayList<>(); - if (buildInLayout.equals(BuildInLayout.SEMANTIC) && params.isSemanticZoomContainsMultipleLayouts()) { + if (params.isSemanticZoomContainsMultipleLayouts()) { for (int i = 0; i <= topModel.getZoomLevels(); i++) { String directory = params.getProjectDir() + "/" + buildInLayout.getDirectorySuffix() + "-" + i + "-" + topModel.getId() + "/"; @@ -657,7 +651,7 @@ public class ProjectService implements IProjectService { connection.getSubmodel().setZoomLevels(generator.computeZoomLevels(connection.getSubmodel().getModel())); connection.getSubmodel().setTileSize(MapGenerator.TILE_SIZE); - if (buildInLayout.equals(BuildInLayout.SEMANTIC) && params.isSemanticZoomContainsMultipleLayouts()) { + if (params.isSemanticZoomContainsMultipleLayouts()) { for (int i = 0; i <= topModel.getZoomLevels(); i++) { String directory = params.getProjectDir() + "/" + buildInLayout.getDirectorySuffix() + "-" + i + "-" + submodelId + "/"; @@ -800,13 +794,11 @@ public class ProjectService implements IProjectService { createModel(params, project); Model originalModel = project.getModels().iterator().next().getModel(); - if (!params.isSemanticZoom()) { - new CreateHierarchyCommand(originalModel, generator.computeZoomLevels(originalModel), - generator.computeZoomFactor(originalModel)).execute(); - for (Model model : originalModel.getSubmodels()) { - new CreateHierarchyCommand(model, generator.computeZoomLevels(model), generator.computeZoomFactor(model)) - .execute(); - } + new CreateHierarchyCommand(originalModel, generator.computeZoomLevels(originalModel), + generator.computeZoomFactor(originalModel)).execute(); + for (Model model : originalModel.getSubmodels()) { + new CreateHierarchyCommand(model, generator.computeZoomLevels(model), generator.computeZoomFactor(model)) + .execute(); } addUsers(project, params); diff --git a/service/src/main/java/lcsb/mapviewer/services/utils/CreateProjectParams.java b/service/src/main/java/lcsb/mapviewer/services/utils/CreateProjectParams.java index a7b7d87c1e5eab3bbc80dfdcebba84a7010a68f4..ca990427c6a0d2394d170f6ec103470e326624c2 100644 --- a/service/src/main/java/lcsb/mapviewer/services/utils/CreateProjectParams.java +++ b/service/src/main/java/lcsb/mapviewer/services/utils/CreateProjectParams.java @@ -63,7 +63,6 @@ public class CreateProjectParams { * Is the project a complex multi-file project. */ private boolean complex; - private boolean semanticZoom; private boolean semanticZoomContainsMultipleLayouts = false; /** @@ -782,19 +781,6 @@ public class CreateProjectParams { return this; } - public CreateProjectParams semanticZoom(boolean semanticZoom) { - this.semanticZoom = semanticZoom; - return this; - } - - public CreateProjectParams semanticZoom(String value) { - return this.semanticZoom("true".equals(value)); - } - - public boolean isSemanticZoom() { - return this.semanticZoom; - } - public CreateProjectParams semanticZoomContainsMultipleLayouts(boolean semanticZoomContainsMultipleLayouts) { this.semanticZoomContainsMultipleLayouts = semanticZoomContainsMultipleLayouts; return this; diff --git a/service/src/main/java/lcsb/mapviewer/services/utils/data/BuildInLayout.java b/service/src/main/java/lcsb/mapviewer/services/utils/data/BuildInLayout.java index 3a54c156fb71a5dd2a4d16d28ae1f6039d451d74..8f30ecde5992625ca63ea397e685eeea258856b0 100644 --- a/service/src/main/java/lcsb/mapviewer/services/utils/data/BuildInLayout.java +++ b/service/src/main/java/lcsb/mapviewer/services/utils/data/BuildInLayout.java @@ -32,7 +32,6 @@ public enum BuildInLayout { // * Standard visualization with hierarchical view. */ NESTED("Pathways and compartments", "_nested", null, true), // - SEMANTIC("Semantic zoom", "_semantic", null, true), /** * Clean visualization (with colors reset to black and white). */ diff --git a/service/src/test/java/lcsb/mapviewer/services/impl/ProjectServiceTest.java b/service/src/test/java/lcsb/mapviewer/services/impl/ProjectServiceTest.java index f1f91b5ad3eeae570530239881a28ca32921baea..73d4df551ad3c4985cebf845a492654479b511c4 100644 --- a/service/src/test/java/lcsb/mapviewer/services/impl/ProjectServiceTest.java +++ b/service/src/test/java/lcsb/mapviewer/services/impl/ProjectServiceTest.java @@ -173,8 +173,8 @@ public class ProjectServiceTest extends ServiceTestFunctions { addZipEntry(entry4).// addZipEntry(entry5).// annotations(true).// - semanticZoom(true).// - semanticZoomContainsMultipleLayouts(true).images(true).// + semanticZoomContainsMultipleLayouts(true).// + images(true).// async(false).// projectDir(tmpResultDir).// addUser("admin", "admin").//