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
15
16
17
18
19
20
discretize(
  fc,
  number_of_bins = 4,
  method = "varying_width",
  alpha = 1,
  centers = 3,
  min_max_cutoff = 0.25,
  show_pb = TRUE
)

## S4 method for signature 'fcoex'
discretize(
  fc,
  number_of_bins = 4,
  method = "varying_width",
  alpha = 1,
  centers = 3,
  min_max_cutoff = 0.25,
  show_pb = TRUE
)

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), "mean_sd"(Split in low/medium/high by each assigning "medium" to the interval between mean +- standard_deviation. Modulated by the alpha param, which enlarges (>1) or shrinks (<1) the "medium" interval. ), ), "kmeans"(Split in different groups by the kmeans algorithm. As many groups as specified by the centers param) and "min_max_%" (Similat to the "varying width", a binarization threshold in a "GMM" (A Gaussian Mixture Model as implemented by the package mclust, trying to fit 2:5 Gaussians). Default is "varying_width"

alpha

Modulator for the "mean_sd" method.Enlarges (>1) or shrinks (<1) the "medium" interval. Defaults to 1.

centers

Modulator for the "kmeans" method. Defaults to 3.

min_max_cutoff

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

show_pb

Enables a progress bar for the discretization. Defaults to TRUE.

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)

fcoex documentation built on Nov. 8, 2020, 6:45 p.m.