Code Monkey home page Code Monkey logo

dysbiosisr's Introduction

R-CMD-check License: GPL v3 GitHub Repo stars Lifecycle: experimental codecov

dysbiosisR

The dysbiosisR package is a collection of functions to calculate six dysbiosis measures from microbiota profiling data. The package currently supports microbiome data organized as phyloseq objects.

Installation

You can install the development version of dysbiosisR like this:

    devtools::install_github("microsud/dysbiosisR")

Load package

    library(dysbiosisR)

We welcome feedback and suggestions.

How to use

Check out the dysbiosisR vignette and documentation of functions for more details.

Contribute

Contributions and feedback are very welcome:

Cite

Shetty SA, WAA de Steenhuijsen Piters., et al., 2022. dysbiosisR: an R package for calculating microbiome dysbiosis measures.

References

  1. Santiago M, et al., 2019. Microbiome predictors of dysbiosis and VRE decolonization in patients with recurrent C. difficile infections in a multi-center retrospective study. AIMS Microbiol 5:1–18. 10.3934/microbiol.2019.1.1.

  2. Lloyd-Price J, Arze C, Ananthakrishnan AN, et al., 2019. Multi-omics of the gut microbial ecosystem in inflammatory bowel diseases. Nature 569:655–662. 10.1038/s41586-019-1237-9.

  3. AlShawaqfeh MK, et al., 2017. A dysbiosis index to assess microbial changes in fecal samples of dogs with chronic inflammatory enteropathy. FEMS Microbiol Ecol 93:1–8. 10.1093/femsec/fix136.

  4. Montassier E, Al-Ghalith GA, Hillmann B, Viskocil K, Kabage AJ, McKinlay CE, Sadowsky MJ, Khoruts A, Knights D. 2018. CLOUD: a non-parametric detection test for microbiome outliers. Microbiome 6:137. 10.1186/s40168-018-0514-4.

  5. Saffouri GB, Shields-Cutler RR, Chen J, Yang Y, Lekatz HR, Hale VL, Cho JM, Battaglioli EJ, Bhattarai Y, Thompson KJ, Kalari KK, Behera G, Berry JC, Peters SA, Patel R, Schuetz AN, Faith JJ, Camilleri M, Sonnenburg JL, Farrugia G, Swann JR, Grover M, Knights D, Kashyap PC. 2019. Small intestinal microbial dysbiosis underlies symptoms associated with functional gastrointestinal disorders. Nat Commun 10:2012. 10.1038/s41467-019-09964-7.

  6. Wei, S, Bahl, MI, Baunwall, SMD, Hvas, CL and Licht, TR. 2021. Determining gut microbial dysbiosis: a review of applied indexes for assessment of intestinal microbiota imbalances. Applied and Environmental Microbiology, 87(11), pp.e00395-21.

  7. Halfvarson J, Brislawn CJ, Lamendella R, Vázquez-Baeza Y, Walters WA, Bramer LM, D'Amato M, Bonfiglio F, McDonald D, Gonzalez A, McClure EE, Dunklebarger MF, Knight R, Jansson JK. 2017. Dynamics of the human gut microbiome in inflammatory bowel disease. Nat Microbiol 2:17004. 10.1038/nmicrobiol.2017.4.

Acknowledgement

This work was done at the Department of Medical Microbiology and Infection Prevention at UMC Groningen in collaboration with the Microbiome Group at the RIVM.

Contact

Sudarshan A. Shetty (sudarshanshetty9[@]gmail[dot]com)
Susana Fuentes (susana[dot]fuentes[@]rivm[dot]nl)

dysbiosisr's People

Contributors

microsud avatar wsteenhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dysbiosisr's Issues

TreeSE support?

I think the measures presented here could be broadly useful.

dysbiosisOBB error

Hi,

Thank you for providing a nice summary of dysbiosis indexes in one package!

I was trying it out on the test data and then mine as well, unfortunately dysbiosisOBB gives me an error. I was able to calculate all other indexes with me own data.

