Hi,
Just a minor issue in getting the example to run start to finish. Otherwise, looks great.
/Alistair
Network visualization example code looks munged in wppi_workflow.html.
- Also should add library(igraph) to code.
- Should move code into a chunk (was this a pesky newline missing?
https://www.bioconductor.org/packages/release/bioc/vignettes/wppi/inst/doc/wppi_workflow.html
Network visualization
The top genes in the first order neighborhood of the genes of interest can be visualized in the PPI network:
{r fig1,dpi = 300, echo=FALSE, eval = FALSE, fig.cap="PPI network visualization of genes of interest (blue nodes) and their first neighbor with similarity scores (green nodes). "} idx_neighbors <- which(!V(graph_op_1)$Gene_Symbol %in% genes_interest) cols <- rep("lightsteelblue2",vcount(graph_op_1)) cols[idx_neighbors] <- "#57da83" scores.vertex <- rep(1,vcount(graph_op_1)) scores.vertex[idx_neighbors] <- 8scores[na.omit(match(V(graph_op_1)$Gene_Symbol,scores$gene_symbol)),]$score par(mar=c(0.1,0.1,0.1,0.1)) plot(graph_op_1,vertex.label = ifelse(scores.vertex>=1,V(graph_op_1)$Gene_Symbol,NA), layout = layout.fruchterman.reingold,vertex.color=cols, vertex.size = 7scores.vertex,edge.width = 0.5,edge.arrow.mode=0, vertex.label.font = 1, vertex.label.cex = 0.45)
library(knitr)
knitr::include_graphics("../figures/fig1.png")