num_peaks_per_gene {chipenrich} | R Documentation |
gene_id
columnFor each gene_id
, determine the locus length and the number of peaks.
num_peaks_per_gene(assigned_peaks, locusdef, mappa = NULL)
assigned_peaks |
A |
locusdef |
A locus definition object from |
mappa |
A mappability object from |
Typically, this function will not be used alone, but inside chipenrich()
.
A data.frame
with columns gene_id, length, log10_length, num_peaks, peak
. The result is used directly in the gene set enrichment tests in chipenrich()
.
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_peaks( peaks = peaks, locusdef = locusdef.hg19.nearest_tss, tss = tss.hg19) ppg = num_peaks_per_gene( assigned_peaks = assigned_peaks, locusdef = locusdef.hg19.nearest_tss, mappa = NULL)