sysbiolab / treeandleaf Goto Github PK
View Code? Open in Web Editor NEWAn R package for displaying binary trees, aiming to represent multiple layers of information on dendrogram leaves.
An R package for displaying binary trees, aiming to represent multiple layers of information on dendrogram leaves.
We are preparing the next patch release of igraph
's R interface and as we were doing reverse-dependency checks before submission, we noticed that TreeAndLeaf
calls igraph's edge_betweenness()
function on a graph where the weights of all edges are zeros. This is disallowed in igraph's C core as the shortest paths are not well-defined in a graph where all weights are zeros (essentially any simple or non-simple path from any node to any other node is a shortest path).
The issue can be fixed easily with the following patch, but I am not familar with the algorithm well enough to judge whether this was the original intention or not:
diff --git a/R/treeAndLeaf.R b/R/treeAndLeaf.R
index 479d03a..5fa00f6 100644
--- a/R/treeAndLeaf.R
+++ b/R/treeAndLeaf.R
@@ -66,7 +66,7 @@ treeAndLeaf <- function(obj){
V(gg)$isLeaf <- V(gg)$name%in%coords$phylo$tip.label
gg$centralVertex <- coords$centralVertex
#--- set edge weights
- E(gg)$weight <- 0
+ E(gg)$weight <- 1
bt <- igraph::edge_betweenness(gg, directed = T)
bt <- (1 - bt/max(bt))
E(gg)$weight <- bt
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.