Created
May 28, 2019 16:51
-
-
Save seandavi/c64f2a98150f8929804e842c32d525aa to your computer and use it in GitHub Desktop.
Code to accompany https://seandavi.github.io/2019/05/single-cell-packages-and-dependencies-in-bioconductor-using-biocpkgtools/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To accompany: https://seandavi.github.io/2019/05/single-cell-packages-and-dependencies-in-bioconductor-using-biocpkgtools/ | |
library(BiocPkgTools) | |
library(igraph) | |
library(visNetwork) | |
bpl = biocPkgList() | |
bpl_sc = bpl[grepl('SingleCell', bpl$biocViews),] | |
dep_df = buildPkgDependencyDataFrame() | |
dep_graph = buildPkgDependencyIgraph(dep_df) | |
dep_graph_sc = inducedSubgraphByPkgs(dep_graph, bpl_sc$Package ) | |
ledges <- data.frame(color = c("green", "lightblue", "red"), | |
label = c("Depends", "Suggests", "Imports"), arrows =c("from", "from", "from")) | |
visnet_data = toVisNetworkData(dep_graph_sc) | |
visnet_data$nodes$color=NULL | |
visNetwork(nodes = visnet_data$nodes, edges = visnet_data$edges, height = "500px") %>% | |
visNodes(size=50, font = list(size=50)) %>% | |
visIgraphLayout("layout_with_dh", weight.node.dist=15) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment