calculate_cvs: Calculate coefficient of variation of genes.

Description Usage Arguments Details Value

Description

Calculates the coefficient of variation (CV) of each row in the supplied data table.

Usage

1
calculate_cvs(data, max_zeros)

Arguments

data

A data frame, containing expression values for each gene as rows, and expression values for the cells as columns.

max_zeros

A double indicating the maximum proportion of zero expression values allowed per row.

Details

Before CV computation, the function modifies the raw data in two ways:

The data provided must contain gene names as a column in the first position, as output by the read_tsv function in the dplyr package, and an cell names as column names. These names will be assigned as the rownames of the output data frame.

In the output, mean, standard deviation and CV are incorporated as new columns in the data frame, named mean, sd and CV.

Value

A data frame, containing the filtered data and the mean, standard deviation and cv values for each row.


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