Skip to contents

The iteratively reweighted least squares procedure in CS-CORE for estimating and testing cell-type-specific co-expressions using single cell RNA sequencing data. More details on this procedure can be found in the CS-CORE paper: https://doi.org/10.1101/2022.12.13.520181.

Usage

CSCORE_IRLS(X, seq_depth, post_process = TRUE)

Source

Cell-type-specific co-expression inference from single cell RNA-sequencing data Chang Su, Zichun Xu, Xinning Shan, Biao Cai, Hongyu Zhao, Jingfei Zhang; bioRxiv 2022.12.13.520181; doi: https://doi.org/10.1101/2022.12.13.520181

Arguments

X

A n by p matrix of UMI counts, where n denotes the number of cells and p denotes the number of genes

seq_depth

A length n vector of sequencing depths

post_process

Whether to process the estimated co-expressions such that the estimates are between -1 and 1. Default to TRUE.

Value

A list of three p by p matrices:

est

co-expression estimates

p_value

p values

test_stat

test statistics

Examples

## Toy example:
## run CSCORE on a simulated independent gene pair
cscore_example <- CSCORE_IRLS(ind_gene_pair$counts, ind_gene_pair$seq_depths)
#> [1] "IRLS converged after 2 iterations."
#> [1] "0.0000% co-expression estimates were greater than 1 and were set to 1."
#> [1] "0.0000% co-expression estimates were smaller than -1 and were set to -1."

## Estimated co-expression between two genes
cscore_example$est[1,2]
#> [1] 0.007820124
# close to 0: 0.007820124

## p-values
cscore_example$p_value[1,2]
#> [1] 0.961981
# not significant: 0.961981