-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f14b0cb
commit f04bf99
Showing
15 changed files
with
108 additions
and
239 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,13 @@ Type: Package | |
Title: Implements the Leiden Algorithm via an R Interface | ||
Version: 0.1.0 | ||
Date: 2020-08-18 | ||
Authors@R: c(person("Peter", "Kharchenko", email = "[email protected]", role = c("aut")), person("Viktor", "Petukhov", email = "[email protected]", role = c("aut")), person("Evan", "Biederstedt", email = "[email protected]", role=c("cre", "aut"))) | ||
Description: An R interface to the Leiden algorithm, an iterative community detection algorithm on networks. The algorithm is designed to converge to a partition in which all subsets of all communities are locally optimally assigned, yielding communities guaranteed to be connected. The implementation proves to be fast, scales well, and can be run on graphs of millions of nodes (as long as they can fit in memory). The original implementation was constructed as a python interface here: <https://github.com/vtraag/leidenalg>. The algorithm was originally described in Traag, V.A., Waltman, L. & van Eck, N.J. "From Louvain to Leiden: guaranteeing well-connected communities". Sci Rep 9, 5233 (2019) <doi:10.1038/s41598-019-41695-z>. | ||
Authors@R: c(person("Peter", "Kharchenko", email = "[email protected]", role = c("aut")), person("Viktor", "Petukhov", email = "[email protected]", role = c("aut")), person("Evan", "Biederstedt", email = "[email protected]", role=c("cre", "aut")), person("V.A.", "Traag", email = "[email protected]", role = c("ctb"))) | ||
Description: An R interface to the Leiden algorithm, an iterative community detection algorithm on networks. The algorithm is designed to converge to a partition in which all subsets of all communities are locally optimally assigned, yielding communities guaranteed to be connected. The implementation proves to be fast, scales well, and can be run on graphs of millions of nodes (as long as they can fit in memory). The original implementation was constructed as a python interface "leidenalg" found here: <https://github.com/vtraag/leidenalg>. The algorithm was originally described in Traag, V.A., Waltman, L. & van Eck, N.J. "From Louvain to Leiden: guaranteeing well-connected communities". Sci Rep 9, 5233 (2019) <doi:10.1038/s41598-019-41695-z>. | ||
License: GPL-3 | ||
Copyright: See the file COPYRIGHTS for various leidenAlg copyright details | ||
Encoding: UTF-8 | ||
LazyData: true | ||
Depends: R (>= 3.5.0) | ||
Imports: | ||
graphics, | ||
grDevices, | ||
|
@@ -23,5 +25,5 @@ RoxygenNote: 7.1.1 | |
URL: https://github.com/kharchenkolab/leidenAlg | ||
BugReports: https://github.com/kharchenkolab/leidenAlg/issues | ||
NeedsCompilation: yes | ||
Author: Peter Kharchenko [aut], Viktor Petukhov [aut], Evan Biederstedt [cre, aut] | ||
Author: Peter Kharchenko [aut], Viktor Petukhov [aut], V.A. Traag [ctb], Evan Biederstedt [cre, aut] | ||
Maintainer: Evan Biederstedt <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#' Conos graph | ||
#' | ||
"conosGraph" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library(conos) | ||
library(dplyr) | ||
|
||
panel <- readRDS(file.path(find.package('conos'),'extdata','panel.rds')) | ||
|
||
library(pagoda2) | ||
panel.preprocessed <- lapply(panel, basicP2proc, n.cores=4, min.cells.per.gene=0, n.odgenes=2e3, get.largevis=FALSE, make.geneknn=FALSE) | ||
|
||
con <- Conos$new(panel.preprocessed, n.cores=4) | ||
|
||
con$buildGraph(k=30, k.self=5, space='PCA', ncomps=30, n.odgenes=2000, matching.method='mNN', metric='angular', score.component.variance=TRUE, verbose=TRUE) | ||
|
||
## conosGraph.rda | ||
conosGraph = con$graph | ||
conosGraph = igraph::induced_subgraph(conosGraph, v=V(conosGraph)[1:100]) ## length 100 | ||
save(conosGraph, file="conosGraph.rda", compress="xz") | ||
|
||
getClusterGraph(conosGraph, groups=head( V(conosGraph), 20)) | ||
|
||
|
||
|
||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Files: src/leidenalg/include src/leidenalg/*.cpp | ||
Copyright: 2015-2020 V.A. Traag | ||
License: GPL-3 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.