Skip to content

Commit

Permalink
update vignettes for build on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
TomKellyGenetics committed Nov 9, 2020
1 parent 5dee2f6 commit c6a7010
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions 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.
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Expand Up @@ -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)
4 changes: 4 additions & 0 deletions 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)
Expand Down
2 changes: 1 addition & 1 deletion R/leiden.R
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions 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)
Expand Down Expand Up @@ -275,15 +275,15 @@ 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
@Manual{,
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},
}
```
Expand Down
6 changes: 1 addition & 5 deletions cran-comments.md
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions inst/CITATION
Expand Up @@ -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")
)

Expand Down
2 changes: 1 addition & 1 deletion vignettes/benchmarking.Rmd
Expand Up @@ -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")
```
Expand Down
13 changes: 6 additions & 7 deletions vignettes/run_bipartite.Rmd
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
```


Expand Down Expand Up @@ -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
Expand All @@ -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)
```


Expand All @@ -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)
```
2 changes: 1 addition & 1 deletion vignettes/run_igraph.Rmd
Expand Up @@ -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")
```
Expand Down
2 changes: 1 addition & 1 deletion vignettes/run_leiden.Rmd
Expand Up @@ -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")
```
Expand Down

0 comments on commit c6a7010

Please sign in to comment.