runMACSForAll: Call Peaks Using MACS2 For All Clusters

View source: R/runMACS.R

runMACSForAllR Documentation

Call Peaks Using MACS2 For All Clusters

Description

Identify peaks for all clusters. Fragments belonging to each subset or cluster of cells are extracted and used to identify peaks using MACS2. This function requires "MACS2" and "snaptools" preinstalled and excutable.

Usage

runMACSForAll(obj, output.prefix, path.to.snaptools, path.to.macs, gsize,
  tmp.folder, num.cores = 1, min.cells = 100, buffer.size = 500,
  macs.options = "--nomodel --shift 37 --ext 73 --qval 1e-2 -B --SPMR --call-summits",
  keep.minimal = TRUE)

Arguments

obj

A snap object.

output.prefix

Prefix of output file which will be used to generate output file names.

path.to.snaptools

Path to snaptools excutable file.

path.to.macs

Path to macs2 excutable file.

gsize

effective genome size. 'hs' for human, 'mm' for mouse, 'ce' for C. elegans, 'dm' for fruitfly (default: None)

tmp.folder

Directory to store temporary files generated by runMACSForAll.

num.cores

number of cpus to use [1].

min.cells

min number of cells to perform peak calling [100]. Clusters with cells less than num.cells will be excluded.

buffer.size

Buffer size for incrementally increasing internal array size to store reads alignment information. In most cases, you don't have to change this parameter. However, if there are very high coverage dataset that each barcode has more than 10000 fragments, it's recommended to specify a smaller buffer size in order to decrease memory usage (but it will take longer time to read snap files) [1000].

macs.options

String indicate options you would like passed to macs2. strongly do not recommand to change unless you know what you are doing. the default is '–nomodel –shift 37 –ext 73 –qval 1e-2 -B –SPMR –call-summits'.

keep.minimal

Keep minimal version of output [TRUE].

Value

Return a GRanges object that contains the non-overlapping combined peaks


r3fang/SnapATAC documentation built on March 29, 2022, 4:33 p.m.