Skip to content

Network visualization example code looks munged in https://www.bioconductor.org/packages/release/bioc/vignettes/wppi/inst/doc/wppi_workflow.html #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
AMChalkie opened this issue May 6, 2025 · 0 comments

Comments

@AMChalkie
Copy link

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.

  1. Also should add library(igraph) to code.
  2. 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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant