Call peaks using MACS. Fragment files linked to the specified assay will be
used to call peaks. If multiple fragment files are present, all will be used
in a single MACS invocation. Returns the .narrowPeak
MACS output as a
GRanges
object.
CallPeaks(object, ...) # S3 method for Seurat CallPeaks( object, assay = NULL, group.by = NULL, idents = NULL, macs2.path = NULL, broad = FALSE, outdir = tempdir(), combine.peaks = TRUE, effective.genome.size = 2.7e+09, extsize = 200, shift = -extsize/2, additional.args = NULL, name = Project(object), cleanup = TRUE, verbose = TRUE, ... ) # S3 method for ChromatinAssay CallPeaks( object, macs2.path = NULL, outdir = tempdir(), broad = FALSE, effective.genome.size = 2.7e+09, extsize = 200, shift = -extsize/2, additional.args = NULL, name = "macs2", cleanup = TRUE, verbose = TRUE, ... ) # S3 method for Fragment CallPeaks( object, macs2.path = NULL, outdir = tempdir(), broad = FALSE, effective.genome.size = 2.7e+09, extsize = 200, shift = -extsize/2, additional.args = NULL, name = "macs2", cleanup = TRUE, verbose = TRUE, ... ) # S3 method for default CallPeaks( object, macs2.path = NULL, outdir = tempdir(), broad = FALSE, effective.genome.size = 2.7e+09, extsize = 200, shift = -extsize/2, additional.args = NULL, name = "macs2", cleanup = TRUE, verbose = TRUE, ... )
object | A Seurat object, ChromatinAssay object, Fragment object, or the path to fragment file/s. |
---|---|
... | Arguments passed to other methods |
assay | Name of assay to use |
group.by | Grouping variable to use. If set, peaks will be called independently on each group of cells and then combined. Note that to call peaks using subsets of cells we first split the fragment file/s used, so using a grouping variable will require extra time to split the files and perform multiple MACS peak calls, and will store additional files on-disk that may be large. Note that we store split fragment files in the temp directory, and if the program is interrupted before completing these temporary files will not be removed. If NULL, peaks are called using all cells together (pseudobulk). |
idents | List of identities to include if grouping cells (only valid if
also setting the |
macs2.path | Path to MACS program. If NULL, try to find MACS automatically. |
broad | Call broad peaks ( |
outdir | Path for output files |
combine.peaks | Controls whether peak calls from different groups of
cells are combined using |
effective.genome.size | Effective genome size parameter for MACS
( |
extsize |
|
shift |
|
additional.args | Additional arguments passed to MACS. This should be a single character string |
name | Name for output MACS files. This will also be placed in the
|
cleanup | Remove MACS output files |
verbose | Display messages |
Returns a GRanges
object
See https://macs3-project.github.io/MACS/ for MACS documentation.
If you call peaks using MACS2 please cite: doi: 10.1186/gb-2008-9-9-r137