prep_ternary: Create table for Ternary plot

View source: R/prep_ternary.R

prep_ternaryR Documentation

Create table for Ternary plot

Description

Create a table for ternary plot ggtern R package.

Usage

prep_ternary(
  x,
  abund.thres = 1e-04,
  prev.thres = 0.1,
  group = NULL,
  level = "lowest"
)

Arguments

x

phyloseq-class object

abund.thres

= 0.0001 check microbiome package core function remove taxa that are dectected at 0.0001 in less than prev.thres of samples

prev.thres

= 0.1 check microbiome package core function

group

Grouping variable to compare, for this plot there has to be three groups in the data

level

= "Genus" Taxonomic level. If OTU/ASV level specify="lowest" Does not support phylum level aggregation

Details

Plots the mean relative abundance of taxa in 3 groups being compared.

Value

Tibble object.

Examples

library(microbiome)
library(microbiomeutilities)
library(dplyr)
data("zackular2014")
p0 <- zackular2014
prep_ternary(p0, group = "DiseaseState", abund.thres = 0.0001, level = "Genus", prev.thres = 0.25)

microsud/microbiomeutilities documentation built on Nov. 29, 2022, 12:18 a.m.