callpeak: callpeak

View source: R/callpeak.R

callpeakR Documentation

callpeak

Description

Main MACS3 Function to call peaks from alignment results.

Usage

callpeak(
  tfile,
  cfile = NULL,
  gsize = "hs",
  tsize = NULL,
  format = "AUTO",
  keepduplicates = "1",
  outdir = ".",
  name = "NA",
  store_bdg = FALSE,
  do_SPMR = FALSE,
  trackline = FALSE,
  nomodel = FALSE,
  shift = 0,
  extsize = 200,
  bw = 300,
  d_min = 20,
  mfold = c(5, 50),
  onauto = FALSE,
  qvalue = 0.05,
  pvalue = NULL,
  tempdir = "/tmp",
  nolambda = FALSE,
  scaleto = "small",
  downsample = FALSE,
  slocal = 1000,
  llocal = 10000,
  broad = FALSE,
  broadcutoff = 0.1,
  maxgap = NULL,
  minlen = NULL,
  cutoff_analysis = FALSE,
  fecutoff = 0.1,
  call_summits = FALSE,
  buffer_size = 1e+05,
  verbose = 2L,
  log = TRUE,
  ...
)

Arguments

tfile

ChIP-seq treatment files.

cfile

Control files.

gsize

Effective genome size. It can be 1.0e+9 or 1000000000, or shortcuts:'hs' for human (2.7e9), 'mm' for mouse (1.87e9), 'ce' for C. elegans (9e7) and 'dm' for fruitfly (1.2e8), Default:hs.

tsize

Tag size/read length. This will override the auto detected tag size. DEFAULT: Not set

format

Format of tag file, "AUTO", "BED" or "ELAND" or "ELANDMULTI" or "ELANDEXPORT" or "SAM" or "BAM" or "BOWTIE" or "BAMPE" or "BEDPE".

keepduplicates

It controls the behavior towards duplicate tags at the exact same location – the same coordination and the same strand.

outdir

If specified all output files will be written to that directory.

name

Experiment name, which will be used to generate output file names.

store_bdg

Whether or not to save extended fragment pileup, and local lambda tracks (two files) at every bp into a bedGraph file.

do_SPMR

If True, MACS will SAVE signal per million reads for fragment pileup profiles.

trackline

Tells MACS to include trackline with bedGraph files.

nomodel

Whether or not to build the shifting model.

shift

The arbitrary shift in bp. Use discretion while setting it other than default value.

extsize

The arbitrary extension size in bp.

bw

Band width for picking regions to compute fragment size.

d_min

Minimum fragment size in basepair. Any predicted fragment size less than this will be excluded.

mfold

Select the regions within MFOLD range of high-confidence enrichment ratio against background to build model.

onauto

Whether turn on the auto pair model process.

qvalue

Minimum FDR (q-value) cutoff for peak detection.

pvalue

Pvalue cutoff for peak detection. DEFAULT: not set.

tempdir

Optional directory to store temp files.

nolambda

If True, MACS will use fixed background lambda as local lambda for every peak region.

scaleto

When set to 'small', scale the larger sample up to the smaller sample.

downsample

When set, random sampling method will scale down the bigger sample. By default, MACS uses linear scaling.

slocal

The small nearby region in basepairs to calculate dynamic lambda.

llocal

The large nearby region in basepairs to calculate dynamic lambda.

broad

If set, MACS will try to call broad peaks using the –broad-cutoff setting.

broadcutoff

Cutoff for broad region. This option is not available unless –broad is set.

maxgap

Maximum gap between significant sites to cluster them together. The DEFAULT value is the detected read length/tag size.

minlen

Minimum length of a peak. The DEFAULT value is the predicted fragment size d.

cutoff_analysis

While set, MACS2 will analyze number or total length of peaks that can be called by different p-value cutoff then output a summary table to help user decide a better cutoff.

fecutoff

When set, the value will be used to filter out peaks with low fold-enrichment.

call_summits

If set, MACS will use a more sophisticated signal processing approach to find subpeak summits in each enriched peak region.

buffer_size

Buffer size for incrementally increasing internal array size to store reads alignment information. DEFAULT: 100000.

verbose

Set verbose level of runtime message. 0: only show critical message, 1: show additional warning message, 2: show process information, 3: show debug messages. DEFAULT:2

log

Whether to capture logs.

...

More options for macs2.

Value

macsList object.

Examples

eh <- ExperimentHub::ExperimentHub()
CHIP <- eh[["EH4558"]]
CTRL <- eh[["EH4563"]]
res <- callpeak(CHIP, CTRL, gsize = 5.2e7,
                cutoff_analysis = TRUE,
                outdir = tempdir(),
                name = "callpeak_narrow0")

macs3-project/MACSr documentation built on Nov. 24, 2023, 12:47 p.m.