|
|
|
@ -55,6 +55,8 @@ export default { |
|
|
|
|
MIRemaining: [], |
|
|
|
|
featureAddRemCount: [], |
|
|
|
|
mode: 0, // this should be 0 |
|
|
|
|
KeepIDs: [], |
|
|
|
|
keepNumberOfCompareNodes: 0 |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
@ -87,6 +89,8 @@ export default { |
|
|
|
|
}, |
|
|
|
|
setLayerExplore() { |
|
|
|
|
this.mode = 0 |
|
|
|
|
this.KeepIDs = [] |
|
|
|
|
this.keepNumberOfCompareNodes = 0 |
|
|
|
|
this.graphVizualization() |
|
|
|
|
}, |
|
|
|
|
setLayerCompare() { |
|
|
|
@ -94,7 +98,8 @@ export default { |
|
|
|
|
this.graphVizualization() |
|
|
|
|
}, |
|
|
|
|
computeOnce () { |
|
|
|
|
var listofNodes = this.dataFS[0] |
|
|
|
|
|
|
|
|
|
var listofNodes = this.dataFS[34] |
|
|
|
|
var dataLocOnce = [] |
|
|
|
|
for (let loop=1; loop<=5; loop++) { |
|
|
|
|
dataLocOnce.push(JSON.parse(this.dataFS[loop+2])) |
|
|
|
@ -133,7 +138,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "round", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: "r", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLogE = element.roundLogE |
|
|
|
|
roundLogE = JSON.parse(roundLogE[loop-1]) |
|
|
|
@ -153,7 +158,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "roundLogE", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: "r_E", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLog2 = element.roundLog2 |
|
|
|
|
roundLog2 = JSON.parse(roundLog2[loop-1]) |
|
|
|
@ -173,7 +178,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "roundLog2", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: "r_2", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLog10 = element.roundLog10 |
|
|
|
|
roundLog10 = JSON.parse(roundLog10[loop-1]) |
|
|
|
@ -193,13 +198,12 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "roundLog10", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: "r_10", valueIns: outcome}) |
|
|
|
|
pushEachFinal.push({key: listofNodes[index], value: pushEach}) |
|
|
|
|
}) |
|
|
|
|
pushEachFinalFinal.push(pushEachFinal) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EventBus.$emit('overviewCall', pushEachFinalFinal) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -213,7 +217,7 @@ export default { |
|
|
|
|
this.MIRemaining = [] |
|
|
|
|
|
|
|
|
|
var quadrantNumberLocal = this.quadrantNumber |
|
|
|
|
var listofNodes = this.dataFS[0] |
|
|
|
|
var listofNodes = this.dataFS[34] |
|
|
|
|
var dataLoc = JSON.parse(this.dataFS[3+quadrantNumberLocal]) |
|
|
|
|
|
|
|
|
|
var pushEachFinal = [] |
|
|
|
@ -251,7 +255,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "round", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: "r", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLogE = element.roundLogE |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(roundLogE[5+quadrantNumberLocal]))) |
|
|
|
@ -274,7 +278,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "roundLogE", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: "r_E", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLog2 = element.roundLog2 |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(roundLog2[5+quadrantNumberLocal]))) |
|
|
|
@ -297,7 +301,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "roundLog2", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: "r_2", valueIns: outcome}) |
|
|
|
|
|
|
|
|
|
var roundLog10 = element.roundLog10 |
|
|
|
|
corrMatrixCombLoc.push(Object.values(JSON.parse(roundLog10[5+quadrantNumberLocal]))) |
|
|
|
@ -320,7 +324,7 @@ export default { |
|
|
|
|
oldVal = oldVal / listofNodes.length |
|
|
|
|
newVal = newVal / listofNodes.length |
|
|
|
|
outcome = oldVal - newVal |
|
|
|
|
pushEach.push({keyIns: "roundLog10", valueIns: outcome}) |
|
|
|
|
pushEach.push({keyIns: "r_10", valueIns: outcome}) |
|
|
|
|
pushEachFinal.push({key: listofNodes[index], value: pushEach}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -333,7 +337,7 @@ export default { |
|
|
|
|
var groupID = 0 |
|
|
|
|
listofNodes.forEach( function(element) { |
|
|
|
|
groupID++ |
|
|
|
|
nodes.push({"name": element, "group": groupID+"_root"}) |
|
|
|
|
nodes.push({"name": element, "group": groupID+"_root", "active": true}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
var links = [] |
|
|
|
@ -354,10 +358,10 @@ export default { |
|
|
|
|
listofNodes.forEach( function(element) { |
|
|
|
|
groupID++ |
|
|
|
|
nodes.push( |
|
|
|
|
{"name": element+"_r", "group": groupID}, |
|
|
|
|
{"name": element+"_r_E", "group": groupID}, |
|
|
|
|
{"name": element+"_r_2", "group": groupID}, |
|
|
|
|
{"name": element+"_r_10", "group": groupID}, |
|
|
|
|
{"name": "r", "group": groupID, "active": false}, |
|
|
|
|
{"name": "r_E", "group": groupID, "active": false}, |
|
|
|
|
{"name": "r_2", "group": groupID, "active": false}, |
|
|
|
|
{"name": "r_10", "group": groupID, "active": false}, |
|
|
|
|
) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
@ -375,7 +379,6 @@ export default { |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
this.jsonData = {"nodes": nodes, "links": links}; |
|
|
|
|
|
|
|
|
|
this.graphVizualization() |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -383,7 +386,7 @@ export default { |
|
|
|
|
|
|
|
|
|
var legendCall = this.legendOnlyOnce |
|
|
|
|
|
|
|
|
|
var listofNodes = this.dataFS[0] |
|
|
|
|
var listofNodes = this.dataFS[34] |
|
|
|
|
|
|
|
|
|
var corrTarget = JSON.parse(this.dataFS[8+this.quadrantNumber]) |
|
|
|
|
var corrGlob = JSON.parse(this.dataFS[13+this.quadrantNumber]) |
|
|
|
@ -508,8 +511,8 @@ export default { |
|
|
|
|
.attr("stroke-width", function(d) { return Math.sqrt(d.value); }); |
|
|
|
|
|
|
|
|
|
var modeLoc = this.mode |
|
|
|
|
var selectionCounter = 0 |
|
|
|
|
var IDsGather = [] |
|
|
|
|
var selectionCounter = this.keepNumberOfCompareNodes |
|
|
|
|
var IDsGather = this.KeepIDs |
|
|
|
|
|
|
|
|
|
var node = svg.append('g') |
|
|
|
|
.attr('class', 'nodes') |
|
|
|
@ -524,11 +527,35 @@ export default { |
|
|
|
|
var items = document.getElementsByClassName(numb) |
|
|
|
|
items.forEach( function (it) { |
|
|
|
|
it.childNodes[0].style.visibility = "hidden"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.3) rotate(180)"); |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.28) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "#D3D3D3"; |
|
|
|
|
it.childNodes[2].style.visibility = "hidden"; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < graph.nodes.length; i++) { |
|
|
|
|
var str = String(graph.nodes[i].group) |
|
|
|
|
if (!str.includes("root")) { |
|
|
|
|
graph.nodes[i].active = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
node.selectAll('text').remove(); |
|
|
|
|
|
|
|
|
|
var labels = node.append("text") |
|
|
|
|
.text(function(d) { |
|
|
|
|
return d.name; |
|
|
|
|
}) |
|
|
|
|
.attr('x', 39) |
|
|
|
|
.attr('y', function(d) { |
|
|
|
|
if(d.active) |
|
|
|
|
return 8 |
|
|
|
|
else |
|
|
|
|
return 35 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
node.append('title').text(function (d) { return d.name; }); |
|
|
|
|
|
|
|
|
|
var groupLoc = index + 1 |
|
|
|
|
var items = document.getElementsByClassName(groupLoc) |
|
|
|
|
items.forEach( function (it) { |
|
|
|
@ -539,11 +566,37 @@ export default { |
|
|
|
|
it.childNodes[2].style.visibility = "visible"; |
|
|
|
|
} else { |
|
|
|
|
it.childNodes[0].style.visibility = "hidden"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.3) rotate(180)"); |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.28) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "#D3D3D3"; |
|
|
|
|
it.childNodes[2].style.visibility = "hidden"; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
var regex = /\d+/g |
|
|
|
|
var string = id.group |
|
|
|
|
var matches = parseInt(string.match(regex)[0]) |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < graph.nodes.length; i++) { |
|
|
|
|
|
|
|
|
|
if (graph.nodes[i].group == matches) { |
|
|
|
|
graph.nodes[i].active = true |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
node.selectAll('text').remove(); |
|
|
|
|
|
|
|
|
|
var labels = node.append("text") |
|
|
|
|
.text(function(d) { |
|
|
|
|
return d.name; |
|
|
|
|
}) |
|
|
|
|
.attr('x', 39) |
|
|
|
|
.attr('y', function(d) { |
|
|
|
|
if(d.active) |
|
|
|
|
return 8 |
|
|
|
|
else |
|
|
|
|
return 35 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
node.append('title').text(function (d) { return d.name; }); |
|
|
|
|
EventBus.$emit('brushLink', groupLoc-1) |
|
|
|
|
} else { |
|
|
|
|
var groupsColor = d3.select('#svg'+index)._groups['0'][0].childNodes[0].childNodes[1] |
|
|
|
@ -554,10 +607,13 @@ export default { |
|
|
|
|
// add here the different states of comparison! (=2 and =3) |
|
|
|
|
groupsColor.setAttribute('fill', 'yellow') |
|
|
|
|
selectionCounter = selectionCounter + 1 |
|
|
|
|
EventBus.$emit('Counter', selectionCounter) |
|
|
|
|
IDsGather.push(idLocal); |
|
|
|
|
if (selectionCounter == 2) { |
|
|
|
|
EventBus.$emit('UpdateIDs', IDsGather) |
|
|
|
|
EventBus.$emit('CompareTwo', IDsGather) |
|
|
|
|
} else if (selectionCounter == 3) { |
|
|
|
|
EventBus.$emit('UpdateIDs', IDsGather) |
|
|
|
|
EventBus.$emit('CompareThree', IDsGather) |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
@ -566,10 +622,12 @@ export default { |
|
|
|
|
} else { |
|
|
|
|
groupsColor.setAttribute('fill', 'black') |
|
|
|
|
selectionCounter = selectionCounter - 1 |
|
|
|
|
EventBus.$emit('Counter', selectionCounter) |
|
|
|
|
var index = IDsGather.indexOf(idLocal); |
|
|
|
|
if (index > -1) { |
|
|
|
|
IDsGather.splice(index, 1); |
|
|
|
|
} |
|
|
|
|
EventBus.$emit('UpdateIDs', IDsGather) |
|
|
|
|
if (selectionCounter == 1) { |
|
|
|
|
EventBus.$emit('Default') |
|
|
|
|
} |
|
|
|
@ -583,11 +641,37 @@ export default { |
|
|
|
|
var items = document.getElementsByClassName(numb) |
|
|
|
|
items.forEach( function (it) { |
|
|
|
|
it.childNodes[0].style.visibility = "hidden"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.3) rotate(180)"); |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.28) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "white"; |
|
|
|
|
it.childNodes[2].style.visibility = "hidden"; |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
var regex = /\d+/g |
|
|
|
|
var string = id.group |
|
|
|
|
var matches = parseInt(string.match(regex)[0]) |
|
|
|
|
|
|
|
|
|
for (let i = 0; i < graph.nodes.length; i++) { |
|
|
|
|
|
|
|
|
|
if (graph.nodes[i].group == matches) { |
|
|
|
|
graph.nodes[i].active = false |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
node.selectAll('text').remove(); |
|
|
|
|
|
|
|
|
|
var labels = node.append("text") |
|
|
|
|
.text(function(d) { |
|
|
|
|
return d.name; |
|
|
|
|
}) |
|
|
|
|
.attr('x', 39) |
|
|
|
|
.attr('y', function(d) { |
|
|
|
|
if(d.active) |
|
|
|
|
return 8 |
|
|
|
|
else |
|
|
|
|
return 35 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
node.append('title').text(function (d) { return d.name; }); |
|
|
|
|
EventBus.$emit('brushLink', -1) |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
@ -649,6 +733,7 @@ export default { |
|
|
|
|
dispatch.call('layoutend', forceSim, p, i); |
|
|
|
|
|
|
|
|
|
++i; |
|
|
|
|
|
|
|
|
|
if (i >= paramList.length) { |
|
|
|
|
|
|
|
|
|
var widthLoc = 100; |
|
|
|
@ -664,8 +749,11 @@ export default { |
|
|
|
|
|
|
|
|
|
var data = [] |
|
|
|
|
var barchartData = [] |
|
|
|
|
|
|
|
|
|
data.push({value: VIFVarFormatted[indexNode], color: 'black'}) |
|
|
|
|
if (IDsGather.includes(indexNode)) { |
|
|
|
|
data.push({value: VIFVarFormatted[indexNode], color: 'yellow'}) |
|
|
|
|
} else { |
|
|
|
|
data.push({value: VIFVarFormatted[indexNode], color: 'black'}) |
|
|
|
|
} |
|
|
|
|
data.push({value: corrGlobFormatted[indexNode], color: colorsScaleNodes(MIVar[indexNode])}) |
|
|
|
|
|
|
|
|
|
for(let k = 0; k < uniqueTarget.length; k++) { |
|
|
|
@ -859,8 +947,13 @@ export default { |
|
|
|
|
.text(function(d) { |
|
|
|
|
return d.name; |
|
|
|
|
}) |
|
|
|
|
.attr('x', 20) |
|
|
|
|
.attr('y', 8); |
|
|
|
|
.attr('x', 39) |
|
|
|
|
.attr('y', function(d) { |
|
|
|
|
if(d.active) |
|
|
|
|
return 8 |
|
|
|
|
else |
|
|
|
|
return 35 |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
node.append('title').text(function (d) { return d.name; }); |
|
|
|
|
|
|
|
|
@ -878,7 +971,7 @@ export default { |
|
|
|
|
var items = document.getElementsByClassName(numb) |
|
|
|
|
items.forEach( function (it) { |
|
|
|
|
it.childNodes[0].style.visibility = "hidden"; |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.3) rotate(180)"); |
|
|
|
|
it.childNodes[1].setAttribute("transform", "translate(50,50) scale(0.28) rotate(180)"); |
|
|
|
|
it.childNodes[1].childNodes[0].style.fill = "#D3D3D3"; |
|
|
|
|
it.childNodes[2].style.visibility = "hidden"; |
|
|
|
|
}) |
|
|
|
@ -1041,7 +1134,7 @@ export default { |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
var textLine = d3.select('#legendText').append("svg").attr('width', 160).attr('height', 90) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
textLine.append('line') |
|
|
|
|
.style("stroke", "black") |
|
|
|
|
.style("stroke-width", 3) |
|
|
|
@ -1059,13 +1152,13 @@ export default { |
|
|
|
|
.style("stroke", "black") |
|
|
|
|
.style("stroke-width", 3) |
|
|
|
|
.attr("x1", 42) |
|
|
|
|
.attr("y1", 33) |
|
|
|
|
.attr("y1", 31) |
|
|
|
|
.attr("x2", 53) |
|
|
|
|
.attr("y2", 33) |
|
|
|
|
.attr("y2", 31) |
|
|
|
|
|
|
|
|
|
textLine.append("text") |
|
|
|
|
.attr("dx", "54") |
|
|
|
|
.attr("dy", "38") |
|
|
|
|
.attr("dy", "36") |
|
|
|
|
.text("Per class COR") |
|
|
|
|
|
|
|
|
|
textLine.append('line') |
|
|
|
@ -1194,6 +1287,9 @@ export default { |
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
|
|
|
|
|
|
EventBus.$on('Counter', data => { this.keepNumberOfCompareNodes = data }) |
|
|
|
|
EventBus.$on('UpdateIDs', data => { this.KeepIDs = data }) |
|
|
|
|
|
|
|
|
|
this.InitSlider() |
|
|
|
|
EventBus.$on('CorrThres', data => { this.threshold = data }) |
|
|
|
|
EventBus.$on('CorrThres', this.initializeNetwork) |
|
|
|
|