R/process_chip_data.R
count_normalize_chip.Rd
Counts ChIP-seq read coverage for each BAM file
using the coverage
function from bedtools
.
Then normalizes the read counts
by scaling to the reference ChIP-seq library size,
and transforms the ChIP-seq read counts.
count_normalize_chip(
sites,
chip_bam_files,
chip_idxstats_files,
chrom_size_file,
ref_size = 2e+07,
transform = c("none", "asinh", "log2", "sqrt"),
bedtools_path = "bedtools"
)
A data frame containing the candidate sites.
ChIP-seq BAM files (may include multiple replicates).
ChIP-seq idxstats
files
(may include multiple replicates).
(Default: uses the corresponding .idxstats.txt
files in
the same directory of the BAM files).
Chromosome size file.
Scales to ChIP-seq reference library size (Default: 2e7)
Transformation for ChIP-seq read counts. Options are ‘none’ (no transformation), ‘asinh’, ‘log2’, and ‘'sqrt'’.
Path to bedtools
executable.
A data frame of candidate sites and normalized (and transformed) ChIP-seq read counts around each candidate site.
if (FALSE) {
sites_chip <- count_normalize_chip(sites,
chip_bam_files=c('ChIPseq.rep1.bam', 'ChIPseq.rep2.bam'),
chrom_size_file='hg38.chrom.sizes',
ref_size=2e7)
}