diff --git a/_pkgdown.yml b/_pkgdown.yml index fe8a760..1073eee 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -16,6 +16,8 @@ home: links: - text: Orchestrating Microbiome Analysis href: https://microbiome.github.io/OMA/docs/devel/pages/network_learning.html + - text: Development version + href: https://github.com/stefpeschel/NetCoMi/tree/develop articles: - title: Main functionality @@ -70,4 +72,12 @@ reference: authors: Stefanie Peschel: href: https://stefpeschel.de/ + Christian L. Müller: + href: https://www.statistik.uni-muenchen.de/personen/professuren/mueller/index.html + Anne-Laure Boulesteix: + href: https://www.en.ibe.med.uni-muenchen.de/mitarbeiter/professoren/boulesteix/index.html + Erika von Mutius: + href: https://www.helmholtz-munich.de/en/iap/pi/erika-von-mutius + Martin Depner: + href: https://www.helmholtz-munich.de/en/iap \ No newline at end of file diff --git a/index.Rmd b/index.Rmd index e940f22..3066131 100644 --- a/index.Rmd +++ b/index.Rmd @@ -11,6 +11,7 @@ knitr::opts_chunk$set(fig.path="man/figures/readme/") [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![DOI](https://zenodo.org/badge/259906607.svg)](https://zenodo.org/badge/latestdoi/259906607) +[![DOI paper](https://img.shields.io/badge/doi-10.1093/bib/bbaa290-yellow.svg)](https://doi.org/10.1093/bib/bbaa290) [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](https://anaconda.org/bioconda/r-netcomi) @@ -21,62 +22,20 @@ is an R package designed to facilitate the construction, analysis, and compariso With NetCoMi, users can construct microbial association or dissimilarity networks directly from sequencing data, typically provided as a read count matrix. The package includes a broad selection of methods for handling zeros, normalizing data, computing associations between microbial taxa, and sparsifying the resulting matrices. By offering these components in a modular format, NetCoMi allows users to tailor the workflow to their specific research needs, creating highly customizable microbial networks. -The package supports both the construction, analysis, and visualization of single networks and the comparison of two networks through graphical and quantitative approaches, including statistical testing. Additionally, NetCoMi offers the capability of constructing differential networks, where only differentially associated taxa are connected. - - - -```{r networkplot, eval=FALSE, echo=FALSE, message=FALSE, warning=FALSE, fig.height=16, fig.width=29} -library(phyloseq) -library(NetCoMi) -data("soilrep") - -soil_warm_yes <- phyloseq::subset_samples(soilrep, warmed == "yes") -soil_warm_no <- phyloseq::subset_samples(soilrep, warmed == "no") - -net_seas_p <- netConstruct(soil_warm_yes, soil_warm_no, - filtTax = "highestVar", - filtTaxPar = list(highestVar = 500), - zeroMethod = "pseudo", - normMethod = "clr", - measure = "pearson", - verbose = 0) - -netprops1 <- netAnalyze(net_seas_p, clustMethod = "cluster_fast_greedy", - gcmHeat = FALSE) - -nclust <- as.numeric(max(names(table(netprops1$clustering$clust1)))) - -col <- c(topo.colors(nclust), rainbow(6)) - -plot(netprops1, - sameLayout = TRUE, - layoutGroup = "union", - colorVec = col, - borderCol = "gray40", - nodeSize = "degree", - cexNodes = 0.9, - nodeSizeSpread = 3, - edgeTranspLow = 80, - edgeTranspHigh = 50, - groupNames = c("Warming", "Non-warming"), - showTitle = TRUE, - cexTitle = 2.8, - mar = c(1,1,3,1), - repulsion = 0.9, - labels = FALSE, - rmSingles = "inboth", - nodeFilter = "clustMin", - nodeFilterPar = 10, - nodeTransp = 50, - hubTransp = 30) -``` +The package supports both the construction, analysis, and visualization of a **single network** and the **comparison of two networks** through graphical and quantitative approaches, including statistical testing. Additionally, NetCoMi offers the capability of constructing **differential networks**, where only differentially associated taxa are connected. + + > Exemplary network comparison using soil microbiome data (['soilrep' data from phyloseq package](https://github.com/joey711/phyloseq/blob/master/data/soilrep.RData)). Microbial associations are compared between the two experimantal settings 'warming' and 'non-warming' using the same layout in both groups. -### Methods included in NetCoMi +## Workflow + + + +## Methods included in NetCoMi Here is an overview of methods available for network construction, together with some information on their implementation in R: @@ -137,6 +96,11 @@ TSS, CSS, COM, VST, and the clr transformation are described in [@badri2020shrin install.packages("devtools") install.packages("BiocManager") +# Since two of NetCoMi's dependencies are only available on GitHub, it is +# recommended to install them first: +devtools::install_github("zdk123/SpiecEasi") +devtools::install_github("GraceYoon/SPRING") + # Install NetCoMi devtools::install_github("stefpeschel/NetCoMi", dependencies = c("Depends", "Imports", "LinkingTo"), @@ -147,30 +111,17 @@ devtools::install_github("stefpeschel/NetCoMi", If there are any errors during installation, please install the missing dependencies manually. -In particular the automatic installation of -[`SPRING`](https://github.com/GraceYoon/SPRING) and [`SpiecEasi`](https://github.com/zdk123/SpiecEasi) (only available on -GitHub) does sometimes not work. These packages can be installed as follows -(the order is important because SPRING depends on SpiecEasi): - -```{r install2, eval=FALSE} -devtools::install_github("zdk123/SpiecEasi") -devtools::install_github("GraceYoon/SPRING") -``` - Packages that are optionally required in certain settings are not installed together with NetCoMi. These can be installed automatically using: ```{r install3, eval=FALSE} installNetCoMiPacks() - -# Please check: -?installNetCoMiPacks() ``` If not installed via `installNetCoMiPacks()`, the required package is installed by the respective NetCoMi function when needed. -### Bioconda +## Bioconda Thanks to [daydream-boost](https://github.com/daydream-boost), NetCoMi can also be installed from conda bioconda channel with @@ -198,5 +149,5 @@ devtools::install_github("stefpeschel/NetCoMi", Please check the [NEWS](https://github.com/stefpeschel/NetCoMi/blob/develop/NEWS.md) document for features implemented on develop branch. -### References +## References diff --git a/index.md b/index.md index e55b81d..33563d2 100644 --- a/index.md +++ b/index.md @@ -4,6 +4,8 @@ [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![DOI](https://zenodo.org/badge/259906607.svg)](https://zenodo.org/badge/latestdoi/259906607) +[![DOI +paper](https://img.shields.io/badge/doi-10.1093/bib/bbaa290-yellow.svg)](https://doi.org/10.1093/bib/bbaa290) [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](https://anaconda.org/bioconda/r-netcomi) @@ -28,12 +30,13 @@ workflow to their specific research needs, creating highly customizable microbial networks. The package supports both the construction, analysis, and visualization -of single networks and the comparison of two networks through graphical -and quantitative approaches, including statistical testing. -Additionally, NetCoMi offers the capability of constructing differential -networks, where only differentially associated taxa are connected. +of a **single network** and the **comparison of two networks** through +graphical and quantitative approaches, including statistical testing. +Additionally, NetCoMi offers the capability of constructing +**differential networks**, where only differentially associated taxa are +connected. - + > Exemplary network comparison using soil microbiome data ([‘soilrep’ > data from phyloseq @@ -42,7 +45,11 @@ networks, where only differentially associated taxa are connected. > settings ‘warming’ and ‘non-warming’ using the same layout in both > groups. -### Methods included in NetCoMi +## Workflow + + + +## Methods included in NetCoMi Here is an overview of methods available for network construction, together with some information on their implementation in R: @@ -134,6 +141,11 @@ et al. 2020). install.packages("devtools") install.packages("BiocManager") +# Since two of NetCoMi's dependencies are only available on GitHub, it is +# recommended to install them first: +devtools::install_github("zdk123/SpiecEasi") +devtools::install_github("GraceYoon/SPRING") + # Install NetCoMi devtools::install_github("stefpeschel/NetCoMi", dependencies = c("Depends", "Imports", "LinkingTo"), @@ -144,32 +156,18 @@ devtools::install_github("stefpeschel/NetCoMi", If there are any errors during installation, please install the missing dependencies manually. -In particular the automatic installation of -[`SPRING`](https://github.com/GraceYoon/SPRING) and -[`SpiecEasi`](https://github.com/zdk123/SpiecEasi) (only available on -GitHub) does sometimes not work. These packages can be installed as -follows (the order is important because SPRING depends on SpiecEasi): - -``` r -devtools::install_github("zdk123/SpiecEasi") -devtools::install_github("GraceYoon/SPRING") -``` - Packages that are optionally required in certain settings are not installed together with NetCoMi. These can be installed automatically using: ``` r installNetCoMiPacks() - -# Please check: -?installNetCoMiPacks() ``` If not installed via `installNetCoMiPacks()`, the required package is installed by the respective NetCoMi function when needed. -### Bioconda +## Bioconda Thanks to [daydream-boost](https://github.com/daydream-boost), NetCoMi can also be installed from conda bioconda channel with @@ -198,7 +196,7 @@ Please check the [NEWS](https://github.com/stefpeschel/NetCoMi/blob/develop/NEWS.md) document for features implemented on develop branch. -### References +## References
diff --git a/man/figures/soilrep_networks.png b/man/figures/soilrep_networks.png new file mode 100644 index 0000000..243e342 Binary files /dev/null and b/man/figures/soilrep_networks.png differ diff --git a/man/figures/soilrep_networks.svg b/man/figures/soilrep_networks.svg new file mode 100644 index 0000000..f06a477 --- /dev/null +++ b/man/figures/soilrep_networks.svg @@ -0,0 +1,15155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Warming + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Non−warming + + diff --git a/man/figures/workflow.png b/man/figures/workflow.png new file mode 100644 index 0000000..a8f5410 Binary files /dev/null and b/man/figures/workflow.png differ diff --git a/vignettes/soil_example.Rmd b/vignettes/soil_example.Rmd index 91014a0..abae006 100644 --- a/vignettes/soil_example.Rmd +++ b/vignettes/soil_example.Rmd @@ -23,7 +23,7 @@ library(NetCoMi) Here is the code for reproducing the network plot shown on the landing page. -```{r example16, eval=FALSE} +```{r soil_net_comp, eval=FALSE} data("soilrep") soil_warm_yes <- phyloseq::subset_samples(soilrep, warmed == "yes") @@ -43,6 +43,8 @@ nclust <- as.numeric(max(names(table(netprops1$clustering$clust1)))) col <- c(topo.colors(nclust), rainbow(6)) +pdf("soilrep_networks.pdf", width = 29, height = 16) + plot(netprops1, sameLayout = TRUE, layoutGroup = "union", @@ -64,4 +66,6 @@ plot(netprops1, nodeFilterPar = 10, nodeTransp = 50, hubTransp = 30) + +dev.off() ```