Commit da5ce36d authored by maxchaza's avatar maxchaza
Browse files

Merge branch 'hotfix/fixExtraction'

parents 0b815a7b 9652c611
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
/** /**
* The version of the application. * The version of the application.
*/ */
"version": "3.0.1", "version": "3.0.2",
/** /**
* The relative path to the application's markup file (html, jsp, asp, etc.). * The relative path to the application's markup file (html, jsp, asp, etc.).
......
...@@ -34,13 +34,16 @@ Ext.define('metExploreViz.view.form.selectMappingForExtraction.SelectMappingForE ...@@ -34,13 +34,16 @@ Ext.define('metExploreViz.view.form.selectMappingForExtraction.SelectMappingForE
if(view.lookupReference('selectMappingForExtraction').getValue() && view.lookupReference('selectMappingForExtraction').getValue()!=="None"){ if(view.lookupReference('selectMappingForExtraction').getValue() && view.lookupReference('selectMappingForExtraction').getValue()!=="None"){
var selectedMappings = view.lookupReference('selectMappingForExtraction').getValue(); var selectedMappings = view.lookupReference('selectMappingForExtraction').getValue();
var nodesToLinks = _metExploreViz.getSessionById("viz").getD3Data().getNodes() var nodesToLinks = _metExploreViz.getSessionById("viz").getD3Data().getNodes()
.filter(function(node){
return node.getBiologicalType()==="metabolite"
|| node.getBiologicalType()==="reaction";
})
.filter(function(node){ return node.mappingDatas.length!==0;}) .filter(function(node){ return node.mappingDatas.length!==0;})
.filter(function (node) { .filter(function (node) {
return node.getMappingDatas() return node.getMappingDatas()
.filter(map => selectedMappings.includes(map.getMappingName())).length !==0; .filter(map => selectedMappings.includes(map.getMappingName())).length !==0;
}) })
.map(node => node.getId()); .map(node => node.getId());
console.log(nodesToLinks);
metExploreD3.GraphFunction.keepOnlySubnetwork(nodesToLinks); metExploreD3.GraphFunction.keepOnlySubnetwork(nodesToLinks);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment