Description Usage Arguments Details Value
Divides the genes that were not included in the top window in windows of the same size, by their mean expression.
1 | bin_scdata(dataset, method = c("window_number", "window_size"), parameter)
|
dataset |
A list, containing the top window generated by |
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. |
There are two binning methods available:
"window_number"
: Divides the genes into the number of windows specified in
parameter
, regardless of their size.
"window_size"
: Divides the genes into windows of the size specified in
parameter
, regardless of the number of windows generated.
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.
A data frame containing the binned genes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.