PeakRefiner: constructor for PeakRefiner

Description Usage Arguments Value Examples

View source: R/class_peakrefine.R

Description

constructor for PeakRefiner

Usage

1
2
3
4
PeakRefiner(peak_set, bam_treat_file, bam_input_file, pwm,
  target_pwm_names, fragment_lengths = NULL, color_overrides = NULL,
  color_default = "black", auto_frag_len_FUN = NULL,
  output_prefix = NULL)

Arguments

peak_set

GRanges formatted peak set to calculate motifs on

bam_treat_file

.bam file of aligned reads from ChIP-seq pulldown. Index must be at .bam.bai

bam_input_file

.bam file of aligned reads from input control. Index must be at .bam.bai

pwm

Position Weight Matrix from PWMEnrich

target_pwm_names

names of PWMs to include in figures by default

fragment_lengths

fragment lengths to consider

color_overrides

character. colors to use for each item in fragment_lengths. should contain valid hex ("#000000") or R colors ("black") and be named with items in fragment_lengths. non-overriden items will be black.

color_default

single character. black.

auto_frag_len_FUN

function to use to auto calculate fragment length. must accept two argument, bam_file and peak_set.

output_prefix

prefix to use for output files.

Value

a new valid object of class PeakRefiner

Examples

1
2
3
4
5
6
7
8
9
bam_file = system.file("extdata", "MCF10A_CTCF.random5.bam", package = "peakrefine")
bam_input = system.file("extdata", "MCF10A_input.random5.bam", package = "peakrefine")
np = system.file("extdata", "MCF10A_CTCF.random5.narrowPeak", package = "peakrefine")
qgr = rtracklayer::import(np, format = "narrowPeak")

library(PWMEnrich.Hsapiens.background)
data("PWMLogn.hg19.MotifDb.Hsap")
pwm = PWMLogn.hg19.MotifDb.Hsap[1:2]
PeakRefiner(qgr, bam_file, bam_input, pwm, names(pwm$pwms)[1])

jrboyd/peakrefine documentation built on July 30, 2020, 7:13 p.m.