ideas_dist: Calculate distance array for all the genes and all pairs of...

View source: R/ideas_dist.R

ideas_distR Documentation

Calculate distance array for all the genes and all pairs of individuals.

Description

Calculate distance array for Individual level Differential Expression Analysis for Single cells (IDEAS).

Usage

ideas_dist(count_input, meta_cell, meta_ind, var_per_cell, 
var2test, var2test_type = c("binary", "continuous"), 
d_metric = c("Was", "JSD"), 
fit_method = c("nb", "zinb", "kde", "dca_direct", "saver_direct"), 
per_cell_adjust = c("NB", "both"), quantile = 0.975, 
empirical_n = 1024)

Arguments

count_input

The input data to be used to calculate distance arrays. If fit_method is "nb", "zinb", or "kde", the count_input should be a matrix of RNAseq counts, with rows for genes and columns for cells. Row names (unique gene ids) and column names (unique cell ids) are required. If fit_method is "dca_direct", the count_input is a list of 3 matrices for mean, over-dispersion, and zero inflation proportion, respectively. If fit_method is "saver_direct", the count_input is a matrix of Poisson mean values after adjusting cell level read-depth.

meta_cell

A data.frame of meta information of all the cells. The rows of meta_cell should be one to one correspondence to the columns of count_input. Three columns are required: "cell_id" and "individual" for cell id and individual labels, respectively, and a column for cell level read-depth, which should be included in the var_per_cell

.

Details

To calculate the distance array, we do not need to use the data in meta_ind. It is used to make sure the distance array aligns with the meta_ind for the next step analysis.

Value

A three dimensional array with first dimension for the number of genes and the next two dimensions for the the number of individuals. For example, if we study 1000 genes and 20 individuals, it is an array of dimension 1000 x 20 x 20.

Author(s)

Wei Sun, Si Liu, Mengqi Zhang

References

Mengqi Zhang*, Si Liu*, Zhen Miao, Fang Han, Raphael Gottardo, Wei Sun, Individual Level Differential Expression Analysis for Single Cell RNA-seq data, bioRxiv 2021.05.10.443350; doi: https://doi.org/10.1101/2021.05.10.443350 (* co-first author)


Sun-lab/ideas documentation built on Jan. 12, 2023, 12:50 a.m.