Bio-SeqAlignment-Examples-EnhancingEdlib

 view release on metacpan or  search on metacpan

scripts/plot_timings.R  view on Meta::CPAN

ggplot(dat, aes(
  x = Workers,
  y = Time,
  color = factor(Chunk_Size)
)) + geom_point(size = 0.5) +
  geom_line(linewidth = 0.4) +
  scale_y_continuous(trans = 'log2', breaks = c(8, 16, 32, 64, 128, 256))  + theme_bw() + theme(
    panel.grid.minor = element_blank(),
    panel.grid.major = element_blank(),
    axis.text.x = element_text(size = 8),
    legend.position="bottom"
  ) + scale_color_viridis_d(name = "Chunk Size") +
  scale_x_continuous(
    trans = 'log2',
    breaks = c(1, 2, 4, 8, 12, 18, 27, 36, 45, 54, 63, 72)
  )  +
  geom_vline(
    xintercept = c(18, 36, 54, 72),
    linetype = "dashed",
    color = "gray40"
  ) +

scripts/plot_timings.R  view on Meta::CPAN

    color = "black",
    linewidth = 0.4
  ) +
  geom_ribbon(data = datOMPCME,
              aes(x = TotWorkers, ymin = prmin2, ymax = prmax2),
              alpha = 0.2) +
  theme_bw() + theme(
    panel.grid.minor = element_blank(),
    panel.grid.major = element_blank(),
    axis.text.x = element_text(size = 8),
    legend.position="bottom"
  ) + 
  scale_y_continuous(trans = 'log2', breaks = c(8, 16, 32, 64, 128, 256)) +
  scale_x_continuous(
    trans = 'log2',
    breaks = c(1, 2, 4, 8, 12, 18, 27, 36, 45, 54, 63, 72)
  )  +
  geom_vline(
    xintercept = c(18, 36, 54, 72),
    linetype = "dashed",
    color = "gray40"

scripts/plot_timings.R  view on Meta::CPAN

    color = "black",
    linewidth = 0.4
  ) +
  geom_ribbon(data = datOMPCME,
              aes(x = TotWorkers, ymin = prmin3, ymax = prmax3),
              alpha = 0.2) +
  theme_bw() + theme(
    panel.grid.minor = element_blank(),
    panel.grid.major = element_blank(),
    axis.text.x = element_text(size = 8),
    legend.position="bottom"
  ) + 
  scale_y_continuous(trans = 'log2',breaks =2^(4:9)) +
  geom_segment(
    x = log2(36),
    xend = log2(72),
    y = log2(32),
    yend = log2(32),
    color = "gray80",
    arrow = arrow(
      type = "open",

scripts/plot_timings.R  view on Meta::CPAN




## three dimensional plots as contourplots

ggplot(datOpenMP, aes(x = Workers, y = Num_threads, z = fitTime)) +
  geom_contour(aes(colour = after_stat(level))) +theme_bw() + theme(
    panel.grid.minor = element_blank(),
    panel.grid.major = element_blank(),
    axis.text.x = element_text(size = 8),
    legend.position="bottom"
  ) + 
  scale_color_viridis(discrete=FALSE,name="Time (log2 sec)") +
  geom_point(data=minTime,aes(x=Workers,y=Num_threads),color="black",shape="+")+
  scale_y_continuous(trans = 'log2', breaks = c(1, 2, 4, 8, 18, 36,72)) +
  scale_x_continuous(trans = 'log2', breaks = c(1, 2, 4, 8, 18, 36,72)) +
  xlab("Number of Workers") + ylab("Number of Threads")

ggsave(
  "timings_MCE_with_OMP.png",
  width = 6,
  height = 6.5,
  units = "in",
  dpi = 1200
)

ggplot(datOpenMP, aes(x = Workers, y = Num_threads, z = fitSpaceTime)) +
  geom_contour(aes(colour = after_stat(level))) +theme_bw() + theme(
    panel.grid.minor = element_blank(),
    panel.grid.major = element_blank(),
    axis.text.x = element_text(size = 8),
    legend.position="bottom"
  ) + 
  scale_color_viridis(discrete=FALSE,name="Resource Use ( cp x s)") +
  geom_point(data=minSpaceTime,aes(x=Workers,y=Num_threads),color="black",shape="+")+
  scale_y_continuous(trans = 'log2', breaks = c(1, 2, 4, 8, 18, 36,72)) +
  scale_x_continuous(trans = 'log2', breaks = c(1, 2, 4, 8, 18, 36,72)) +
  xlab("Number of Workers") + ylab("Number of Threads")
ggsave(
  "spacetime_MCE_with_OMP.png",
  width = 6,
  height = 6.5,



( run in 1.225 second using v1.01-cache-2.11-cpan-49f99fa48dc )