scMultiMap
scMultiMap.Rd
Run scMultiMap to infer cell-type-specific peak-gene associations.
Usage
scMultiMap(
obj,
pairs_df,
bsample = NULL,
gene_assay = "RNA",
peak_assay = "peak",
seq_depth_list = NULL,
p.adjust.method = "BH",
irls = T,
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
- obj
A Seurat object of single-cell multimodal data.
- pairs_df
A data frame of peak-gene pairs to evaluate. The first column is gene name, and the second column is peak name.
- bsample
Default to NULL when all cells are from the same biological sample. When multiple biological samples are present, bsample should be either the column name for the sample label in Seurat object meta data, or a length n vector of labels for biological samples.
- gene_assay
Name of the gene assay in Seurat object. Default to 'RNA'.
- peak_assay
Name of the peak assay in Seurat object. Default to 'peak'.
- seq_depth_list
A list of two length n vectors of sequencing depths. If NULL, they will be calculated as the total number of gene/peak counts in each cell for two modalities, respectively.
- p.adjust.method
Method for multiple testing adjustment, passed to stats::p.adjust. Default to 'BH' for FDR control.
- irls
Whether to run IRLS to estimate mean and variance parameters in step 1. Default to TRUE.
- verbose
Whether to print detailed messages. Default to FALSE.
Value
A data frame of scMultiMap results with six 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
- cor
estimated correlation
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
# For illustrative purposes, we provide
# a toy Seurat object `small_obj` and
# a data frame of candidate peak-gene pairs `small_pairs_df`
# in this R package.
res <- scMultiMap(small_obj, small_pairs_df)
#> Loading required package: SeuratObject
#> Loading required package: sp
#> ‘SeuratObject’ was built under R 4.4.0 but the current version is
#> 4.4.3; it is recomended that you reinstall ‘SeuratObject’ as the ABI
#> for R may have changed
#> ‘SeuratObject’ was built with package ‘Matrix’ 1.7.1 but the current
#> version is 1.7.2; it is recomended that you reinstall ‘SeuratObject’ as
#> the ABI for ‘Matrix’ may have changed
#>
#> Attaching package: ‘SeuratObject’
#> The following objects are masked from ‘package:base’:
#>
#> intersect, t
#> Start step 1: IRLS
#> Start IRLS for RNA
#> Start IRLS for peak
#> Start step 2: WLS
#> There are 10 unique genes in the peak-gene pairs.
#> scMultiMap elapsed time: 00:01 (mm:ss)
head(res,2)
#> gene peak pval test_stat covar padj
#> 1 MALAT1 chr11-65013281-65014841 0.1521555 1.4319591 3.100282e-05 0.8273097
#> 2 MALAT1 chr11-65026934-65027962 0.7938414 0.2613256 5.204042e-06 0.9753992
#> cor
#> 1 0.000000
#> 2 0.102161
# gene peak pval test_stat covar
# 1 MALAT1 chr11-65013281-65014841 0.1521555 1.4319591 3.100282e-05
# 2 MALAT1 chr11-65026934-65027962 0.7938414 0.2613256 5.204042e-06