Code Monkey home page Code Monkey logo

microbiomeexplorer's Introduction

Microbiome Explorer

An R package for the analysis and visualization of microbial communities.

To install and run Shiny app:

BiocManager::install("zoecastillo/microbiomeExplorer", 
                         ref = "master")
                         

Introduction

The microbiomeExplorer package and the Shiny application contained with it provides methods and visualizations to explore the results of 16S rRNA amplicon sequencing experiment. The analyses can be performed entirely via the R command line, but the primary intent of the package is to enable access to many of these analyses to non-computational users through the Shiny user interface.

The interface is launched through the R environment by calling MicrobiomeExplorerApp() after loading the package or made available via deployment on a Shiny server. This document is intended to give an introduction of how to use the Shiny application with the addition of R code chunks that a command line user would use to produce the same results.

library(microbiomeExplorer)
runMicrobiomeExplorer()

Data upload

Microbiome Explorer accepts several different data upload formats

  • MRexperiment-class objects stored as RDATA or RDS files
  • The Biological Observation Matrix (BIOM) formattes files produced by any program including qiime2 or mothur
  • Raw counts files

For further details, please refer to the package vignette.

Accessing example data via metagenomeSeq

The mouseData example data set is included with the metagenomeSeq package on which microbiomeExplorer depends. The easiest way to make this data available for the application is to store it as an RDS object on your file system. Then, you can open it via the "Browse" button under Upload Feature Count Data.

data("mouseData", package = "metagenomeSeq")

Data QC

Before starting an analysis, it is recommend to review the results of the sequencing experiment and perform quality control. Multiple QC plots can be generated, including those showing the number of unique features in each sample as a barplot or in a scatterplot against the number of reads.

Analysis

The analysis workflow within the application is split into six different sections: intra sample, intra feature, inter sample, correlation, differential and longitudinal. All visualizations are implemented using the plotly R package which provides basic interactivity, including zooming or panning via its modebar. In addition, the user can export the plot in its current state (i.e. showing specific user interactions) as a svg file using the camera icon of the modebar.

Intra-Sample Analysis

Intra-sample analysis contains functions focus on investigating the microbial composition within a sample or a group of samples. Relative abundance shows the most abundant feature in a barplot summarized by a user-defined variable across the x-asis. The feature abundance plot shows the individual abundance of a specific feature either as a boxplot or a categorical scatterplot depending on the x-axis variable chosen. Alpha diversity is a measure of the complexity or diversity within a particular sample, eg. habitat or area. Alpha diversity is computed by functions in the vegan package and is visualized as a boxplot using the same input definitions by feature and relative abundance.

Intra-Feature Analysis

Intra-feature analysis provides a different view on the feature prevalence in the dataset by showing the average abundance for each feature with added error bars indicating the standard deviation across all of the samples in a particular group.

Inter-Sample Analysis

Inter-sample analyses focus on differences between samples or groups of samples via feature heatmaps and beta diversity calculations.

Correlation

Correlation allows the user to visualize the relationship between either two features or a feature and a numeric phenotype in a scatterplot enhanced with a linear regression statistic.

Differential abundance

Differential abundance (DA) analysis is focused on testing the null hypothesis that the mean or mean ranks between groups are the same for a specific feature. DA analysis can help detect changes in feature abundance across two or more different levels of a phenotype. Four different methods can be chosen via the application: DESeq2, Kruskal-Wallis, limma, or a zero-inflated log normal model.

Longitudinal

Longitudinal analysis allows the user to generate feature plots with more control over the data shown within the plot. For a specific feature, the user can choose a phenotype and specific levels of that phenotype to show in the plot. The chosen order of the levels will be kept within the visualization which allows sorting by specific dates or tissues among other things.

Reports

Once an analysis is complete, a user might like to share the results with collaborators or download them for further analysis beyond the functionality provided via the Microbiome Explorer. To do this, we are providing the option to include any part of the analysis in a report which is fully reproducible outside of the application.

microbiomeexplorer's People

Contributors

nturaga avatar zoecastillo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

microbiomeexplorer's Issues

Code.

Thanks for this pipeline . I love it . 2 questions

  1. how can one retrieve the code? ( want to see code that the GUI run )
  2. It appears files of large sizes cannot be loaded ( you get and error ) . Is there a way to increase file size limit?

Problems with Report

Hi!

Im trying to get the report and I get this error:

