Chapter 6 Exponential regulator
For this work we used a simple exponential function to apply regulatory modifiers to tag-match scores (see details in paper).
6.1 Analysis Dependencies
Load all required R libraries.
These analyses were conducted in the following computing environment:
## _
## platform x86_64-pc-linux-gnu
## arch x86_64
## os linux-gnu
## system x86_64, linux-gnu
## status
## major 4
## minor 0.4
## year 2021
## month 02
## day 15
## svn rev 80002
## language R
## version.string R version 4.0.4 (2021-02-15)
## nickname Lost Library Book
Configuration:
6.2 Regulator modifier equation
Below is the function we use to apply regulation to module match scores.
6.3 Regulator behavior
Generate data to graph. We want to visualize regulated match scores as a function of raw tag match scores and module regulatory modifiers.
# generate data to visualize
data <- expand_grid(
raw_match=seq(0, 1.0, 0.01),
reg_modifier=seq(-10, 10, 0.1)
)
data <- as.data.frame(data)
data$regulated_match <- mapply(
exp_regulator,
data$raw_match,
data$reg_modifier,
exp_base
)
data$above_perfect <- data$regulated_match > 1.0
We expect that 90% of random pairs of tags fall between the two vertical dashed lines.
lower_5 <- 0.0579369
upper_5 <- 0.942063
ggplot(data, aes(y=reg_modifier, x=raw_match, fill=regulated_match)) +
geom_raster() +
geom_hline(yintercept=0, size=1, color="black") +
geom_vline(xintercept=lower_5, size=1, color="black", linetype="dashed") +
geom_vline(xintercept=upper_5, size=1, color="black", linetype="dashed") +
scale_x_continuous(name="Raw tag-match score") +
scale_y_continuous(name="Module regulation modifier") +
scale_fill_distiller(
name="Regulated match: ",
palette = "Spectral"
) +
theme(
legend.position = "top",
legend.key.width=unit(1.5, 'cm')
) +
ggsave(
paste0(output_directory, "exp-reg-match.png"),
width=6,
height=6
)
Does a given raw match + regulatory modifier beat a perfect match (with no regulation)?