Skip to content

Commit

Permalink
release 0.4.3
Browse files Browse the repository at this point in the history
  removed deprecated method to create sparse matrices
  • Loading branch information
TomKellyGenetics committed Sep 12, 2022
1 parent 855e801 commit 95672f6
Show file tree
Hide file tree
Showing 12 changed files with 34,591 additions and 532 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: leiden
Type: Package
Title: R Implementation of Leiden Clustering Algorithm
Version: 0.4.2
Date: 2022-05-01
Version: 0.4.3
Date: 2022-09-10
Authors@R: c(person("S. Thomas", "Kelly", email = "[email protected]", role = c("aut", "cre", "trl")),
person("Vincent A.", "Traag", email = "[email protected]", role = c("com")))
Description: Implements the 'Python leidenalg' module to be called in R.
Expand Down
Binary file modified Meta/vignette.rds
Binary file not shown.
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ S3method(leiden,igraph)
S3method(leiden,list)
S3method(leiden,matrix)
export(leiden)
importClassesFrom(Matrix,CsparseMatrix)
importClassesFrom(Matrix,dMatrix)
importClassesFrom(Matrix,dgCMatrix)
importClassesFrom(Matrix,dgeMatrix)
importClassesFrom(Matrix,generalMatrix)
importFrom(igraph,E)
importFrom(igraph,V)
importFrom(igraph,as.undirected)
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# leiden 0.4.3

Minor update to pass CRAN checks

- removed deprecated method to create sparse matrices

- correct links in citations and vignettes

# leiden 0.4.2

* migrates bug fixes to conda environment and limit on total cells to refactored package
Expand Down
4 changes: 2 additions & 2 deletions R/leiden.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ leiden.data.frame <- leiden.matrix

##' @importFrom igraph graph_from_adjacency_matrix edge_attr set_edge_attr E
##' @importFrom methods as
##' @importClassesFrom Matrix dgCMatrix dgeMatrix
##' @importClassesFrom Matrix dgCMatrix dgeMatrix CsparseMatrix generalMatrix dMatrix
##' @export
leiden.Matrix <- function(object,
partition_type = c(
Expand Down Expand Up @@ -216,7 +216,7 @@ leiden.Matrix <- function(object,
on.exit(options(oo))

#cast to sparse matrix
object <- as(object, "dgCMatrix")
object <- as(as(as(object, "CsparseMatrix"), "generalMatrix"), "dMatrix")
#run as igraph object (passes to reticulate)
if(is.null(weights)){
object <- graph_from_adjacency_matrix(adjmatrix = object, weighted = TRUE)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Leiden Algorithm

## leiden version 0.4.2
## leiden version 0.4.3

[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/leiden)](https://cran.r-project.org/package=leiden)
[![Travis Build Status](https://travis-ci.com/TomKellyGenetics/leiden.svg?branch=master)](https://travis-ci.com/TomKellyGenetics/leiden)
Expand Down Expand Up @@ -284,15 +284,15 @@ Please cite this implementation R in if you use it:
To cite the leiden package in publications use:
S. Thomas Kelly (2022). leiden: R implementation of the Leiden algorithm. R
package version 0.4.2 https://github.com/TomKellyGenetics/leiden
package version 0.4.3 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 = {2022},
note = {R package version 0.4.2},
note = {R package version 0.4.3},
url = {https://github.com/TomKellyGenetics/leiden},
}
```
Expand Down
34,908 changes: 34,437 additions & 471 deletions doc/benchmarking.html

Large diffs are not rendered by default.

81 changes: 72 additions & 9 deletions doc/run_bipartite.html

Large diffs are not rendered by default.

52 changes: 32 additions & 20 deletions doc/run_igraph.html

Large diffs are not rendered by default.

49 changes: 28 additions & 21 deletions doc/run_leiden.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ citEntry(entry = "Manual",
title = "leiden: R implementation of the Leiden algorithm",
author = personList(as.person("S. Thomas Kelly")),
year = "2022",
note = "R package version 0.4.2",
note = "R package version 0.4.3",
url = "https://github.com/TomKellyGenetics/leiden",

textVersion =
paste("S. Thomas Kelly (2020). leiden: R implementation of the Leiden algorithm. R package version 0.4.2",
paste("S. Thomas Kelly (2020). leiden: R implementation of the Leiden algorithm. R package version 0.4.3",
year = "2022",
note = "R package version 0.4.2",
note = "R package version 0.4.3",
url = "https://github.com/TomKellyGenetics/leiden",
"https://github.com/TomKellyGenetics/leiden")
)
Expand Down
2 changes: 1 addition & 1 deletion vignettes/benchmarking.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ Matrix methods in R are significantly slower than the updated igraph version.
```{r, eval=module}
library("Matrix")
adj_mat <- as(as_adjacency_matrix(G), Class = "dgCMatrix")
adj_mat <- as(as(as(as_adjacency_matrix(G), Class = "CsparseMatrix"), "generalMatrix"), "dMatrix")
time15 <- Sys.time()
partition <- leiden(adj_mat, "ModularityVertexPartition", legacy = TRUE)
partition
Expand Down

0 comments on commit 95672f6

Please sign in to comment.