Listening on http://127.0.0.1:4554
-- Sending report to /var/folders/sy/4mzmjcq17txbv3vnznqk2v5c0000gn/T//RtmpHv8asR --
-- Removing /var/folders/sy/4mzmjcq17txbv3vnznqk2v5c0000gn/T//RtmpHv8asR/me_report.Rmd--
-- entering my report generator --
-- creating header --
-- setting toc ----- data processing ----- header created! --
-- build intro text --
-- merged code --
gen report try value: try-error

Im using R version 4.0.3 on macOs Catalina.

Any suggestion?

Best wishes!

A. Galiana

Error installing dependency "nloptr"

I am using R version 3.6.2

I tried installing MicrobiomeExplorer using the recommended installation method BiocManager::install("zoecastillo/microbiomeExplorer", ref = "master")
However, I got this error message whilst installing:

Error: package or namespace load failed for ‘nloptr’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/idowu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-nloptr/00new/nloptr/libs/nloptr.so': /home/idowu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-nloptr/00new/nloptr/libs/nloptr.so: undefined symbol: nlopt_algorithm_name Error: loading failed Execution halted ERROR: loading failed

how to filter a Biom file in the Microbiome Explorer environment

Hi,
i used the microbiome explorer to generate a relative abundance for my data and got this Bar graph. (please find attached)
April 2018 RA top 10

i am looking for a way to filter the "no match" from the bar graph so i can understand the data better without the "no match" category. meanwhile in my Biom file, there's no word as "no match"... just words like "unassignable"
I think the Microbiome Explorer calls a sample "no_match" if the feature taxonomy entry is blank for the level in question. I aggregated at the level of genus (X6), so any sample that is blank for the assignment at the genus level will be called "no_match", even though it's not listed as unassignable.

I tried to fix this in the Data Input part of Microbiome Explorer by going to the Features tab and using Annotate Blank Values (choose Roll down taxonomy as the method and then click Assign) but it did not take the "no match" category away, i also choose "unknown" as the method and it only changed the "no match" to "unknown".

Please i would appreciate if you can assist me in this regard.

Thanks

Sandra Nnadi

Uploading input files using the R console

Hi,

I was wondering how can I load the feature count data, phenotype info, and taxonomy info files using the R console and not the GUI or shiny application.
In tutorial, there is only the this option for uploading data:
data("mouseData", package = "metagenomeSeq")
meData <- filterMEData(mouseData,minpresence = 1, minfeats = 2, minreads = 2)

Thanks,

Juliana

a

A

Report generation - Windows

Hello,

I'm having problems to generate reports. The error message that I'm getting is this:

-- Sending report to C:\Users\Owner\AppData\Local\Temp\RtmpsFfPir --
-- Removing C:\Users\Owner\AppData\Local\Temp\RtmpsFfPir/me_report.Rmd--
-- entering my report generator --
-- creating header --
-- setting toc ----- data processing ----- header created! --
-- build intro text --
-- merged code --
gen report try value: try-error

Here are the results from sessionInfo():

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base

other attached packages:
[1] DESeq2_1.30.1 SummarizedExperiment_1.20.0 MatrixGenerics_1.2.1 matrixStats_0.61.0
[5] GenomicRanges_1.42.0 GenomeInfoDb_1.26.7 IRanges_2.24.1 S4Vectors_0.28.1
[9] shinyWidgets_0.6.2 shinycssloaders_1.0.0 shinydashboard_0.7.2 shinyjs_2.0.0
[13] rmarkdown_2.11 knitr_1.36 microbiomeExplorer_1.1.2 metagenomeSeq_1.32.0
[17] RColorBrewer_1.1-2 glmnet_4.1-3 Matrix_1.2-18 limma_3.46.0
[21] Biobase_2.50.0 BiocGenerics_0.36.1 magrittr_2.0.1 shiny_1.7.1

