below_max_cutoff: Detect samples below a specified cutoff value

View source: R/table_utils.R

below_max_cutoffR Documentation

Detect samples below a specified cutoff value

Description

Identify samples with values below a maximum cutoff value.

Usage

below_max_cutoff(
  metrics_table,
  metric,
  cutoff = NULL,
  include_equals = F,
  na_as_false = F,
  coef = 1.7,
  use_unskewed_iqr = F,
  use_skewed_iqr = F
)

Arguments

metrics_table

Data frame or matrix with metrics as columns and samples as rows.

metric

Name of column with metric to use.

cutoff

Cutoff value.

include_equals

If TRUE, designate metric values equal to cutoff value as TRUE.

na_as_false

If TRUE, designate comparisons to 'NA' values as FALSE.

coef

Constant to multiply the interquartile range by in calculating a relative cutoff. The default value of 1.7 approximately equates to values at least 3 standard deviations from the mean for a gaussian distribution.

use_unskewed_iqr

If TRUE, set a relative cutoff value using the interquartile range of the metric distribution multiplied by coef. More suitable for non-skewed distributions.

use_skewed_iqr

If TRUE, set relative cutoff value using a medcouple-based adjustment of the interquartile range of the metric distribution multipled by coef. More suitable for skewed distributions.

Details

Indicates whether a sample is below a maximum cutoff value for a user-specified metric. Includes options to set the cutoff using values derived from interquartile range for both skewed and unskewed distributions.

Value

A list containing the following elements:

  • keep a logical vector indicating whether a given value for a metric meets the designated cutoff criteria. The vector order matches the input row order of metrics_table.

  • cutoff The cutoff value used.


bryancquach/omixjutsu documentation built on Jan. 29, 2023, 3:47 p.m.