discretize: Set the discretized expression attribute Uses the...

Description Usage Arguments Value Examples

Description

Set the discretized expression attribute Uses the discretize_exprs function of the FCBF package

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
discretize(
  fc,
  number_of_bins = 4,
  method = "varying_width",
  min_max_cutoff = 0.25
)

## S4 method for signature 'fcoex'
discretize(
  fc,
  number_of_bins = 4,
  method = "varying_width",
  min_max_cutoff = 0.25
)

Arguments

fc

Object of class fcoex

number_of_bins

Number of equal-width bins for discretization. Note: it is a binary discretization, with the first bin becoming one class ('low') and the other bins, another class ('high'). Defaults to 4.

method

Method applied to all genes for discretization. Methods available: "varying_width" (Binarization modulated by the number_of_bins param), "mean" (Split in ON/OFF by each gene mean expression), "median" (Split in ON/OFF by each gene median expression), "min_max_%" (Similat to the "varying width", a binarization threshold in a % of the min-max range is set. (minmax% param)),

min_max_cutoff

<- Modulator for the "min_max_%" method. Defaults to 0.25.

Value

A data frame with the discretized features in the same order as previously

Examples

1
2
3
4
5
6
library(SingleCellExperiment)
data("mini_pbmc3k")
targets <- colData(mini_pbmc3k)$clusters
exprs <- as.data.frame(assay(mini_pbmc3k, "logcounts"))
fc <- new_fcoex(exprs, targets)
fc <- discretize(fc)

csbl-usp/fcoex documentation built on Sept. 15, 2021, 7:42 a.m.