Learn R Programming

SIPmg (version 3.0)

phyloseq2table: The following function is adapted from HTSSIP R package Phyloseq conversion to a ggplot-formatted table

Description

Convert the OTU table (+ metadata) to a format that can be easily plotted with phyloseq

Usage

phyloseq2table(
  physeq,
  include_sample_data = FALSE,
  sample_col_keep = NULL,
  include_tax_table = FALSE,
  tax_col_keep = NULL,
  control_expr = NULL
)

Value

data.frame

Arguments

physeq

Phyloseq object

include_sample_data

Include sample_table information?

sample_col_keep

Which columns in the sample_data table to keep? Use NULL to keep all columns.

include_tax_table

Include tax_table information?

tax_col_keep

A vector for column names to keep. Use NULL to keep all columns.

control_expr

An expression for identifying which samples are controls. Control/non-control identification will be in the 'IS_CONTROL' column of the returned data.frame object.