> dysbiosis.oob <- dysbiosisOBB(fix.rarephi,
+                               group_col = "PhageCode",
+                               case_label = "PHI",
+                               seed_value = 1235,
+                               add_tuneRF_params = list(ntreeTry=100,
+                                                        stepFactor=1.5,
+                                                        improve=0.01,
+                                                        trace=TRUE,
+                                                        dobest=FALSE),
+                               ntree = 100,
+                               plot_roc = TRUE)
The random seed of your session for reproducibility is: 1235
mtry = 61  OOB error = 20% 
Searching left ...
mtry = 41 	OOB error = 20% 
0 0.01 
Searching right ...
mtry = 91 	OOB error = 20% 
0 0.01 
The mtry used is : 416191
Error in mtry < 1 || mtry > p : 'length = 3' in coercion to 'logical(1)'

Could you please tell if the error says anything to you? I'm not sure where the issue could be, I used a phyloseq object with absolute counts in all other calculations. Transformed it here to relative abundance summed to 1 or 100, made no difference (since in the tutorial you mention multiple times that the test data is relative abundance, summed to 100, so I wasn't sure if that was important).

The error seems rather to be coming from the logical evalution of "||" inside an if() statement (according to Google), so I guess it has to do with

if(is.null(x) ||

though not really sure 😅

Session Info
> sessioninfo::session_info()
─ Session info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.3 (2024-02-29 ucrt)
 os       Windows 10 x64 (build 19045)
 system   x86_64, mingw32
 ui       RStudio
 language en
 collate  German_Germany.utf8
 ctype    German_Germany.utf8
 tz       Europe/Budapest
 date     2024-07-03
 rstudio  2024.04.1+748 Chocolate Cosmos (desktop)
 pandoc   3.1.11 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ! package          * version    date (UTC) lib source
   ade4               1.7-22     2023-02-06 [1] RSPM (R 4.3.0)
   ape                5.8        2024-04-11 [1] RSPM (R 4.3.0)
   backports          1.5.0      2024-05-23 [1] RSPM (R 4.3.0)
 P base64enc          0.1-3      2015-07-28 [?] RSPM (R 4.3.0)
   Biobase            2.62.0     2023-10-24 [1] Bioconductor
   BiocGenerics       0.48.1     2023-11-01 [1] Bioconductor
 P BiocManager      * 1.30.23    2024-05-04 [?] RSPM
   biomformat         1.30.0     2023-10-24 [1] Bioconductor
   Biostrings         2.70.3     2024-03-13 [1] Bioconductor 3.18 (R 4.3.3)
   bitops             1.0-7      2021-04-24 [1] RSPM (R 4.3.0)
 P cachem             1.1.0      2024-05-16 [?] RSPM
 P callr              3.7.6      2024-03-25 [?] RSPM
   checkmate          2.3.1      2023-12-04 [1] RSPM (R 4.3.0)
 P cli                3.6.3      2024-06-21 [?] RSPM
 P cluster            2.1.6      2023-12-01 [?] CRAN (R 4.3.3)
 P codetools          0.2-19     2023-02-01 [?] CRAN (R 4.3.3)
   colorspace         2.1-0      2023-01-23 [1] RSPM (R 4.3.0)
 P crayon             1.5.3      2024-06-20 [?] RSPM
 P curl               5.2.1      2024-03-01 [?] RSPM (R 4.3.0)
   data.table         1.15.4     2024-03-30 [1] RSPM (R 4.3.0)
 P desc               1.4.3      2023-12-10 [?] RSPM (R 4.3.0)
 P devtools           2.4.5      2022-10-11 [?] RSPM (R 4.3.0)
 P digest             0.6.36     2024-06-23 [?] RSPM
   distributional     0.4.0      2024-02-07 [1] RSPM (R 4.3.0)
   dplyr            * 1.1.4      2023-11-17 [1] RSPM (R 4.3.0)
   DT                 0.33       2024-04-04 [1] RSPM (R 4.3.0)
   dysbiosisR       * 1.0.4      2024-07-02 [1] Github (microsud/dysbiosisR@292adc8)
 P ellipsis           0.3.2      2021-04-29 [?] RSPM (R 4.3.0)
 P evaluate           0.24.0     2024-06-10 [?] RSPM
 P fansi              1.0.6      2023-12-08 [?] RSPM (R 4.3.0)
   farver             2.1.2      2024-05-13 [1] RSPM (R 4.3.0)
 P fastmap            1.2.0      2024-05-15 [?] RSPM
   foreach            1.5.2      2022-02-02 [1] RSPM (R 4.3.0)
 P foreign            0.8-86     2023-11-28 [?] CRAN (R 4.3.3)
   Formula            1.2-5      2023-02-24 [1] RSPM (R 4.3.0)
 P fs                 1.6.4      2024-04-25 [?] RSPM
   generics           0.1.3      2022-07-05 [1] RSPM (R 4.3.0)
   GenomeInfoDb       1.38.8     2024-03-15 [1] Bioconductor 3.18 (R 4.3.3)
   GenomeInfoDbData   1.2.11     2024-07-02 [1] Bioconductor
   ggdist             3.3.2      2024-03-05 [1] RSPM (R 4.3.0)
   ggplot2          * 3.5.1      2024-04-23 [1] RSPM (R 4.3.0)
 P glue               1.7.0      2024-01-09 [?] RSPM (R 4.3.0)
   gridExtra          2.3        2017-09-09 [1] RSPM (R 4.3.0)
   gtable             0.3.5      2024-04-22 [1] RSPM (R 4.3.0)
   Hmisc              5.1-3      2024-05-28 [1] RSPM (R 4.3.0)
   htmlTable          2.4.2      2023-10-29 [1] RSPM (R 4.3.0)
 P htmltools          0.5.8.1    2024-04-04 [?] RSPM (R 4.3.0)
 P htmlwidgets        1.6.4      2023-12-06 [?] RSPM (R 4.3.0)
 P httpuv             1.6.15     2024-03-26 [?] RSPM
   igraph             2.0.3      2024-03-13 [1] RSPM (R 4.3.0)
   IRanges            2.36.0     2023-10-24 [1] Bioconductor
   iterators          1.0.14     2022-02-05 [1] RSPM (R 4.3.0)
 P jsonlite           1.8.8      2023-12-04 [?] RSPM (R 4.3.0)
 P knitr              1.47       2024-05-29 [?] RSPM
   labeling           0.4.3      2023-08-29 [1] RSPM (R 4.3.0)
 P later              1.3.2      2023-12-06 [?] RSPM (R 4.3.0)
 P lattice            0.22-5     2023-10-24 [?] CRAN (R 4.3.3)
 P lifecycle          1.0.4      2023-11-07 [?] RSPM (R 4.3.0)
 P magrittr           2.0.3      2022-03-30 [?] RSPM (R 4.3.0)
 P MASS               7.3-60.0.1 2024-01-13 [?] CRAN (R 4.3.3)
 P Matrix             1.6-5      2024-01-11 [?] CRAN (R 4.3.3)
 P memoise            2.0.1      2021-11-26 [?] RSPM (R 4.3.0)
 P mgcv               1.9-1      2023-12-21 [?] CRAN (R 4.3.3)
   microbiome       * 1.24.0     2023-10-24 [1] Bioconductor
 P microViz         * 0.12.4     2024-06-30 [?] https://d~
 P mime               0.12       2021-09-28 [?] RSPM (R 4.3.0)
 P miniUI             0.1.1.1    2018-05-18 [?] RSPM (R 4.3.0)
   multtest           2.58.0     2023-10-24 [1] Bioconductor
   munsell            0.5.1      2024-04-01 [1] RSPM (R 4.3.0)
   NADA               1.6-1.1    2020-03-22 [1] RSPM (R 4.3.0)
 P nlme               3.1-164    2023-11-27 [?] CRAN (R 4.3.3)
 P nnet               7.3-19     2023-05-03 [?] CRAN (R 4.3.3)
 P patchwork        * 1.2.0      2024-01-08 [?] RSPM (R 4.3.0)
   permute            0.9-7      2022-01-27 [1] RSPM (R 4.3.0)
   phyloseq         * 1.46.0     2023-10-24 [1] Bioconductor
 P pillar             1.9.0      2023-03-22 [?] RSPM (R 4.3.0)
 P pkgbuild           1.4.4      2024-03-17 [?] RSPM (R 4.3.0)
 P pkgconfig          2.0.3      2019-09-22 [?] RSPM (R 4.3.0)
 P pkgload            1.4.0      2024-06-28 [?] RSPM
   plyr               1.8.9      2023-10-02 [1] RSPM (R 4.3.0)
   pROC               1.18.5     2023-11-01 [1] RSPM (R 4.3.0)
 P processx           3.8.4      2024-03-16 [?] RSPM (R 4.3.0)
 P profvis            0.3.8      2023-05-02 [?] RSPM (R 4.3.0)
 P promises           1.3.0      2024-04-05 [?] RSPM
 P ps                 1.7.6      2024-01-18 [?] RSPM (R 4.3.0)
 P purrr              1.0.2      2023-08-10 [?] RSPM (R 4.3.0)
   qiime2R          * 0.99.6     2024-07-02 [1] Github (jbisanz/qiime2R@d0610e1)
 P R6                 2.5.1      2021-08-19 [?] RSPM (R 4.3.0)
   randomForest       4.7-1.1    2022-05-23 [1] RSPM (R 4.3.0)
   RColorBrewer       1.1-3      2022-04-03 [1] RSPM (R 4.3.0)
 P Rcpp               1.0.12     2024-01-09 [?] RSPM (R 4.3.0)
   RCurl              1.98-1.14  2024-01-09 [1] RSPM (R 4.3.0)
 P remotes            2.5.0      2024-03-17 [?] RSPM (R 4.3.0)
   renv               1.0.7      2024-04-11 [1] RSPM (R 4.3.0)
   reshape2           1.4.4      2020-04-09 [1] RSPM (R 4.3.0)
   rhdf5              2.46.1     2023-11-29 [1] Bioconductor
 D rhdf5filters       1.14.1     2023-11-06 [1] Bioconductor
   Rhdf5lib           1.24.2     2024-02-07 [1] Bioconductor 3.18 (R 4.3.2)
 P rlang              1.1.4      2024-06-04 [?] RSPM
 P rmarkdown          2.27       2024-05-17 [?] RSPM
 P rpart              4.1.23     2023-12-05 [?] CRAN (R 4.3.3)
 P rstudioapi         0.16.0     2024-03-24 [?] RSPM
   Rtsne              0.17       2023-12-07 [1] RSPM (R 4.3.0)
   S4Vectors          0.40.2     2023-11-23 [1] Bioconductor
   scales             1.3.0      2023-11-28 [1] RSPM (R 4.3.0)
 P sessioninfo        1.2.2      2021-12-06 [?] RSPM (R 4.3.0)
 P shiny              1.8.1.1    2024-04-02 [?] RSPM
 P stringi            1.8.4      2024-05-06 [?] RSPM
 P stringr            1.5.1      2023-11-14 [?] RSPM (R 4.3.0)
 P survival           3.5-8      2024-02-14 [?] CRAN (R 4.3.3)
 P tibble             3.2.1      2023-03-20 [?] RSPM (R 4.3.0)
   tidyr              1.3.1      2024-01-24 [1] RSPM (R 4.3.0)
   tidyselect         1.2.1      2024-03-11 [1] RSPM (R 4.3.0)
   truncnorm          1.0-9      2023-03-20 [1] RSPM (R 4.3.0)
 P urlchecker         1.0.1      2021-11-30 [?] RSPM (R 4.3.0)
   usedist            0.4.0      2020-03-01 [1] RSPM (R 4.3.0)
 P usethis            2.2.3      2024-02-19 [?] RSPM (R 4.3.0)
 P utf8               1.2.4      2023-10-22 [?] RSPM (R 4.3.0)
 P vctrs              0.6.5      2023-12-01 [?] RSPM (R 4.3.0)
   vegan              2.6-6.1    2024-05-21 [1] RSPM (R 4.3.0)
 P withr              3.0.0      2024-01-16 [?] RSPM (R 4.3.0)
 P xfun               0.45       2024-06-16 [?] RSPM
 P xtable             1.8-4      2019-04-21 [?] RSPM (R 4.3.0)
   XVector            0.42.0     2023-10-24 [1] Bioconductor
 P yaml               2.3.8      2023-12-11 [?] RSPM (R 4.3.0)
   zCompositions      1.5.0-4    2024-06-19 [1] RSPM (R 4.3.0)
   zlibbioc           1.48.2     2024-03-13 [1] Bioconductor 3.18 (R 4.3.3)

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.