<jupyter_start><jupyter_text>Parameter ranges<jupyter_code>ggplot(results, aes(x=cov, y=var)) +
    geom_point() +
    scale_x_log10() +
    scale_y_log10() +
    theme_bw()
ggplot(results, aes(x=cov, y=var, color=metric, shape=metric)) +
    geom_point(position = position_dodge(width=0.15), size=2) +
    scale_x_log10() +
    scale_y_log10() +
    theme_bw()<jupyter_output><empty_output><jupyter_text>PIPerformance across $\pi$ at both 8x and 32x<jupyter_code>dat = results %>%
        filter(cov==32 | cov==8) %>%
        select(rho, metric, var, cov, seed) 
dat$metric = factor(dat$metric, labels=c("IP", "Mash (without EC)", "Mash (with EC)", "WIP"))

dat$cov.f = as.factor(dat$cov)
dat$var.f = as.factor(dat$var)
dat$seed = as.factor(dat$seed)
str(dat)
p = ggplot(dat, aes(x=var.f, y=rho, fill=metric)) +
    geom_boxplot(aes(fill=metric)) +
    xlab(expression(paste('Mean pairwise nucleotide divergence (', pi, ')'))) +
    ylab(expression(paste("Spearman's ", rho, " +- SD"))) +
    facet_wrap(~cov.f ) + 
    ylim(0, 1) +
    theme_classic() + 
    theme(axis.text.x=element_text(angle = 45, hjust = 1, vjust=1),
          legend.position = "bottom")

pdf("plots/pi_both_box.pdf", width=8, height = 4)
print(p)
dev.off()
print(p)
dat = dat %>%
        filter(cov==8)

p = ggplot(dat, aes(x=var.f, y=rho, fill=metric)) +
    geom_boxplot(aes(fill=metric)) +
    xlab(expression(paste('Mean pairwise nucleotide divergence (', pi, ')'))) +
    ylab(expression(paste("Spearman's ", rho, " +- SD"))) +
    ylim(0, 1) +
    theme_classic() + 
    theme(axis.text.x=element_text(angle = 45, hjust = 1, vjust=1))

pdf("plots/pi_8x_box.pdf", width=4, height = 3)
print(p)
dev.off()
print(p)<jupyter_output><empty_output><jupyter_text>Coverage<jupyter_code>dat = results %>%
        filter(var==0.01 | var==0.005 | var==0.002) %>%
        select(rho, metric, cov, var, seed)

dat$metric = factor(dat$metric, labels=c("IP", "Mash (without EC)", "Mash (with EC)", "WIP"))
dat$cov.f = as.factor(dat$cov)
dat$var.f = as.factor(dat$var)

p = ggplot(dat, aes(x=cov.f, y=rho, fill=metric)) +
    geom_boxplot(aes(fill=metric)) +
    scale_fill_discrete(guide = guide_legend(title = "Metric")) +
    xlab(expression(paste('Mean sequencing depth'))) +
    ylab(expression(paste("Spearman's ", rho, " +- SD"))) +
    facet_wrap(~var.f ) + 
    ylim(0, 1) +
    theme_classic() +
    theme(legend.position = "bottom")
print(p)
pdf("plots/cov_all_box.pdf", width=12, height = 4)
print(p)
dev.off()
dat = dat %>%
        filter(var==0.005)

p = ggplot(dat, aes(x=cov.f, y=rho, fill=metric)) +
    geom_boxplot(aes(fill=metric)) +
    scale_fill_discrete(guide = guide_legend(title = "Metric")) +
    xlab(expression(paste('Mean sequencing depth'))) +
    ylab(expression(paste("Spearman's ", rho, " +- SD"))) +
    ylim(0, 1) +
    theme_classic() + 
    theme(axis.text.x=element_text(angle = 45, hjust = 1, vjust=1)) +
    theme(legend.position = "bottom")
print(p)
pdf("plots/cov_200_box.pdf", width=8, height = 3)
print(p)
dev.off()
dat.summ = results %>%
        filter(var==0.005) %>%
        select(rho, metric, cov, seed) %>%
        group_by(cov, metric) %>%
        summarise(rho_av=mean(rho), rho_err=sd(rho))
dat.summ$metric = factor(dat.summ$metric, labels=c("IP", "Mash (without EC)", "Mash (with EC)", "WIP"))

p = ggplot(dat.summ, aes(x=cov, y=rho_av)) +
    geom_line(aes(linetype=metric)) +
    geom_ribbon(aes(fill=metric, ymin=rho_av-rho_err, ymax=rho_av+rho_err), alpha=0.2) +
    scale_x_log10() +
    xlab(expression(paste('Mean sequencing depth'))) +
    ylab(expression(paste("Spearman's ", rho, " +- SD"))) +
    ylim(0, 1) +
    theme_bw()

print(p)
pdf("plots/coverage.pdf", width=4, height = 3)
print(p)
dev.off()
str(dat)
ggplot(dat, aes(x=cov, y=rho, colour=as.factor(seed), linetype=metric)) +
    geom_line() +
    scale_x_log10()<jupyter_output><empty_output><jupyter_text>$\pi$ vs performance<jupyter_code>summ = results %>%
        filter(cov==8, metric!="mashec") %>%
        select(metric, rho, var, seed) %>%
        group_by(var, metric) %>%
        summarise(rho_av=mean(rho), rho_sd=sd(rho))
summ$metric = factor(as.character(summ$metric), levels="IP", "Mash", "WIP")

p = ggplot(summ, aes(x=var, y=rho_av, ymin=rho_av-rho_sd, ymax=rho_av+rho_sd, group=metric)) +
    geom_line(aes(linetype=metric)) +
    geom_ribbon(aes(fill=metric), alpha=0.2) +
    xlab(expression(paste('Mean pairwise variation (', pi, ')'))) +
    ylab(expression(paste("Spearman's ", rho, " +- SD"))) +
    scale_x_log10()+
    theme_bw()

print(p)
pdf("plots/pi.pdf", width=5, height = 4)
print(p)
dev.off()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1970708593581736, 'fraction_numerical': 0.018953262976523798, 'mean_word_length': 4.476415094339623, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '558557', 'license': 'MIT', 'n_tokens_mistral': 2005, 'n_tokens_neox': 1877, 'n_words': 300, 'path': 'writeups/reviews/2017-01-23.ipynb', 'repo_name': 'kdmurray91/kwip-experiments', 'size': '4643'}