Learn R Programming

LorMe (version 1.2.1)

Alpha_diversity_calculator: Calculate alpha diversity based on tax summary object

Description

Calculate alpha diversity for each sample

Usage

Alpha_diversity_calculator(taxobj, taxlevel, prefix = "")

Value

'Alpha_diversity_calculator' returns alpha-diversity of each sample in format of column table (dataframe) combined with group information in meta file.

Arguments

taxobj

Configured tax summary objects.See in object_config.

taxlevel

taxonomy levels used for visualization.Must be one of c("Domain","Phylum","Class","Order","Family","Genus","Species","Base").

prefix

A character string as prefix of diversity index. Default:""

Examples

Run this code
###data preparation####
data("Two_group")
require(ggplot2)

###analysis####
Alpha_results<- Alpha_diversity_calculator(taxobj = Two_group,taxlevel = "Base")

#Check data frame contained alpha diversity
head(Alpha_results$alphaframe,5)

#Check contained statistics and plot list
names(Alpha_results$plotlist)

#Check statistics for Shannon
Alpha_results$plotlist$Plotobj_Shannon$Statistics

#Extract plot for Shannon
Alpha_results$plotlist$Plotobj_Shannon$Barplot
Alpha_results$plotlist$Plotobj_Shannon$Boxplot
Alpha_results$plotlist$Plotobj_Shannon$Violinplot


Run the code above in your browser using DataLab