loaded via a namespace (and not attached):
[1] minqa_1.2.4 colorspace_2.0-2 glmmADMB_0.8.3.3 ellipsis_0.3.2 markdown_1.1
[6] XVector_0.30.0 rstudioapi_0.13 DT_0.19 bit64_4.0.5 lubridate_1.8.0
[11] AnnotationDbi_1.52.0 fansi_0.5.0 codetools_0.2-16 splines_4.0.2 cachem_1.0.6
[16] geneplotter_1.68.0 jsonlite_1.7.2 nloptr_1.2.2.2 broom_0.7.10 annotate_1.68.0
[21] readr_2.0.2 compiler_4.0.2 httr_1.4.2 backports_1.3.0 lazyeval_0.2.2
[26] assertthat_0.2.1 fastmap_1.1.0 later_1.3.0 htmltools_0.5.2 tools_4.0.2
[31] lmerTest_3.1-3 coda_0.19-4 gtable_0.3.0 glue_1.4.2 GenomeInfoDbData_1.2.4
[36] dplyr_1.0.7 Rcpp_1.0.7 jquerylib_0.1.4 vctrs_0.3.8 nlme_3.1-148
[41] crosstalk_1.2.0 iterators_1.0.13 xfun_0.26 stringr_1.4.0 lme4_1.1-27.1
[46] mime_0.12 lifecycle_1.0.1 gtools_3.9.2 XML_3.99-0.8 zlibbioc_1.36.0
[51] MASS_7.3-51.6 scales_1.1.1 hms_1.1.1 promises_1.2.0.1 yaml_2.2.1
[56] memoise_2.0.0 ggplot2_3.3.5 sass_0.4.0 stringi_1.7.5 RSQLite_2.2.8
[61] genefilter_1.72.1 foreach_1.5.1 caTools_1.18.2 boot_1.3-25 BiocParallel_1.24.1
[66] shape_1.4.6 R2admb_0.7.16.2 rlang_0.4.11 pkgconfig_2.0.3 bitops_1.0-7
[71] Wrench_1.8.0 fontawesome_0.2.2 evaluate_0.14 lattice_0.20-41 purrr_0.3.4
[76] htmlwidgets_1.5.4 bit_4.0.4 tidyselect_1.1.1 plyr_1.8.6 R6_2.5.1
[81] gplots_3.1.1 generics_0.1.1 DelayedArray_0.16.3 DBI_1.1.1 pillar_1.6.4
[86] withr_2.4.2 survival_3.2-13 RCurl_1.98-1.5 tibble_3.1.5 crayon_1.4.2
[91] KernSmooth_2.23-17 utf8_1.2.2 plotly_4.10.0 tzdb_0.1.2 locfit_1.5-9.4
[96] grid_4.0.2 data.table_1.14.2 blob_1.2.2 forcats_0.5.1 digest_0.6.28
[101] xtable_1.8-4 tidyr_1.1.4 httpuv_1.6.3 numDeriv_2016.8-1.1 munsell_0.5.0
[106] viridisLite_0.4.0 bslib_0.3.1

I have already tried things suggested in the link below, but they don't work. I'm thinking maybe because the solutions that were proposed are for Mac and I'm using Windows?

#3

Things I've tried so far:

  1. Install and load knitr and rmarkdown packages before running microbiomeExplorer.
  2. Install phantomjs using webshot::install_phantomjs()
  3. Install pandoc using installr::install.pandoc()

Any help would be greatly appreciated!
Thanks so much for your time,
Darren

Warning: Error in : shinyjs: extendShinyjs: `functions` argument must be provide

R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base

other attached packages:
[1] microbiomeExplorer_0.99.5 metagenomeSeq_1.30.0
[3] RColorBrewer_1.1-2 glmnet_4.0-2
[5] Matrix_1.2-18 limma_3.44.3
[7] Biobase_2.48.0 BiocGenerics_0.34.0
[9] magrittr_1.5 shiny_1.5.0

loaded via a namespace (and not attached):
[1] Wrench_1.6.0 Rcpp_1.0.5 splines_4.0.2
[4] xtable_1.8-4 lattice_0.20-41 R6_2.4.1
[7] rlang_0.4.8 fastmap_1.0.1 foreach_1.5.0
[10] caTools_1.18.0 shinydashboard_0.7.1 grid_4.0.2
[13] KernSmooth_2.23-17 gtools_3.8.2 matrixStats_0.57.0
[16] htmltools_0.5.0 iterators_1.0.12 survival_3.2-3
[19] digest_0.6.27 later_1.1.0.1 bitops_1.0-6
[22] promises_1.1.1 codetools_0.2-16 shape_1.4.5
[25] mime_0.9 compiler_4.0.2 gplots_3.1.0
[28] locfit_1.5-9.4 httpuv_1.5.4

Warning: Error in if: missing value where TRUE/FALSE needed

Hi
I can't seem to upload my otu_table.biom file on the Microbiome Explorer
it sent the Error

Warning: Error in if: missing value where TRUE/FALSE needed
  45: <observer>
   2: shiny::runApp
   1: runMicrobiomeExplorer

Please is there something i can do about it, the otu table was generated from a Bioinformatics pipeline (PIPITS)
Kindly Note: previously i used a set of otu tables which worked on the Microbiome Explorer, this is another set of otu data that is refusing to upload.

Thanks

Sandra

Report generation

I am not able to generate the report in html and also unable to find what is going wrong? Could you please help me to solve this issue?

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.