pooled_peaks: Pooled peaks

View source: R/pooled_peaks.R

pooled_peaksR Documentation

Pooled peaks

Description

Pool groups of BAM files into a smaller number of BAM files and call peaks on each of them.

Usage

pooled_peaks(
  bam_files,
  groups = names(bam_files),
  outdir = tempdir(),
  cutoff = NULL,
  method = c("MACSr", "SEACR"),
  verbose = TRUE,
  ...
)

Arguments

bam_files

One or more BAM files.

groups

A character vector of the same length as bam_files defining how to group files when calling consensus peaks.

outdir

Directory to save results to.

cutoff
  • when method="MACSr" : Passed to cutoff argument. Cutoff depends on which method you used for score track. If the file contains pvalue scores from MACS3, score 5 means pvalue 1e-5. If NULL, a reasonable cutoff value will be inferred through a cutoff_analysis.

  • when method="SEACR" : Passed to control argument. Control (IgG) data bedgraph file to generate an empirical threshold for peak calling. Alternatively, a numeric threshold n between 0 and 1 returns the top n fraction of peaks based on total signal within peaks (default: 0.05).

method

Method to call consensus peaks with:

  • "MACSr : Call consensus peaks by merging groups of BAM files with mergeBam and then calling peaks with call_peaks_macsr.

  • "SEACR : Call consensus peaks by merging groups of BAM files with mergeBam and then calling peaks with call_peaks_seacr.

verbose

Print messages.

...

Additional argument passed to either call_peaks_macsr or call_peaks_seacr, depending on method.

Value

GRangesList object.

Examples

bam_files <- example_bam()
peaks <- pooled_peaks(bam_files = bam_files)

neurogenomics/PeakyFinders documentation built on Oct. 14, 2024, 3:09 p.m.