calc_fdr: Performs an FDR calculation on the fdr_on_columns.

View source: R/calc_fdr.R

calc_fdrR Documentation

Performs an FDR calculation on the fdr_on_columns.

Description

The purpose of calc_fdr is to add FDR correction columns to a data.table using the data.table in data.table out methodology

Usage

calc_fdr(
  my_dt,
  fdr_by_columns = NULL,
  fdr_method = "BH",
  fdr_on_columns = "pValue",
  readme_path = NULL
)

Arguments

my_dt

A data.table or data.frame that includes all columns of data needed to do the correction: fdr_by_columns & fdr_on_columns

fdr_by_columns

Optional character vector of column names to specify what should be group together in the fdr correction using the data.table "by" option. Leaving this blank will just apply the correction to all of the data values.

fdr_method

String to tell what method to use to FDR correct. Must be one of the values in stats::p.adjust.methods.

fdr_on_columns

Character vector to indicate which column(s) should be FDR corrected.

readme_path

If path is provided the comments from running this function will be appended to the path.

Details

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ calc_fdr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Value

data.table or data.frame (depending on the input) with an FDR correction column for each fdr_on_columns


Benjamin-Vincent-Lab/binfotron documentation built on Oct. 1, 2024, 8:33 p.m.