knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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.
You can install the released version of Wham from CRAN with:
install.packages("Wham")
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) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.