make_FC.pval_df: Find p-values and fold-change (FC) for each group

View source: R/FC.pval.R

make_FC.pval_dfR Documentation

Find p-values and fold-change (FC) for each group

Description

Find p-values and fold-change (FC) for each group specified in rowAnn_col across many columns of a data frame

Usage

make_FC.pval_df(
  df,
  rowAnn_col = 1,
  rev = T,
  vs.other = T,
  group_name_sep = "/",
  FC.method = "divide",
  p.method = "wilcox.test"
)

Arguments

df

A data frame - first column: rowAnnotation column with groups, the rest of the columns are values

rowAnn_col

A column index (numeric) or name in df indicating which groups to stratify by

rev

Logical indicating whether to reverse the order of the default FC (default is TRUE), ex. low-hig –> hig-low

vs.other

logical, indicating whether to compare all groups to other, eg. high vs (low+intermed)

group_name_sep

A character indicating how the labels for groups should be presented, "/" in low/high

FC.method

Fold change computation method to use, either "divide" (for non-transformed values) or "subtract" (for log2-transformed values)

p.method

Significance test to use, either "t.test" or "wilcox"/"wilcox.test"

Value

A data frame with p-vals and fold-changes for each group (rowAnn) in each variable (column)


kazeera/hourglass documentation built on April 5, 2025, 7:18 a.m.