I want to ask if there is a method to set depth to root in breathfirst layout in cytoscape.js. Just like the function in concentric layout:
name: 'concentric',
concentric: function(){ // returns numeric value for each node, placing higher nodes in levels towards the center
return this.degree();
},
The concentric function returns a distance of the nodes to the center. For breathfirst layout, I want to set depth for each node and put nodes with the same depth in one line(layer).
I think this function will be very useful in displaying protein localization or any other tree structure. For example, in a cytoscape plugin Cerebral (
http://www.pathogenomics.ca/cerebral/), we could arrange proteins based on their sub-cellular location, and layer different locations. It would be great if we could have similar layout in the web version.
Thanks!
Jia