This function will compute background peaks controlling for total accessibility and GC-content and add this information to an ArchRProject.

addBgdPeaks(
  ArchRProj = NULL,
  nIterations = 50,
  w = 0.1,
  binSize = 50,
  seed = 1,
  method = "chromVAR",
  outFile = file.path(getOutputDirectory(ArchRProj), "Background-Peaks.rds"),
  force = FALSE
)

Arguments

ArchRProj

An ArchRProject object.

nIterations

The number of background peaks to sample. See chromVAR::getBackgroundPeaks().

w

The parameter controlling similarity of background peaks. See chromVAR::getBackgroundPeaks().

binSize

The precision with which the similarity is computed. See chromVAR::getBackgroundPeaks().

seed

A number to be used as the seed for random number generation. It is recommended to keep track of the seed used so that you can reproduce results downstream.

method

A string indicating whether to use chromVAR or ArchR for background peak identification.

outFile

The path to save the backgroundPeaks object as a .RDS file for the given ArchRProject. The default action is to save this file in the outputDirectory of the ArchRProject.

force

A boolean value indicating whether to force the file indicated by outFile to be overwritten if it already exists.

Examples


# Get Test ArchR Project
proj <- getTestProject()

# Add Background Peaks
proj <- addBgdPeaks(proj, force = TRUE)