Skip to contents

Calculate the cross-correlation between promoter accessibility and RNA expression

Usage

calc_prom_rna_cor(
  atac_mc,
  genes = NULL,
  rm_zeros = TRUE,
  match_genes = FALSE,
  spearman = FALSE,
  pairwise.complete.obs = TRUE
)

Arguments

atac_mc

a McPeaks object with promoters (using gen_promoter_features) and RNA expression (using add_mc_rna)

genes

list of genes to match. Default (NULL): all genes

rm_zeros

remove genes with no RNA expression in any metacell. Default: TRUE

match_genes

calculate correlation only between genes and promoters which have both accesability and RNA expression. Matching is done based on name. Default: FALSE

spearman

if 'TRUE' Spearman correlation is computed, otherwise Pearson

pairwise.complete.obs

see below

Value

a correlation matrix where rows are promoters and columns are genes