log2fc: log2fc

Description Usage Arguments Examples

View source: R/log2fc.R

Description

This is a function for plotting log2 fold change.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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

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

yeguanhuav/visual16S documentation built on Feb. 19, 2022, 10:32 a.m.