Skip to content

Commit

Permalink
decrease vignette size
Browse files Browse the repository at this point in the history
  • Loading branch information
assaron committed Oct 15, 2023
1 parent b59259c commit 0e4fdf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: gatom
Title: Finding an Active Metabolic Module in Atom Transition Network
Version: 0.99.2
Version: 0.99.3
Authors@R:
c(
person("Anastasiia", "Gainullina", role = c("aut")),
Expand Down
12 changes: 4 additions & 8 deletions vignettes/gatom-tutorial.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -176,22 +176,18 @@ saveModuleToHtml(module = m, file = file.path(tempdir(), "M0.vs.M1.html"),
name="M0.vs.M1")
```

```{r message=FALSE, warning=FALSE}
htmltools::includeHTML(file.path(tempdir(), "M0.vs.M1.html"))
```


We can also save the module to dot format:

```{r}
saveModuleToDot(m, file = paste0(tempdir(), "M0.vs.M1.dot"), name = "M0.vs.M1")
saveModuleToDot(m, file = file.path(tempdir(), "M0.vs.M1.dot"), name = "M0.vs.M1")
```

Such dot file can be further used to generate svg file using `neato` tool
from graphviz suite if it is installed on the system:

```{r eval=FALSE}
system(paste0("neato -Tsvg ", tempdir(), "M0.vs.M1.dot > ", tempdir(), "M0.vs.M1.svg"),
system(paste0("neato -Tsvg ", file.path(tempdir(), "M0.vs.M1.dot"),
" > ", file.path(tempdir(), "M0.vs.M1.svg")),
ignore.stderr=TRUE)
```

Expand All @@ -205,7 +201,7 @@ You may also set different seed for different variants of edge layout with `set.

```{r results="hide", message=FALSE, warning=FALSE}
set.seed(42)
saveModuleToPdf(m, file = paste0(tempdir(), "M0.vs.M1.pdf"), name = "M0.vs.M1",
saveModuleToPdf(m, file = file.path(tempdir(), "M0.vs.M1.pdf"), name = "M0.vs.M1",
n_iter=100, force=1e-5)
```

Expand Down

0 comments on commit 0e4fdf6

Please sign in to comment.