Description Usage Arguments Details Value See Also Examples
View source: R/data_conditionals.R
This function allows filtering, ordering, quantiling, and grouping of data for plotting.
1 2 3 4 5 6 | conditionals(
data_filters = NULL,
data_ordering = ordering(),
data_quantiling = quantiling(),
data_grouping = NULL
)
|
data_filters |
Logical statements by which to filter data. |
data_ordering |
Order object with order settings. See ?ordering for more information. |
data_quantiling |
Quantile object with quantile settings. See ?quantiling for more information. |
data_grouping |
If quantiles not set, split data by the specified categorical variable. |
It may be desirable to analyze certain subsets of TSSs or TSRs, or split the data based on various categorical variables. This function extends the flexibility of various other functions by adding the ability to filter, quantile, order, and/or group data prior to downstream analysis.
'data_filters' takes logical statements to filter TSSs or TSRs by any column stored in the data. 'data_ordering' takes an 'ordering' object as input, which allows ordering of data by one or more columns. 'data_quantiling' takes a 'quantiling' object as input, and will split plots by the given number of quantiles. 'data_grouping' will split a plot by the given column if quantiling is not set.
'data_conditions' object for input to the corresponding 'data_conditions' argument in select functions.
ordering
for ordering information.
quantiling
for quantiling information.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | data(TSSs)
assembly <- system.file("extdata", "S288C_Assembly.fasta", package="TSRexploreR")
exp <- TSSs[1] %>%
tsr_explorer(genome_assembly=assembly) %>%
format_counts(data_type="tss") %>%
tss_clustering(threshold=3) %>%
associate_with_tsr %>%
tsr_metrics
# Sequence logo of TSSs from peaked TSRs
conditions <- conditionals(shape_class == "peaked")
p <- plot_sequence_logo(exp, data_conditions=conditions)
# Sequence color map sorted by descending TSS score
conditions <- conditionals(data_ordering=ordering(desc(score)))
p <- plot_sequence_colormap(exp, data_conditions=conditions)
# Sequence logos split by TSS score quantile
conditions <- conditionals(data_quantiling=quantiling(score, n=5))
p <- plot_sequence_logo(exp, data_conditions=conditions)
# Sequence logo split by TSR shape class
conditions <- conditionals(data_grouping=shape_class)
p <- plot_sequence_logo(exp, data_conditions=conditions)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.