Description Usage Arguments Details Value Examples
View source: R/peaks_per_gene.R
In particular, for method = 'broadenrich'
in chipenrich()
, when using assign_peak_segments()
. This function will add aggregated peak_overlap
(in base pairs) and ratio
(relative to length
) columns to the result of num_peaks_per_gene()
so the right data is present for the method = 'broadenrich'
model.
1 | calc_peak_gene_overlap(assigned_peaks, ppg)
|
assigned_peaks |
A |
ppg |
The aggregated peak assignments over |
Typically, this function will not be used alone, but inside chipenrich()
with method = 'broadenrich'
.
A data.frame
with columns gene_id, length, log10_length, num_peaks, peak, peak_overlap, ratio
. The result is used directly in the gene set enrichment tests in chipenrich()
when method = 'broadenrich'
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 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)
ppg = num_peaks_per_gene(
assigned_peaks = assigned_peaks,
locusdef = locusdef.hg19.nearest_tss,
mappa = NULL)
ppg = calc_peak_gene_overlap(
assigned_peaks = assigned_peaks,
ppg = ppg)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.