knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Wham

Travis build status R-CMD-check AppVeyor build status Codecov test coverage

R package allowing for exploratory analysis of metagenomics and metatranscriptomic data. Includes visualization and statistical analysis on the functional pathway and taxonomic abundance. This package is developped based on package ALDEx2.

Installation

You can install the released version of Wham from CRAN with:

install.packages("Wham")

Example

A basic example: you can make differential analysis on metagenomic sequencing taxonomic and functional output.

library(Wham)
dir.data <-  system.file("extdata","biobakery_sample_input.tsv",package = "Wham")
countData <-  read.delim(dir.data)
countData <- countData[1:2000,] #we subset the count table to reduce computational cost, 

dir.meta = system.file("extdata","biobakery_sample_metadata.csv",package = "Wham")
metadata <- read.csv(dir.meta,row.names = 1)


 wham_bbk <-  WhamBiobakery(countData = countData,
                         colData = metadata,
                         DE = "taxa",  ##required,choose taxa or feautre(gene family)
                         design = ~ Location,    ##design formula to let function conduct tests on the group of interest,
                         taxa.level = "s",  ##collapse the bacterial rank level when choosing DE as "taxa", default:"s"("speices")."otu" when analyze 16s,
                         contrast = c("Location","Stool","Arm")  ##specify the comparison of interest: Stool(numerator) vs Arm(denominator) in 'Location' variable in metadata.
                         )

You can also generate plots, for example:

TaxaBarPlot(wham_bbk,
            filter = "all", 
            display.number = 30, ## only visualize top 30 abundant bacteria
            taxa.level = "g", ## visualiazation will be collapsed at "genues level"
)

TaxaHeatmap(wham_bbk,
            taxa.level = "s",
            filter = "DE.filter",
            effect.size.range = c(-0.5,0.5),
            scale = T, ## default setting
            column_split = c(rep("Arm",12),rep("Stool",12)), ## column_split is one of argument in Heatmap in ComplexHeatmap and compitle with other arguments; our demonstration comparison only contains 12 Arm samples and 11 Stool samples.
            row_names_gp = grid::gpar(fontsize = 5)
            )


zc1286/Wham documentation built on May 14, 2021, 8 p.m.