Skip to content
Snippets Groups Projects
Commit 3636101c authored by Piotr Gawron's avatar Piotr Gawron
Browse files

reaction types replaced with AF and PD group

parent 6c0696b2
No related branches found
No related tags found
1 merge request!1433Resolve "InfoTab > EXPORT > NETWORK - suggestion"
Pipeline #51994 canceled
minerva (16.1.0~alpha.0) stable; urgency=medium
* Improvement: possibility to register map in minerva-net (#1595)
* Small improvement: reaction type list simplified in the export network
(#1246)
* Small improvement: export to image allows to define size of the image (#955)
* Small improvement: AVOGADRO unit type from SBML is parsed properly (#1612)
* Small improvement: data overlays have automatically generated legend (#205,
......
......@@ -12,6 +12,36 @@ var Functions = require('../../Functions');
var ValidationError = require('../../ValidationError');
var Alias = require('../../map/data/Alias');
var ACTIVITY_FLOW_TYPES = [
"Reduced modulation",
"Reduced physical stimulation",
"Reduced trigger",
"Unknown reduced modulation",
"Unknown reduced physical stimulation",
"Unknown reduced trigger",
"Negative influence",
"Positive influence",
"Unknown negative influence",
"Unknown positive influence"
];
var PROCESS_DESCRIPTION_TYPES = [
"Dissociation",
"Heterodimer association",
"Inhibition",
"Known transition omitted",
"Modulation",
"Physical stimulation",
"State transition",
"Transcription",
"Translation",
"Transport",
"Trigger",
"Truncation",
"Unknown catalysis",
"Unknown inhibition",
"Unknown transition"
];
/**
*
* @param {Configuration} [params.configuration]
......@@ -45,7 +75,16 @@ NetworkExportPanel.prototype.init = function () {
elementTypeDiv.appendChild(self._createSelectTypeDiv(configuration.getElementTypes(), "Element type"));
element.appendChild(elementTypeDiv);
var reactionTypeDiv = Functions.createElement({type: "div", name: "reactionTypes"});
reactionTypeDiv.appendChild(self._createSelectTypeDiv(configuration.getReactionTypes(), "Reaction type"));
reactionTypeDiv.appendChild(self._createSelectTypeDiv(
[{
name: "Activity flow",
parentClass: "Reaction",
className: "ActivityFlow"
}, {
name: "Process description",
parentClass: "Reaction",
className: "ProcessDescription"
}], "Reaction type"));
element.appendChild(reactionTypeDiv);
var submapDiv = Functions.createElement({type: "div", name: "submapTypes"});
submapDiv.appendChild(self._createSelectSubmapDiv(self.getProject().getModels()));
......@@ -144,7 +183,15 @@ NetworkExportPanel.prototype.getAllColumns = function () {
* @returns {boolean}
*/
function matchReaction(reaction, elementIds, reactionTypes, submapIds) {
if ($.inArray(reaction.getType(), reactionTypes) === -1) {
var types = [];
if ($.inArray("Activity flow", reactionTypes) >= 0) {
types = types.concat(ACTIVITY_FLOW_TYPES);
}
if ($.inArray("Process description", reactionTypes) >= 0) {
types = types.concat(PROCESS_DESCRIPTION_TYPES);
}
if ($.inArray(reaction.getType(), types) === -1) {
return false;
}
if ($.inArray(reaction.getModelId(), submapIds) === -1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment