discretize_exprs {FCBF}R Documentation

discretize_exprs Simple discretizing of gene expression

Description

This function takes the range of values for each gene in a previously normalized expression table (genes/variables in rows, samples/observations in columns) and uses it for a width-based discretization. Each feature is divide into "n" bins of equal width. The first bin is attributed the class 'low' and the next bins are assigned to "high". It transposes the original expression table.

Usage

discretize_exprs(expression_table, number_of_bins = 3)

Arguments

expression_table

A previously normalized expression table Note: this might drastically change the number of selected features.

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 3.

Value

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

Examples

data(scDengue)
exprs <- SummarizedExperiment::assay(scDengue, 'logcounts')
discrete_expression <- as.data.frame(discretize_exprs(exprs))
head(discrete_expression[,1:4])

[Package FCBF version 1.1.1 Index]