Plot motif-enrichment for individual experiments
Source:R/plot_enrichment_individual.R
plot_enrichment_individual.RdVisualises the result from get_df_enrichment for a single motif
by producing a plotly bar plot with the motif enrichment comparisons
for one comparison dataset pair.
Usage
plot_enrichment_individual(
result,
enrichment_df,
comparison_i,
motif_i,
label_colours,
reference_index = 1,
html_tags = TRUE
)Arguments
- result
A
listwith the following elements:- peaks
A
listof peak files generated usingread_peak_file.- alignments
A
listof alignment files.- exp_type
A
charactervector of experiment types.- exp_labels
A
charactervector of experiment labels.- read_count
A
numericvector of read counts.- peak_count
A
numericvector of peak counts.
- enrichment_df
A data frame containing the motif enrichment results, produced using
get_df_enrichment.- comparison_i
The index of the comparison dataset to plot.
- motif_i
The index of the motif to plot.
- label_colours
A vector with colours (valid names or hex codes) to use for "No" and "Yes" bar segments.
- reference_index
An integer specifying the index of the peak file to use as the reference dataset for comparison. Indexing starts from 1. (default = 1)
Logical. If TRUE, returns the plot as a
tagListobject.
Value
A plotly object with the peak motif enrichment data. If
html_tags is TRUE, the function returns a tagList object
instead.
See also
Other plot functions:
plot_enrichment_overall(),
plot_motif_comparison()