summarize_annotations | R Documentation |
Given a GRanges
of annotated regions, count the number of regions in each annotation type. If annotated_random
is not NULL
, then the same is computed for the random regions.
summarize_annotations(annotated_regions, annotated_random, quiet = FALSE)
annotated_regions |
The |
annotated_random |
The |
quiet |
Print progress messages (FALSE) or not (TRUE). |
If a region is annotated to multiple annotations of the same annot.type
, the region will only be counted once. For example, if a region were annotated to multiple exons, it would only count once toward the exons, but if it were annotated to an exon and an intron, it would count towards both.
A tbl_df
of the number of regions per annotation type.
### An example of ChIP-seq peaks with signalValue
# Get premade CpG annotations
data('annotations', package = 'annotatr')
file = system.file('extdata', 'Gm12878_Stat3_chr2.bed.gz', package = 'annotatr')
r = read_regions(con = file, genome = 'hg19')
a = annotate_regions(
regions = r,
annotations = annotations,
ignore.strand = TRUE,
quiet = FALSE)
rnd = randomize_regions(regions = r)
rnd_annots = annotate_regions(
regions = rnd,
annotations = annotations,
ignore.strand = TRUE,
quiet = FALSE)
# Summarize the annotated regions without randomized regions
s = summarize_annotations(annotated_regions = a)
# Summarize the annotated regions with randomized regions
s_rnd = summarize_annotations(
annotated_regions = a,
annotated_random = rnd_annots)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.