| assign_peak_segments {chipenrich} | R Documentation |
Determine all overlaps between the set of input regions peaks and the given locus definition locusdef. In addition, report where each overlap begins and ends, as well as the length of the overlap.
assign_peak_segments(peaks, locusdef)
peaks |
A |
locusdef |
A locus definition object from |
Typically, this function will not be used alone, but inside chipenrich() with method = 'broadenrich'.
A data.frame with columns for peak_id, chr, peak_start, peak_end, gene_locus_start, gene_locus_end, gene_id, overlap_start, overlap_end, peak_overlap. The result is used in num_peaks_per_gene().
data('locusdef.hg19.nearest_tss', package = 'chipenrich.data')
data('tss.hg19', package = 'chipenrich.data')
file = system.file('extdata', 'test_assign.bed', package = 'chipenrich')
peaks = read_bed(file)
assigned_peaks = assign_peak_segments(
peaks = peaks,
locusdef = locusdef.hg19.nearest_tss)