diff --git a/DESCRIPTION b/DESCRIPTION index bbbc783..eaf1e20 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: leiden Type: Package Title: R Implementation of Leiden Clustering Algorithm -Version: 0.3.4 -Date: 2020-10-30 +Version: 0.3.5 +Date: 2020-11-09 Authors@R: c(person("S. Thomas", "Kelly", email = "tom.kelly@riken.jp", role = c("aut", "cre", "trl")), person("Vincent A.", "Traag", email = "v.a.traag@cwts.leidenuniv.nl", role = c("com"))) Description: Implements the 'Python leidenalg' module to be called in R. diff --git a/NAMESPACE b/NAMESPACE index b123a54..dd1e613 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -28,4 +28,5 @@ importFrom(methods,is) importFrom(reticulate,import) importFrom(reticulate,py_to_r) importFrom(reticulate,r_to_py) +importFrom(utils,capture.output) importFrom(utils,install.packages) diff --git a/NEWS.md b/NEWS.md index 052a8b6..6b374ad 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,7 @@ +# leiden 0.3.5 + +* background changes to build vignettes on CRAN + # leiden 0.3.4 * add support for bipartite graphs (requires leidenalg 0.6.1 or later) diff --git a/R/leiden.R b/R/leiden.R index fa39091..546e269 100644 --- a/R/leiden.R +++ b/R/leiden.R @@ -421,7 +421,7 @@ numpy <- NULL if (all) { suppressWarnings(suppressMessages(suppressPackageStartupMessages( - utils::capture.output(expr, file = file) + capture.output(expr, file = file) ))) } else { capture.output(expr, file = file) diff --git a/README.md b/README.md index 6d34135..0ad9da5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Leiden Algorithm -## leiden version 0.3.4 +## leiden version 0.3.5 [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/leiden)](https://cran.r-project.org/package=leiden) [![Travis Build Status](https://travis-ci.org/TomKellyGenetics/leiden.svg?branch=master)](https://travis-ci.org/TomKellyGenetics/leiden) @@ -275,7 +275,7 @@ Please cite this implementation R in if you use it: To cite the leiden package in publications use: S. Thomas Kelly (2020). leiden: R implementation of the Leiden algorithm. R - package version 0.3.4 https://github.com/TomKellyGenetics/leiden + package version 0.3.5 https://github.com/TomKellyGenetics/leiden A BibTeX entry for LaTeX users is @@ -283,7 +283,7 @@ A BibTeX entry for LaTeX users is title = {leiden: R implementation of the Leiden algorithm}, author = {S. Thomas Kelly}, year = {2020}, - note = {R package version 0.3.4}, + note = {R package version 0.3.5}, url = {https://github.com/TomKellyGenetics/leiden}, } ``` diff --git a/cran-comments.md b/cran-comments.md index fe25f9d..8d7158b 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -13,11 +13,7 @@ ## Updates -Minor update to implement functions in python version. - -Improvements to install of python libraries upon loading if python -or conda environments are available (checks suppressed on systems -where they are not). +Minor update to disable warnings when building vignettes. No GitHub dependencies found if no internet connection. ## Python integration diff --git a/inst/CITATION b/inst/CITATION index a09fbd3..fa6d80e 100644 --- a/inst/CITATION +++ b/inst/CITATION @@ -4,11 +4,11 @@ citEntry(entry = "Manual", title = "leiden: R implementation of the Leiden algorithm", author = personList(as.person("S. Thomas Kelly")), year = "2020", - note = "R package version 0.3.4", + note = "R package version 0.3.5", url = "https://github.com/TomKellyGenetics/leiden", textVersion = - paste("S. Thomas Kelly (2020). leiden: R implementation of the Leiden algorithm. R package version 0.3.4", + paste("S. Thomas Kelly (2020). leiden: R implementation of the Leiden algorithm. R package version 0.3.5", "https://github.com/TomKellyGenetics/leiden") ) diff --git a/vignettes/benchmarking.Rmd b/vignettes/benchmarking.Rmd index 7057e56..fbeb5d8 100644 --- a/vignettes/benchmarking.Rmd +++ b/vignettes/benchmarking.Rmd @@ -269,7 +269,7 @@ The R version can be installed with devtools or from CRAN: install.packages("leiden") ``` -```{r, eval=TRUE, include=FALSE} +```{r, eval=FALSE, include=FALSE} install.packages("leiden", quiet = TRUE, repos = 1) devtools::install_github("TomKellyGenetics/leiden", ref = "dev") ``` diff --git a/vignettes/run_bipartite.Rmd b/vignettes/run_bipartite.Rmd index 551427e..19204fe 100644 --- a/vignettes/run_bipartite.Rmd +++ b/vignettes/run_bipartite.Rmd @@ -108,9 +108,8 @@ Here we import a plotting function to display these 2 groups. ```{r, warning=FALSE, message=FALSE, fig.align='center', out.width="80%",fig.height = 6, fig.width = 6, fig.retina=1.5} library("graphsim") -plot_directed(bipartite_graph, - fill.node = c("palevioletred", "lightblue")[as.integer(V(bipartite_graph)$type)+1], - cex.arrow = 0.75, col.arrow = "grey75") +node.cols <- c("palevioletred", "lightblue")[as.integer(V(bipartite_graph)$type)+1] +plot(bipartite_graph, vertex.color = node.cols, layout = layout.kamada.kawai) ``` This data can also be represented by an adjacency matrix derived from a graph object. @@ -160,7 +159,7 @@ Here we can see partitions in the plotted results. The nodes that are more inter ```{r, warning=FALSE, message=FALSE, fig.align='center', out.width="80%",fig.height = 6, fig.width = 6, fig.retina=1.5} library("RColorBrewer") node.cols <- brewer.pal(max(c(3, partition)),"Pastel1")[partition] -plot(bipartite_graph, vertex.color = node.cols) +plot(bipartite_graph, vertex.color = node.cols, layout = layout.kamada.kawai) ``` @@ -188,7 +187,7 @@ Here we can see partitions in the plotted results are different to as those comp ```{r, warning=FALSE, message=FALSE, fig.align='center', out.width="80%",fig.height = 6, fig.width = 6, fig.retina=1.5} library("RColorBrewer") node.cols <- brewer.pal(max(c(3, partition)),"Pastel1")[partition] -plot(bipartite_graph, vertex.color = node.cols) +plot(bipartite_graph, vertex.color = node.cols, layout = layout.kamada.kawai) ``` #### Resolution Parameter @@ -213,7 +212,7 @@ Here we can see partitions in the plotted results are the same as those computed ```{r, eval=module, warning=FALSE, message=FALSE, fig.align='center', out.width="80%",fig.height = 6, fig.width = 6, fig.retina=1.5} library("RColorBrewer") node.cols <- brewer.pal(max(c(3, partition)),"Pastel1")[partition] -plot(bipartite_graph, vertex.color = node.cols) +plot(bipartite_graph, vertex.color = node.cols, layout = layout.kamada.kawai) ``` @@ -240,5 +239,5 @@ Here we can see partitions in the plotted results are the same as those computed ```{r, eval=module, warning=FALSE, message=FALSE, fig.align='center', out.width="80%",fig.height = 6, fig.width = 6, fig.retina=1.5} library("RColorBrewer") node.cols <- brewer.pal(max(c(3, partition)),"Pastel1")[partition] -plot(bipartite_graph, vertex.color = node.cols) +plot(bipartite_graph, vertex.color = node.cols, layout = layout.kamada.kawai) ``` diff --git a/vignettes/run_igraph.Rmd b/vignettes/run_igraph.Rmd index eed9477..a39b680 100644 --- a/vignettes/run_igraph.Rmd +++ b/vignettes/run_igraph.Rmd @@ -48,7 +48,7 @@ The current release on CRAN can be installed with: install.packages("leiden") ``` -```{r, eval=TRUE, include=FALSE} +```{r, eval=FALSE, include=FALSE} install.packages("leiden", quiet = TRUE, repos = 1) devtools::install_github("TomKellyGenetics/leiden", ref = "dev") ``` diff --git a/vignettes/run_leiden.Rmd b/vignettes/run_leiden.Rmd index f7bf480..d874904 100644 --- a/vignettes/run_leiden.Rmd +++ b/vignettes/run_leiden.Rmd @@ -48,7 +48,7 @@ The current release on CRAN can be installed with: install.packages("leiden") ``` -```{r, eval=TRUE, include=FALSE} +```{r, eval=FALSE, include=FALSE} install.packages("leiden", quiet = TRUE, repos = 1) devtools::install_github("TomKellyGenetics/leiden", ref = "dev") ```