Call broad peaks from bedGraph output. Note: All regions on the same chromosome in the bedGraph file should be continuous so only bedGraph files from MACS3 are accpetable.

bdgbroadcall(
  ifile,
  cutoffpeak = 2,
  cutofflink = 1,
  minlen = 200L,
  lvl1maxgap = 30L,
  lvl2maxgap = 800L,
  trackline = TRUE,
  outdir = ".",
  outputfile = character(),
  oprefix = character(),
  log = TRUE,
  verbose = 2L
)

Arguments

ifile

MACS score in bedGraph. REQUIRED.

cutoffpeak

Cutoff for peaks depending on which method you used for score track. If the file contains qvalue scores from MACS3, score 2 means qvalue 0.01. Regions with signals lower than cutoff will not be considerred as enriched regions. DEFAULT: 2

Cutoff for linking regions/low abundance regions depending on which method you used for score track. If the file contains qvalue scores from MACS3, score 1 means qvalue 0.1, and score 0.3 means qvalue 0.5. DEFAULT: 1

minlen

minimum length of peak, better to set it as d value. DEFAULT: 200", default = 200

lvl1maxgap

maximum gap between significant peaks, better to set it as tag size. DEFAULT: 30

lvl2maxgap

maximum linking between significant peaks, better to set it as 4 times of d value. DEFAULT: 800

trackline

Tells MACS not to include trackline with bedGraph files. The trackline is required by UCSC.

outdir

The output directory.

outputfile

Output file name. Mutually exclusive with –o-prefix

oprefix

The PREFIX of output bedGraph file to write scores. If it is given as A, and method is 'ppois', output file will be A_ppois.bdg. Mutually exclusive with -o/–ofile.

log

Whether to capture logs.

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

Value

macsList object.

Examples

eh <- ExperimentHub::ExperimentHub()
CHIP <- eh[["EH4558"]]
#> see ?MACSdata and browseVignettes('MACSdata') for documentation
#> downloading 1 resources
#> retrieving 1 resource
#> loading from cache
CTRL <- eh[["EH4563"]]
#> see ?MACSdata and browseVignettes('MACSdata') for documentation
#> downloading 1 resources
#> retrieving 1 resource
#> loading from cache
p1 <- pileup(CHIP, outdir = tempdir(),
             outputfile = "pileup_ChIP_bed.bdg", format = "BED")
#> + /root/.cache/R/basilisk/1.17.2/0/bin/conda create --yes --prefix /root/.cache/R/basilisk/1.17.2/MACSr/1.11.3/env_macs 'python=3.10' --quiet -c conda-forge --override-channels
#> + /root/.cache/R/basilisk/1.17.2/0/bin/conda install --yes --prefix /root/.cache/R/basilisk/1.17.2/MACSr/1.11.3/env_macs 'python=3.10' -c conda-forge --override-channels
#> + /root/.cache/R/basilisk/1.17.2/0/bin/conda install --yes --prefix /root/.cache/R/basilisk/1.17.2/MACSr/1.11.3/env_macs -c conda-forge 'python=3.10' 'python=3.10' --override-channels
#> INFO  @ 18 Sep 2024 20:58:48: [682 MB] # read alignment files... 
#> INFO  @ 18 Sep 2024 20:58:48: [682 MB] # read treatment tags... 
#> INFO  @ 18 Sep 2024 20:58:48: [688 MB] tag size is determined as 101 bps 
#> INFO  @ 18 Sep 2024 20:58:48: [688 MB] # tag size = 101 
#> INFO  @ 18 Sep 2024 20:58:48: [688 MB] # total tags in alignment file: 49622 
#> INFO  @ 18 Sep 2024 20:58:48: [688 MB] # Pileup alignment file, extend each read towards downstream direction with 200 bps 
#> INFO  @ 18 Sep 2024 20:58:48: [688 MB] # Done! Check pileup_ChIP_bed.bdg 
p2 <- pileup(CTRL, outdir = tempdir(),
             outputfile = "pileup_CTRL_bed.bdg", format = "BED")
#> 
c1 <- bdgcmp(p1$outputs, p2$outputs, outdir = tempdir(),
             oprefix = "bdgcmp", pseudocount = 1, method = "FE")
#> 
bdgbroadcall(c1$outputs, cutoffpeak = 2, cutofflink = 1.5,
             outdir = tempdir(), outputfile = "bdgbroadcall")
#> 
#> macsList class
#> $outputs:
#>  /tmp/RtmpkYWDbh/bdgbroadcall 
#> $arguments: ifile, cutoffpeak, cutofflink, outdir, outputfile 
#> $log:
#>