【发布时间】:2016-07-20 04:49:01
【问题描述】:
我不确定在使用 cytoscape.js 中的 CoSE 插件生成力导向布局时如何最好地利用边缘权重(例如,两个相互作用的蛋白质之间的相互作用强度)。有人可以提供任何指示。应该是“idealEdgeLength”还是“edgeElasticity”?
(EDIT) 下图显示了我目前得到的 (A) 和我正在努力实现的 (B)。下面还有我用来生成布局的参数。
谢谢, 数据。
PS: Click to view 显示当前(标记为“A”)和预期(标记为“B”)布局的图。以下是“A”的布局选项。
var options = {
name: 'cose',
// Called on `layoutready`
ready: function () { },
// Called on `layoutstop`
stop: function () { },
// Whether to animate while running the layout
animate: true,
// Number of iterations between consecutive screen positions update (0 -> only updated on the end)
refresh: 20,
// Whether to fit the network view after when done
fit: true,
// Padding on fit
padding: 30,
// Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }
boundingBox: undefined,
componentSpacing: 100,
// Whether to randomize node positions on the beginning
randomize: true,
// Whether to use the JS console to print debug messages
debug: false,
// Node repulsion (non overlapping) multiplier
nodeRepulsion: 400000,
// Node repulsion (overlapping) multiplier
nodeOverlap: 10,
// Ideal edge (non nested) length
idealEdgeLength: 10,
// Divisor to compute edge forces
edgeElasticity: 100,
// Nesting factor (multiplier) to compute ideal edge length for nested edges
nestingFactor: 5,
// Gravity force (constant)
gravity: 80,
// Maximum number of iterations to perform
numIter: 10000,
// Initial temperature (maximum node displacement)
initialTemp: 100,
// Cooling factor (how the temperature is reduced between consecutive iterations
coolingFactor: 0.95,
// Lower temperature threshold (below this point the layout will end)
minTemp: 1.0
};
【问题讨论】:
标签: cytoscape.js