quantiling.Rd
This is a companion function to 'conditionals' that allows the specification of a variable by which to split the data into quantiles before plotting.
quantiling( by = NULL, n = NULL, samples = NULL, descending = TRUE, aggr_fun = mean )
by | Continuous metric for calculating quantiles. |
---|---|
n | Number of quantiles to calculate. |
samples | Samples to use when setting quantiles. |
descending | Order quantiles in descending order. |
aggr_fun | Function by which to aggregate scores if more than one sample selected. |
A list of quantiling parameters to be passed to the 'data_quantiling' argument of 'conditionals'.
Column to order by should be specified by names/symbol and not character. By default ,quantiling is calculated based on the aggregate value (based on 'aggr_fun') of the variable across all samples. If 'samples' is specified, only the given samples will be used for aggregate calculation and ordering. 'descending' controls whether quantiling is calculated in descending (TRUE) or ascending (FALSE) order, and 'n' allows specification of number of quantiles.
conditionals
For more information on advanced data conditions.
# \donttest{ data(TSSs) assembly <- system.file("extdata", "S288C_Assembly.fasta", package="TSRexploreR") exp <- TSSs[1] %>% tsr_explorer(genome_assembly=assembly) %>% format_counts(data_type="tss") # Sequence base color plot quantiled by score. conditions <- conditionals(data_quantiling=quantiling(score, n=5)) p <- plot_sequence_colormap(exp, data_conditions=conditions)#> Warning: Arguments in '...' ignored# }