bin_scdata: Bin genes by mean expression.

Description Usage Arguments Details Value

Description

Divides the genes that were not included in the top window in windows of the same size, by their mean expression.

Usage

1
bin_scdata(dataset, method = c("window_number", "window_size"), parameter)

Arguments

dataset

A list, containing the top window generated by extract_top_genes as the first element, and the rest of undivided genes as the second.

method

A string, indicating the method to be used to bin the genes by mean expression.

parameter

An integer. Indicates the numeric parameter to use in the previously chosen method. Values are not restricted, but should be coherent with the method of choice.

Details

There are two binning methods available:

This function uses the ntile function, in the dplyr package to assign a bin number to each gene based on the value contained in the mean column, corresponding to its mean expression. These are then added as a the column bin using the mutate function, also in the dplyr package.

Important note: This function is designed to take the list output by the extract_top_window function as an argument, operating only on the second element of it.

Once the genes in it have been binned, both elements of the list are bound together in a data frame and returned. The output is similar, but a new column bin is added, which indicates the window number assigned to each gene.

Value

A data frame containing the binned genes.


angelesarzalluz/scfilters documentation built on May 10, 2019, 11:46 a.m.