PeakCallingMACS2: Use MACS2 to call peak

PeakCallingMACS2R Documentation

Use MACS2 to call peak

Description

Use MACS2 installed by to call peak

Usage

atacPeakCallingMACS2(
  atacProc,
  bedInput = NULL,
  background = NULL,
  outputPrefix = NULL,
  genomeSize = NULL,
  pvalueThreshold = 0.01,
  extsize = 150,
  shift = -round(extsize/2),
  ...
)

## S4 method for signature 'ATACProc'
atacPeakCallingMACS2(
  atacProc,
  bedInput = NULL,
  background = NULL,
  outputPrefix = NULL,
  genomeSize = NULL,
  pvalueThreshold = 0.01,
  extsize = 150,
  shift = -round(extsize/2),
  ...
)

peakCallingMACS2(
  bedInput,
  background = NULL,
  outputPrefix = NULL,
  genomeSize = NULL,
  pvalueThreshold = 0.01,
  extsize = 150,
  shift = -round(extsize/2),
  ...
)

testPeakCallingMACS2()

Arguments

atacProc

ATACProc-class object scalar. It has to be the return value of upstream process: atacSamToBed, atacBedUtils.

bedInput

Character scalar. BED file input path.

background

Character scalar. background directory default: NULL (none)

outputPrefix

Character scalar. the output bed file path

extsize

Logical scalar. verbose output if TRUE.

shift

Character scalar. wg threshold set default: NULL (calculated)

...

Additional arguments, currently unused.

threshold

Numeric scalar. threshold (standard deviations) default: NULL (4.0)

Details

The parameter related to input and output file path will be automatically obtained from ATACProc-class object(atacProc) or generated based on known parameters if their values are default(e.g. NULL). Otherwise, the generated values will be overwrited. If you want to use this function independently, you can use peakCalling instead.

Value

An invisible ATACProc-class object scalar for downstream analysis.

Author(s)

Zheng Wei

See Also

atacSamToBed samToBed atacBedUtils bedUtils

Examples

library(R.utils)
library(magrittr)
td <- tempdir()
setTmpDir(td)

bedbzfile <- system.file(package="esATAC", "extdata", "chr20.50000.bed.bz2")
bedfile <- file.path(td,"chr20.50000.bed")
bunzip2(bedbzfile,destname=bedfile,overwrite=TRUE,remove=FALSE)

bedUtils(bedInput = bedfile,maxFragLen = 100, chrFilterList = NULL) %>%
atacPeakCalling

dir(td)

wzthu/esATAC documentation built on Aug. 12, 2022, 7:41 a.m.