shrinkBins: Employ an eBayes shrinkage approach for bin-level estimates...

View source: R/shrinkBins.R

shrinkBinsR Documentation

Employ an eBayes shrinkage approach for bin-level estimates for A/B inference

Description

shrinkBins returns shrunken bin-level estimates

Usage

shrinkBins(
  x,
  original.x,
  prior.means = NULL,
  chr = NULL,
  res = 1e+06,
  targets = NULL,
  jse = TRUE,
  assay = c("rna", "atac", "array"),
  genome = c("hg19", "hg38", "mm9", "mm10")
)

Arguments

x

Input SummarizedExperiment object

original.x

Full sample set SummarizedExperiment object

prior.means

The means of the bin-level prior distribution

chr

The chromosome to operate on

res

Resolution to perform the binning

targets

The column/sample/cell names to shrink towards

jse

Whether to use a James-Stein estimator (default is TRUE)

assay

What assay type this is ("rna", "atac", "array")

genome

What genome are we working with ("hg19", "hg38", "mm9", "mm10")

Details

This function computes shrunken bin-level estimates using a James-Stein estimator, reformulated as an eBayes procedure

Value

A list object to pass to getCorMatrix

Examples

data("k562_scrna_chr14", package = "compartmap")
shrunken.bin.scrna <- shrinkBins(x = k562_scrna_chr14,
                                 original.x = k562_scrna_chr14,
                                 chr = "chr14", assay = "rna")


biobenkj/compartmentalizer documentation built on Oct. 13, 2023, 5:26 p.m.