run_macs: Run Macs3

View source: R/run_macs.R

run_macsR Documentation

Run Macs3

Description

Macs3 is a spatial clustering approach for the identification of ChIP-enriched regions which was developed for calling narrow and broad peaks, for transcription factor binding or histone modifications from ChIP-seq data.

Usage

run_macs(
  command = NULL,
  treatment = NULL,
  control = NULL,
  format = NULL,
  genome.size = NULL,
  qvalue = NULL,
  broad.peaks = NULL,
  broad.peaks.cutoff = NULL,
  out.dir = NULL,
  experiment.name = NULL,
  parallel = FALSE,
  cores = 4,
  execute = TRUE,
  macs = NULL,
  version = FALSE
)

Arguments

command

Tool arguments, choose form callpeak,bdgpeakcall,bdgbroadcall, bdgcmp,bdgopt,cmbreps,bdgdiff,filterdup,predictd,pileup,randsample,refinepeak,callvar,hmmratac

treatment

ChIP-seq treatment files list.

control

Control files list.

format

Format of the input files, choose from AUTO,BAM,SAM,BED,ELAND,ELANDMULTI,ELANDEXPORT,BOWTIE,BAMPE,BEDPE

genome.size

Effective genome size.

qvalue

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

broad.peaks

Boolean, if set to TRUE, MACS will try to call broad peaks

broad.peaks.cutoff

Minimum FDR (q-value) cutoff for broad region.

out.dir

Name of output directory

experiment.name

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

parallel

Run in parallel, default set to FALSE

cores

Number of cores/threads to use for parallel processing, default set to 4

execute

Whether to execute the commands or not, default set to TRUE

macs

Path to the Macs3 program, required

version

Returns the version number

Value

A list with the Macs3 commands

Examples

## Not run: 
macs_path <- "/home/gmh5n/.localpython/bin/macs3"

macs_version <- run_macs(macs = macs_path,
                         version = TRUE)

macs_version

macs_command <- "callpeak"
treatment <- c("1_sorted.bam","2_sorted.bam")
experiment.name <- gsub("_sorted.bam","",treatment)
control <- c("1-input_sorted.bam","2-input_sorted.bam")
size <- 1.9e9
macs_dir <- "macs"
macs_commands <- run_macs(command = command,
                          treatment = treatment,
                          control = control,
                          format = "BAM",
                          genome.size = size,
                          broad.peaks = TRUE,
                          broad.peaks.cutoff = 0.05,
                          out.dir = macs_dir,
                          parallel = TRUE,
                          cores = 2,
                          execute = FALSE,
                          experiment.name = experiment.name,
                          macs = macs_path)
macs_commands

## End(Not run)

GrahamHamilton/pipelineTools documentation built on March 5, 2024, 12:23 p.m.