diff --git a/DESCRIPTION b/DESCRIPTION index 36df187b1..5309c9024 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -85,6 +85,7 @@ Imports: tidyr, utils, vegan, + Rdpack, Rcpp Suggests: ade4, @@ -114,3 +115,4 @@ BugReports: https://github.com/microbiome/mia/issues Roxygen: list(markdown = TRUE) RoxygenNote: 7.3.3 VignetteBuilder: knitr +RdMacros: Rdpack diff --git a/R/addLDA.R b/R/addLDA.R index f512c3dfd..8798887cd 100644 --- a/R/addLDA.R +++ b/R/addLDA.R @@ -40,6 +40,9 @@ #' \code{\link[topicmodels:LDA]{LDA}} to compute the ordination matrix and #' feature loadings. #' +#' @references +#' \insertRef{Blei2003}{mia} +#' #' @name addLDA #' #' @examples diff --git a/R/addNMF.R b/R/addNMF.R index 820efb752..58244b749 100644 --- a/R/addNMF.R +++ b/R/addNMF.R @@ -55,6 +55,9 @@ #' values contained in k, and the best fit is selected based on #' \code{eval.metric} value. #' +#' @references +#' \insertRef{Brunet2004}{mia} +#' #' @name addNMF #' #' @examples diff --git a/R/calculateDMM.R b/R/calculateDMM.R index 4fe554218..813153a88 100644 --- a/R/calculateDMM.R +++ b/R/calculateDMM.R @@ -59,6 +59,9 @@ #' \code{\link[DirichletMultinomial:cvdmngroup]{cvdmngroup }}, #' \code{\link[DirichletMultinomial:fitted]{accessors for DMN objects}} #' +#' @references +#' \insertRef{Holmes2012}{mia} +#' #' @name calculateDMN #' #' @examples diff --git a/R/getPERMANOVA.R b/R/getPERMANOVA.R index 7c5a5c786..f6ed952de 100644 --- a/R/getPERMANOVA.R +++ b/R/getPERMANOVA.R @@ -112,6 +112,9 @@ #' \code{\link[vegan:permutest]{vegan::permutest}}. See also #' \code{\link[=runCCA]{addCCA}} and \code{\link[=runCCA]{addRDA}} #' +#' @references +#' \insertRef{Anderson2001}{mia} +#' NULL #' @export diff --git a/R/runDPCoA.R b/R/runDPCoA.R index 6ca945ef7..50c51754f 100644 --- a/R/runDPCoA.R +++ b/R/runDPCoA.R @@ -68,6 +68,9 @@ #' \code{\link[scater:plotReducedDim]{plotReducedDim}} #' \code{\link[SingleCellExperiment:reducedDims]{reducedDims}} #' +#' @references +#' \insertRef{Pavoine2004}{mia} +#' #' @examples #' data(esophagus) #' dpcoa <- getDPCoA(esophagus) diff --git a/R/runNMDS.R b/R/runNMDS.R index 2c0b96f3b..079ccf9e3 100644 --- a/R/runNMDS.R +++ b/R/runNMDS.R @@ -62,6 +62,9 @@ #' \code{\link[scater:plotReducedDim]{plotMDS}}, to quickly visualize the #' results. #' +#' @references +#' \insertRef{Kruskal1964}{mia} +#' #' @examples #' # generate some example data #' mat <- matrix(1:60, nrow = 6) diff --git a/inst/REFERENCES.bib b/inst/REFERENCES.bib new file mode 100644 index 000000000..3c74ff23c --- /dev/null +++ b/inst/REFERENCES.bib @@ -0,0 +1,74 @@ +@article{Holmes2012, + author = {Ian Holmes and Katherine Harris and Christopher Quince}, + title = {Dirichlet Multinomial Mixtures: Generative Models for Microbial Metagenomics}, + journal = {PLOS ONE}, + year = {2012}, + volume = {7}, + number = {2}, + pages = {e30126}, + doi = {10.1371/journal.pone.0030126} +} + +@article{Blei2003, + author = {David M. Blei and Andrew Y. Ng and Michael I. Jordan}, + title = {Latent Dirichlet Allocation}, + journal = {Journal of Machine Learning Research}, + year = {2003}, + volume = {3}, + pages = {993--1022} +} + +@article{Brunet2004, + author = {Jean-Philippe Brunet and Pablo Tamayo and Todd R. Golub and Jill P. Mesirov}, + title = {Metagenes and Molecular Pattern Discovery Using Matrix Factorization}, + journal = {Proceedings of the National Academy of Sciences}, + year = {2004}, + volume = {101}, + number = {12}, + pages = {4164--4169}, + doi = {10.1073/pnas.0308531101} +} + +@article{Kruskal1964, + author = {Joseph B. Kruskal}, + title = {Nonmetric Multidimensional Scaling: A Numerical Method}, + journal = {Psychometrika}, + year = {1964}, + volume = {29}, + number = {2}, + pages = {115--129}, + doi = {10.1007/BF02289694} +} + +@article{Pavoine2004, + author = {Sandrine Pavoine and Jean Vallet and Anne-B{\'e}atrice Dufour and Stella Gachet and Daniel Daniel Schmitt}, + title = {Dissimilarity Measurements and Ordinations for Ecological Data: An Example Using {DPCoA}}, + journal = {Ecology}, + year = {2004}, + volume = {85}, + number = {2}, + pages = {280--288}, + doi = {10.1890/02-0605} +} + +@article{Anderson2001, + author = {Marti J. Anderson}, + title = {A New Method for Non-parametric Multivariate Analysis of Variance}, + journal = {Austral Ecology}, + year = {2001}, + volume = {26}, + number = {1}, + pages = {32--46}, + doi = {10.1111/j.1442-9993.2001.01070.pp.x} +} + +@article{Lozupone2005, + author = {Catherine Lozupone and Rob Knight}, + title = {UniFrac: A New Phylogenetic Method for Comparing Microbial Communities}, + journal = {Applied and Environmental Microbiology}, + year = {2005}, + volume = {71}, + number = {12}, + pages = {8228--8235}, + doi = {10.1128/AEM.71.12.8228-8235.2005} +} diff --git a/man/addLDA.Rd b/man/addLDA.Rd index 8d00adcd0..87bd9836a 100644 --- a/man/addLDA.Rd +++ b/man/addLDA.Rd @@ -78,3 +78,6 @@ tab <- getReducedDimAttribute(tse, "LDA_10","eval_metrics") # Plot plot(tab[["k"]], tab[["perplexity"]], xlab = "k", ylab = "perplexity") } +\references{ +\insertRef{Blei2003}{mia} +} diff --git a/man/addNMF.Rd b/man/addNMF.Rd index 6b292da14..b1885622b 100644 --- a/man/addNMF.Rd +++ b/man/addNMF.Rd @@ -101,3 +101,6 @@ loadings_NMF_4 <- getReducedDimAttribute(tse, "NMF_4", "loadings") head(loadings_NMF_4) } +\references{ +\insertRef{Brunet2004}{mia} +} diff --git a/man/calculateDMN.Rd b/man/calculateDMN.Rd index b0e1e635f..c8590f8a4 100644 --- a/man/calculateDMN.Rd +++ b/man/calculateDMN.Rd @@ -180,6 +180,9 @@ head(metadata(tse)$DMM$prob) # Get the weight of each component for the best model bestModel@mixture$Weight } +\references{ +\insertRef{Holmes2012}{mia} +} \seealso{ \code{\link[DirichletMultinomial:DMN-class]{DMN-class}}, \code{\link[DirichletMultinomial:DMNGroup-class]{DMNGroup-class}}, diff --git a/man/getPERMANOVA.Rd b/man/getPERMANOVA.Rd index ccb3c4574..c11bfdbc9 100644 --- a/man/getPERMANOVA.Rd +++ b/man/getPERMANOVA.Rd @@ -140,6 +140,9 @@ rda_res <- getRDA( # Significance results are similar to PERMANOVA attr(rda_res, "significance") +} +\references{ +\insertRef{Anderson2001}{mia} } \seealso{ For more details on the actual implementation see diff --git a/man/runDPCoA.Rd b/man/runDPCoA.Rd index fdd6b627c..6164f7d59 100644 --- a/man/runDPCoA.Rd +++ b/man/runDPCoA.Rd @@ -120,6 +120,9 @@ reducedDims(esophagus) library(scater) plotReducedDim(esophagus, "DPCoA") } +\references{ +\insertRef{Pavoine2004}{mia} +} \seealso{ \code{\link[scater:plotReducedDim]{plotReducedDim}} \code{\link[SingleCellExperiment:reducedDims]{reducedDims}} diff --git a/man/runNMDS.Rd b/man/runNMDS.Rd index 66f2c228a..334213cb7 100644 --- a/man/runNMDS.Rd +++ b/man/runNMDS.Rd @@ -152,6 +152,9 @@ esophagus <- addNMDS(esophagus, FUN = vegan::vegdist, name = "euclidean", method = "euclidean") reducedDims(esophagus) } +\references{ +\insertRef{Kruskal1964}{mia} +} \seealso{ \code{\link[MASS:isoMDS]{MASS::isoMDS}}, \code{\link[vegan:monoMDS]{vegan::monoMDS}}