Skip to content

Commit 6b8cacd

Browse files
committed
bug fix: add diag values of 1 to adj
1 parent 862d9ec commit 6b8cacd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vignettes/MetNet.Rmd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,8 @@ We use here the assay `"combine_binary"` from the `AdjacencyMatrix` of type
606606
`combine` and pass it to the `graph_from_adjacency_matrix` function:
607607
```{r visualisation,eval=TRUE,echo=TRUE,fig.cap='_Ab initio_ network inferred from structural and quantitative mass spectrometry data. Vertices are connected that are separated by given metabolic transformation and statistical association.'}
608608
adj <- assay(comb_adj, "combine_binary")
609-
g <- igraph::graph_from_adjacency_matrix(adj, mode = "undirected")
609+
diag(adj) <- 1
610+
g <- igraph::graph_from_adjacency_matrix(adj, mode = "undirected", diag = FALSE)
610611
plot(g, edge.width = 2, vertex.label.cex = 0.5, edge.color = "grey")
611612
```
612613

0 commit comments

Comments
 (0)