Skip to content

ikmb/shiny_mikrob

Repository files navigation

shiny_mikrob

Shiny Mikrob

Shiny Mikrob is an interactive Shiny Document for exploring microbiome data using the phyloseq framework. It enables intuitive visualization and statistical analysis of microbial composition from amplicon sequencing experiments.

Input Requirements

The app expects the following .tsv files for ASV table anf Taxonomy table, preferably generated by the nf-core/ampliseq pipeline and .csv file for metadata :

  1. ASV Table

    • Format: ASVs (rows) × samples (columns)
    • Header: ASV_ID as the first column
  2. Taxonomy Table

    • Must contain the following columns:
      ASV_ID  Kingdom  Phylum  Class  Order  Family  Genus  Species_exact  confidence  sequence
      
  3. Sample Metadata Table

    • Samples (rows) × variables (columns)
    • First column must contain the sample IDs, matching those in the ASV table

What Does It Do?

Once the input files are loaded, the app enables:

1. Coverage & Rarefaction

  • Visualize read count distribution across samples
  • Assess sequencing depth and choose rarefaction threshold interactively
  • Inspect coverage per sample before filtering or rarefaction

2. Alpha Diversity

  • Choose among standard indices (Shannon, Simpson, etc.)
  • Group samples by a metadata variable
  • Perform Wilcoxon or ANOVA (depending on number of groups)
  • Add significance annotations to plots

3. Beta Diversity

  • Choose distance method (Bray-Curtis, UniFrac, etc.)
  • Select ordination method (PCoA, NMDS, etc.)
  • Color and shape samples by metadata
  • Option to add centroids or convex hulls
  • Run PERMANOVA (adonis2) and display results on plots

4. Relative Abundance

  • Filter low-abundance taxa (threshold adjustable)
  • Select taxonomic rank for aggregation
  • Plot relative abundance per group
  • Automatically color bars by group
  • Option to save relative/average abundance tables

5. Absolute Abundance

  • Select taxonomic level, bar fill, and facet variable
  • Aggregated raw abundance counts (not normalized)
  • Optionally fill bars by metadata (or leave as gray)

Downloads

You can download:

  • Original phyloseq object
  • Rarefied phyloseq object
  • Alpha, beta, and abundance plots (as PNG)
  • Tables with statistical analysis (as CSV)

Installation & Usage

The shiny_mikrob app can be run via several methods depending on your environment and preference. First you need to clone the repo:

git clone https://github.com/ikmb/shiny_mikrob.git
cd shiny_mikrob

Option 1: Run Locally with renv (Recommended for R users)

# Install renv (if not installed)
install.packages("renv")
# Restore the environment
renv::restore()
#Make surepandoc is in your system PATH or correctly referenced 
# Run the app
rmarkdown::run("mikrob.rmd")

Option 2: Run in a Docker container

# Build the image
docker build -t mikrob_shiny .
# Run the container
docker run -p 3838:3838 mikrob_shiny

Option 3: Use Conda Environment (alternative to renv)

# Create and activate the conda environment
conda env create -f environment.yml
conda activate mikrob_env

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published