Skip to contents

This function implements the 2nd step of scMultiMap: estimate and infer peak-gene association with WLS. It takes the output from the 1st step, scMultiMap_IRLS as input.

Usage

scMultiMap_WLS(count_list, seq_depth_list, pairs_df, irls_list, verbose = F)

Source

Cell-type-specific mapping of enhancer and target genes from single-cell multimodal data. Chang Su, Dongsoo Lee, Peng Jin, Jingfei Zhang; https://www.biorxiv.org/content/10.1101/2024.09.24.614814v1

Arguments

count_list

A list of two p by n count matrices. The first element is for gene and the second for peak.

seq_depth_list

A list of two length p vectors of sequencing depths. The first element is for scRNA-seq and the second for scATAC-seq.

pairs_df

A data frame of candidate peak-gene pairs to evaluate. The first column is gene name, and the second is peak name.

irls_list

A list of two lists generated from the 1st step of scMultiMap, i.e. scMultiMap_IRLS. The first list contains the results on genes, the second on peaks.

verbose

Whether to print detailed messages. Default to FALSE.

Value

A data.frame with five columns

gene

gene in the peak-gene pair

peak

peak in the peak-gene pair

pval

p-value

test_stat

test statistics

covar

estimated covariance

Each row corresponds to one peak-gene pair's results from scMultiMap. pval and test_stat denote the statistical significance of peak-gene association, and covar denote the magnitude of association. The number of rows is equal to the number of pairs in pairs_df present in the Seurat object.

Examples

count_list <- list(gene = t(as.matrix(small_obj[['RNA']]$counts)),
 peak = t(as.matrix(small_obj[['peak']]$counts)))
seq_depth_list <- list(gene = Matrix::colSums(small_obj[['RNA']]$counts),
 peak = Matrix::colSums(small_obj[['peak']]$counts))
wls_res <- scMultiMap_WLS(count_list, seq_depth_list, small_pairs_df, small_irls_list)
#> There are 10 unique genes in the peak-gene pairs.