log2fc: log2fc

View source: R/log2fc.R

log2fcR Documentation

log2fc

Description

This is a function for plotting log2 fold change.

Usage

log2fc(
  phyloseq,
  feature,
  level = NA,
  p_value = 0.05,
  save_res = FALSE,
  reference = NA,
  treatment = NA,
  print_to_screen = FALSE
)

Arguments

phyloseq

A phyloseq object contain otu table, taxonomy table, sample metadata and phylogenetic tree, or a phyloseq object only contain constructed OTU table and metadata.

feature

The column name of the feature you want to from metadata, e.g. "Phenotype".

level

Which taxonomy level to calculate fold change. Default is NA. If level is given, will use construct_otu_table function to construct OTU table, and use DESeq to calculate fold change.

p_value

The cut off P value for the fold change. Default is 0.05.

save_res

Default is FALSE. If TRUE, will save original result DESeq2_result.rds to current working directory.

reference

The control group. Default is NA.

treatment

The treatment group. Default is NA.

print_to_screen

Default is FALSE. If TRUE, print fold change table to the screen.

Examples

log2fc(demo_phyloseq_object, feature = "diagnosis", level = "Genus")

yeguanhuav/visualization416S documentation built on March 22, 2022, 9:03 p.m.