GenerTeam's picture
Upload index.html
1d97dbf verified
Raw
History Blame Contribute Delete
120 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Perturbation Impact on HBB Gene Scores</title>
<meta name="color-scheme" content="light">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap">
<style>
:root {
--bg: #f7f5ee;
--ink: #1f1f1d;
--ink-soft: #5b5b56;
--ink-faint: #8a8a83;
--rule: #e3e1d6;
--hair: #eee;
--green: #317f3f;
--green-dark: #1f5024;
--green-tint: #f4f8f4;
--amber: #b8862c;
--amber-dark: #6b4d18;
--red: #b00020;
--blue: #2c5aa0;
--card: #fff;
--soft-cream: #fafaf6;
--base-a: #1A7A40;
--base-t: #b00020;
--base-c: #2c5aa0;
--base-g: #b8862c;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
font-family: "Inter", "Helvetica Neue", sans-serif;
font-size: 14px; font-weight: 300; line-height: 1.7;
color: var(--ink);
background: var(--bg);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
/* --- Page header ----------------------------------------------------- */
.page-header {
border-bottom: 1px solid var(--rule);
background: var(--bg);
position: sticky; top: 0; z-index: 50;
backdrop-filter: saturate(180%) blur(6px);
}
.page-header__inner {
max-width: 1200px;
margin: 0 auto;
padding: 14px 32px;
display: flex; align-items: baseline; gap: 16px;
}
.wordmark {
font-family: "JetBrains Mono", monospace;
font-weight: 700;
font-size: 16px;
letter-spacing: 1px;
}
.wordmark .caret { color: var(--green); margin-right: 4px; }
.wordmark__sub {
font-family: "JetBrains Mono", monospace;
font-size: 11px; font-weight: 500;
text-transform: uppercase; letter-spacing: 2px;
color: var(--ink-soft);
margin-left: 4px;
}
.page-header__spacer { flex: 1; }
.page-header__crumbs {
font-family: "JetBrains Mono", monospace;
font-size: 10px; letter-spacing: 1.4px;
text-transform: uppercase; color: var(--ink-faint);
}
.page-header__crumbs a { color: var(--ink-soft); text-decoration: none; }
.page-header__crumbs a:hover { color: var(--green); }
/* --- Lede ----------------------------------------------------------- */
.tab-lede {
max-width: 1200px; margin: 56px auto 0;
padding: 0 32px;
}
.tab-lede__rail {
border-left: 3px solid var(--green);
padding: 4px 0 4px 22px;
max-width: 820px;
}
.tab-lede__eyebrow {
display: block;
font-family: "JetBrains Mono", monospace;
font-size: 11px; font-weight: 500;
letter-spacing: 0.22em; text-transform: uppercase;
color: var(--green); margin-bottom: 12px;
}
.tab-lede__title {
margin: 0 0 22px;
font-family: "JetBrains Mono", monospace;
font-size: 34px; font-weight: 500;
letter-spacing: -0.01em; line-height: 1.12;
color: var(--ink);
}
.tab-lede__lead {
margin: 0; max-width: 760px;
font-family: "Inter", sans-serif;
font-size: 19px; font-weight: 300; line-height: 1.5;
letter-spacing: -0.005em; color: #2d2d2a;
}
/* --- Post body ------------------------------------------------------ */
.post {
max-width: 760px;
margin: 32px auto 0;
padding: 0 32px 96px;
}
.post h2 {
margin: 64px 0 18px;
font-family: "JetBrains Mono", monospace;
font-size: 22px; font-weight: 500;
letter-spacing: -0.005em; line-height: 1.3;
color: var(--ink);
padding-top: 12px;
border-top: 1px solid var(--rule);
}
.post h2:first-child { border-top: none; padding-top: 0; }
.post h3 {
margin: 40px 0 12px;
font-family: "JetBrains Mono", monospace;
font-size: 15px; font-weight: 500;
letter-spacing: 0;
color: var(--ink);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.post p { margin: 0 0 14px; }
.post p > code, .post li > code {
font-family: "JetBrains Mono", monospace;
font-size: 0.86em;
background: var(--soft-cream);
border: 1px solid var(--rule);
padding: 1px 5px;
border-radius: 2px;
color: var(--green-dark);
}
.post pre {
margin: 14px 0 18px;
padding: 14px 16px;
background: var(--card);
border: 1px solid #ddd;
overflow-x: auto;
}
.post pre code {
font-family: "JetBrains Mono", monospace;
font-size: 12px; line-height: 1.6;
color: var(--ink);
background: transparent; border: none; padding: 0;
}
.post a {
color: var(--green-dark);
text-decoration: underline;
text-decoration-thickness: 1px;
text-underline-offset: 2px;
}
.post a:hover { color: var(--green); }
.post strong { font-weight: 600; color: var(--ink); }
.post-image {
margin: 24px 0;
}
.post-image img {
display: block;
width: 100%; height: auto;
border: 1px solid var(--rule);
}
/* --- Widget shell (carbon-demo style) ------------------------------- */
.widget {
max-width: 920px;
margin: 40px auto 8px;
}
.widget__head {
display: flex; align-items: baseline; gap: 14px;
margin-bottom: 6px;
}
.widget__eyebrow {
font-family: "JetBrains Mono", monospace;
font-size: 10px; font-weight: 500;
letter-spacing: 0.22em; text-transform: uppercase;
color: var(--green);
}
.widget__title {
font-family: "JetBrains Mono", monospace;
font-size: 14px; font-weight: 500;
color: var(--ink); letter-spacing: 0;
}
.widget__caption {
font-family: "Inter", sans-serif;
font-size: 12px; color: var(--ink-soft);
margin: 8px 4px 14px;
line-height: 1.5;
}
.demo {
background: var(--card); border: 1px solid #ddd;
padding: 22px; margin: 8px 0;
}
.demo-toolbar {
display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
margin-bottom: 14px;
font-family: "JetBrains Mono", monospace; font-size: 10px;
color: #666; text-transform: uppercase; letter-spacing: 1.4px;
}
.demo-toolbar .spacer { flex: 1; }
.demo-label {
font-family: "JetBrains Mono", monospace;
font-size: 9.5px; color: #6b7a6e;
text-transform: uppercase; letter-spacing: 1.6px;
margin: 6px 0 6px;
}
.pill, button.action {
font-family: "JetBrains Mono", monospace;
font-size: 11px; font-weight: 400;
padding: 5px 11px; border: 1px solid #ccc; border-radius: 3px;
background: #fff; color: #555; cursor: pointer;
text-transform: uppercase; letter-spacing: 1.5px;
transition: all 0.12s;
}
.pill:hover, button.action:hover { border-color: #888; color: var(--ink); }
.pill.active, button.action.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill.active:hover, button.action.primary:hover { background: #000; }
.pill.gh { background: var(--green); color: #fff; border-color: var(--green); }
.pill.gh:hover { background: var(--green-dark); border-color: var(--green-dark); }
.pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.status {
font-family: "JetBrains Mono", monospace;
font-size: 10px; color: #666;
text-transform: uppercase; letter-spacing: 1.5px;
display: inline-flex; align-items: center; gap: 6px;
margin-left: 8px;
}
.status .dot {
display: inline-block; width: 6px; height: 6px; border-radius: 50%;
background: var(--green);
}
input.seq-input, textarea.seq-input {
width: 100%;
font-family: "JetBrains Mono", monospace;
font-size: 13px;
padding: 9px 12px;
border: 1px solid #ccc;
border-radius: 3px;
letter-spacing: 1px;
text-transform: uppercase;
color: var(--ink);
background: var(--soft-cream);
resize: vertical;
}
textarea.seq-input { letter-spacing: 0.5px; }
input.seq-input:focus, textarea.seq-input:focus {
outline: none;
border-color: var(--green);
background: #fff;
}
/* base + token chips */
.base, .tok {
font-family: "JetBrains Mono", monospace;
font-size: 11px;
letter-spacing: 0.5px;
}
.base {
display: inline-block;
padding: 2px 5px;
font-weight: 500;
margin: 1px;
color: #fff;
border-radius: 2px;
min-width: 16px;
text-align: center;
}
.base.A { background: var(--base-a); }
.base.T { background: var(--base-t); }
.base.C { background: var(--base-c); }
.base.G { background: var(--base-g); }
.base.dim { opacity: 0.4; }
.base.outline {
background: transparent;
border: 1px solid currentColor;
}
.base.outline.A { color: var(--base-a); }
.base.outline.T { color: var(--base-t); }
.base.outline.C { color: var(--base-c); }
.base.outline.G { color: var(--base-g); }
.tok {
display: inline-flex;
align-items: center;
padding: 4px 8px;
margin: 2px;
border: 1px solid #ccc;
border-radius: 3px;
background: #fff;
color: var(--ink);
}
.tok.kmer {
background: rgba(49,127,63,0.10);
border-color: rgba(49,127,63,0.5);
color: var(--green-dark);
font-weight: 500;
}
.tok.bpe {
background: rgba(184,134,44,0.10);
border-color: rgba(184,134,44,0.5);
color: var(--amber-dark);
}
.tok.text {
background: #fff;
border-color: #ccc;
color: var(--ink);
}
.tok.boundary {
background: var(--ink);
color: #fff;
border-color: var(--ink);
text-transform: uppercase;
letter-spacing: 1px;
font-size: 10px;
}
.tok.dim { color: #888; background: var(--soft-cream); }
.tok.ok { background: var(--green); color: #fff; border-color: var(--green); }
.tok.bad { color: var(--red); border-color: rgba(176,0,32,0.4); background: rgba(176,0,32,0.05); }
.tok.selected {
outline: 2px solid var(--green);
outline-offset: 1px;
}
.token-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
/* count badges */
.count-badge {
display: inline-block;
font-family: "JetBrains Mono", monospace;
font-size: 10px; font-weight: 600;
background: var(--ink); color: var(--bg);
padding: 2px 7px; border-radius: 2px;
letter-spacing: 1px;
}
.count-badge.green { background: var(--green); color: #fff; }
.count-badge.amber { background: var(--amber); color: #fff; }
/* W1 · animated tokenization (source on top, schemes drop down) ------ */
.tk-anim { margin-top: 18px; }
.tk-source, .tk-scheme {
display: grid;
grid-template-columns: 124px 1fr;
gap: 18px;
align-items: start;
padding: 8px 0;
}
.tk-scheme { padding: 10px 0; min-height: 32px; }
.tk-source { padding-bottom: 14px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.tk-meta {
display: flex;
flex-direction: column;
gap: 3px;
padding-top: 2px;
}
.tk-label {
font-family: "JetBrains Mono", monospace;
font-size: 9.5px;
font-weight: 500;
color: var(--ink-soft);
text-transform: uppercase;
letter-spacing: 1.6px;
}
.tk-stat {
font-family: "JetBrains Mono", monospace;
font-size: 10px;
color: var(--ink-faint);
letter-spacing: 0.5px;
font-variant-numeric: tabular-nums;
}
.tk-stat .n {
font-weight: 600;
color: var(--ink);
}
.tk-scheme[data-scheme="bpe"] .tk-stat .n { color: var(--amber-dark); }
.tk-scheme[data-scheme="kmer"] .tk-stat .n { color: var(--green-dark); }
/* Source: tight grid of small chips */
.tk-source-strip {
display: flex;
flex-wrap: wrap;
row-gap: 2px;
}
.tk-source-strip .tk-base {
display: inline-flex;
align-items: center;
justify-content: center;
width: 13px;
height: 17px;
color: #fff;
font-family: "JetBrains Mono", monospace;
font-size: 10px;
font-weight: 500;
border-radius: 1px;
flex: 0 0 13px;
transition: opacity 0.35s ease, filter 0.35s ease;
}
.tk-source-strip .tk-base + .tk-base { margin-left: 1px; }
.tk-source-strip .tk-base.consumed { opacity: 0.18; filter: grayscale(0.6); }
.tk-base.A { background: var(--base-a); }
.tk-base.T { background: var(--base-t); }
.tk-base.C { background: var(--base-c); }
.tk-base.G { background: var(--base-g); }
/* Scheme strips: hold dropped tokens with <> brackets */
.tk-scheme-strip {
display: flex;
flex-wrap: wrap;
gap: 1px 8px;
min-height: 20px;
}
.tk-token {
font-family: "JetBrains Mono", monospace;
font-size: 12px;
font-weight: 500;
letter-spacing: 0.5px;
display: inline-flex;
align-items: center;
opacity: 0;
will-change: transform, opacity;
}
.tk-token.dropped {
opacity: 1;
transition:
transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
opacity 0.32s ease;
}
.tk-token .br { color: var(--ink-faint); font-weight: 400; }
.tk-token.tail .br { color: var(--ink-faint); }
.tk-token.tail { opacity: 0.55; }
.tk-token.tail.dropped { opacity: 0.55; }
/* Layouts */
.grid-3 {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 14px;
margin-top: 14px;
}
.grid-2 {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14px;
margin-top: 14px;
}
@media (max-width: 720px) {
.grid-3, .grid-2 { grid-template-columns: 1fr; }
}
.col-card {
background: var(--soft-cream);
border: 1px solid var(--rule);
padding: 14px;
}
.col-card .col-title {
font-family: "JetBrains Mono", monospace;
font-size: 10px; font-weight: 500;
letter-spacing: 1.6px; text-transform: uppercase;
color: var(--ink-soft);
margin-bottom: 8px;
}
.col-card .col-foot {
margin-top: 10px;
display: flex; align-items: center; gap: 8px;
font-family: "JetBrains Mono", monospace;
font-size: 10px; color: var(--ink-soft);
text-transform: uppercase; letter-spacing: 1.4px;
}
/* Bar chart helpers */
.bar-row {
display: grid;
grid-template-columns: 18px 1fr 64px;
align-items: center;
gap: 8px;
margin: 3px 0;
font-family: "JetBrains Mono", monospace;
font-size: 11px;
}
.bar-row .bar-label { color: var(--ink-soft); font-weight: 500; text-align: center; }
.bar-row .bar-track {
position: relative;
height: 14px;
background: var(--soft-cream);
border: 1px solid var(--rule);
}
.bar-row .bar-fill {
height: 100%;
transition: width 220ms ease, background-color 220ms ease;
}
.bar-row .bar-val { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.bar-row.highlight .bar-track { box-shadow: 0 0 0 2px var(--green-tint); }
/* 6-position grid (used in W4, W5, W6) */
.posgrid {
display: grid;
grid-template-columns: repeat(6, 1fr);
gap: 8px;
}
.posgrid__col {
background: var(--soft-cream);
border: 1px solid var(--rule);
border-radius: 2px;
padding: 8px 6px 6px;
}
.posgrid__pos {
font-family: "JetBrains Mono", monospace;
font-size: 9px; color: var(--ink-faint);
text-transform: uppercase; letter-spacing: 1.4px;
text-align: center; margin-bottom: 6px;
}
.posgrid__bars {
display: flex; flex-direction: column; gap: 3px;
}
.posgrid .mini-row {
display: grid; grid-template-columns: 12px 1fr 32px;
align-items: center; gap: 4px;
font-family: "JetBrains Mono", monospace; font-size: 10px;
}
.posgrid .mini-row .ml { color: var(--ink-soft); text-align: center; font-weight: 500; }
.posgrid .mini-row .mt { position: relative; height: 10px; background: #fff; border: 1px solid var(--rule); }
.posgrid .mini-row .mf { display: block; height: 100%; transition: width 200ms ease; }
.posgrid .mini-row .mv { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; font-size: 9.5px; }
.posgrid__col.argmax-A { box-shadow: inset 0 0 0 1px var(--base-a); }
.posgrid__col.argmax-T { box-shadow: inset 0 0 0 1px var(--base-t); }
.posgrid__col.argmax-C { box-shadow: inset 0 0 0 1px var(--base-c); }
.posgrid__col.argmax-G { box-shadow: inset 0 0 0 1px var(--base-g); }
.posgrid__col.locked { background: #fff; }
.posgrid__col.frozen .posgrid__bars { opacity: 0.4; }
.posgrid__sel { display: flex; gap: 3px; margin-top: 8px; }
.cond-pick {
flex: 1 1 0; min-width: 0;
font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 600;
padding: 3px 0; border: 1px solid var(--rule); border-radius: 2px;
background: #fff; cursor: pointer;
transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.cond-pick:hover { border-color: #888; }
.cond-pick.active { color: #fff; }
.cond-pick.active.b-A { background: var(--base-a); border-color: var(--base-a); }
.cond-pick.active.b-T { background: var(--base-t); border-color: var(--base-t); }
.cond-pick.active.b-C { background: var(--base-c); border-color: var(--base-c); }
.cond-pick.active.b-G { background: var(--base-g); border-color: var(--base-g); }
/* W3 · real Carbon-3B per-token scoring --------------------------- */
.w3-itok { cursor: pointer; transition: outline-color 0.12s; }
.w3-itok:hover { border-color: #888; }
.w3-sub {
font-family: "JetBrains Mono", monospace;
font-size: 11px; color: var(--ink-soft);
margin: 2px 0 10px; line-height: 1.7;
}
.w3-sub b { color: var(--ink); font-weight: 600; }
.w3-sub .tok { margin: 0 2px; }
.w3-toprow {
display: grid;
grid-template-columns: 92px 1fr 52px;
gap: 12px; align-items: center;
margin: 4px 0;
font-family: "JetBrains Mono", monospace; font-size: 11px;
}
.w3-toprow .km { font-weight: 500; letter-spacing: 0.5px; }
.w3-toprow .bar { height: 13px; background: var(--soft-cream); border: 1px solid var(--rule); }
.w3-toprow .fill { height: 100%; background: var(--green); transition: width 0.35s ease; }
.w3-toprow .pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.w3-toprow.observed .km { color: var(--ink); }
.w3-toprow.observed .fill { background: var(--amber); }
.w3-io { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.w3-io__group { display: flex; flex-direction: column; gap: 6px; }
.w3-io__lab {
font-family: "JetBrains Mono", monospace;
font-size: 9.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-faint);
}
.w3-io__arrow { font-family: "JetBrains Mono", monospace; font-size: 16px; color: var(--ink-faint); padding-bottom: 5px; }
.w3-gt-tok { background: rgba(184,134,44,0.12); border-color: rgba(184,134,44,0.5) !important; }
.w3-gt-tok { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.w3-chart { display: block; width: 100%; height: auto; margin-top: 6px; background: #fff; border: 1px solid #eee; }
.w3-legend {
display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px;
font-family: "JetBrains Mono", monospace; font-size: 10px;
color: var(--ink-soft); text-transform: uppercase; letter-spacing: 1px;
}
.w3-legend span { display: inline-flex; align-items: center; gap: 6px; }
.w3-legend svg { width: 20px; height: 8px; display: inline-block; vertical-align: middle; }
.w3-top { display: flex; gap: 6px; margin-top: 12px; }
.w3-topchip {
flex: 1 1 0; min-width: 0;
display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
font-family: "JetBrains Mono", monospace;
border: 1px solid var(--rule); background: var(--soft-cream);
border-radius: 3px; padding: 6px 4px;
}
.w3-topchip .km { font-size: 12px; font-weight: 500; letter-spacing: 0.5px; }
.w3-topchip.ground-truth .km { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.w3-topchip .pct { font-size: 9px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.posgrid__col.clickable { cursor: pointer; }
.posgrid__col.sel { outline: 2px solid var(--ink); outline-offset: 2px; }
.w3-allgrid {
display: grid;
grid-template-columns: repeat(128, 1fr);
gap: 1px;
margin-top: 8px;
}
.w3-cell { aspect-ratio: 1; background: #d3d0c4; transition: background 0.15s ease; }
.w3-cell.first {
outline: 2px solid var(--ink);
outline-offset: 1px;
position: relative; z-index: 2;
}
.w3-order {
display: inline-flex; align-items: center; gap: 8px;
font-family: "JetBrains Mono", monospace; font-size: 9.5px;
text-transform: uppercase; letter-spacing: 1.4px; color: var(--ink-faint);
}
.w3-snake { width: 42px; height: auto; color: var(--ink-soft); display: block; }
/* WCOND · conditional single-nucleotide decoding -------------------- */
.cond-slots { display: flex; gap: 6px; }
.cond-slot {
width: 40px; height: 40px;
display: flex; align-items: center; justify-content: center;
border: 1px solid var(--rule); border-radius: 3px; background: var(--soft-cream);
font-family: "JetBrains Mono", monospace; font-size: 17px; font-weight: 600;
color: var(--ink);
}
.cond-slot.active { outline: 2px solid var(--ink); outline-offset: 1px; color: var(--ink-faint); }
.cond-slot.pending { color: var(--ink-faint); background: transparent; border-style: dashed; }
.cond-slot.A { background: rgba(26,122,64,0.13); border-color: rgba(26,122,64,0.42); color: var(--base-a); }
.cond-slot.T { background: rgba(176,0,32,0.09); border-color: rgba(176,0,32,0.36); color: var(--base-t); }
.cond-slot.C { background: rgba(44,90,160,0.11); border-color: rgba(44,90,160,0.40); color: var(--base-c); }
.cond-slot.G { background: rgba(184,134,44,0.14); border-color: rgba(184,134,44,0.42); color: var(--amber-dark); }
.cond-choices { display: flex; gap: 10px; }
.cond-choice {
flex: 1 1 0; cursor: pointer; border: 1px solid var(--rule); border-radius: 3px;
padding: 10px 12px; background: var(--soft-cream);
display: flex; flex-direction: column; gap: 7px;
transition: background 0.12s, border-color 0.12s;
}
.cond-choice:hover { background: #fff; border-color: #888; }
.cond-choice__top { display: flex; justify-content: space-between; align-items: baseline; font-family: "JetBrains Mono", monospace; }
.cond-choice__base { font-size: 16px; font-weight: 600; }
.cond-choice__pct { font-size: 11px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.cond-choice__bar { height: 8px; background: #fff; border: 1px solid var(--rule); }
.cond-choice__fill { display: block; height: 100%; transition: width 0.25s ease; }
.cond-done { font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cond-note {
font-family: "Inter", sans-serif; font-size: 12px; color: var(--ink-soft);
background: var(--soft-cream); border-left: 2px solid var(--green);
padding: 9px 12px; margin-top: 14px; line-height: 1.5;
}
.cond-note .tok { margin: 0 2px; }
/* FNS factorization figure ------------------------------------------ */
.fns-seq-input {
width: 120px;
text-align: center;
text-transform: uppercase;
}
.fns-viz {
font-family: "JetBrains Mono", monospace;
padding: 10px 0 6px;
}
.fns-truth, .fns-row {
display: grid;
grid-template-columns: 222px repeat(6, 34px) 28px;
align-items: center;
column-gap: 7px;
min-width: 480px;
}
.fns-truth { margin-bottom: 16px; }
.fns-row { margin: 12px 0; }
.fns-gtlabel {
font-family: "JetBrains Mono", monospace;
font-size: 10px;
font-weight: 400;
letter-spacing: 1.6px;
text-transform: uppercase;
color: var(--ink-faint);
}
.fns-eq {
font-size: 16px;
color: var(--ink);
text-align: right;
white-space: nowrap;
}
.fns-eq sub, .fns-eq sup { font-size: 11px; }
.fns-eq .sum { color: var(--ink-soft); }
.fns-bracket {
font-family: "Inter", sans-serif;
font-size: 34px;
font-weight: 200;
line-height: 0;
color: var(--ink-soft);
vertical-align: middle;
transform: scaleX(0.7);
display: inline-block;
}
.fns-box {
width: 30px; height: 30px;
display: inline-flex; align-items: center; justify-content: center;
font-family: "JetBrains Mono", monospace;
font-size: 14px; font-weight: 600;
border-radius: 3px; border: 1px solid;
transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.fns-box.A { background: rgba(26,122,64,0.13); border-color: rgba(26,122,64,0.42); color: var(--base-a); }
.fns-box.T { background: rgba(176,0,32,0.09); border-color: rgba(176,0,32,0.36); color: var(--base-t); }
.fns-box.C { background: rgba(44,90,160,0.11); border-color: rgba(44,90,160,0.40); color: var(--base-c); }
.fns-box.G { background: rgba(184,134,44,0.14); border-color: rgba(184,134,44,0.42); color: var(--amber-dark); }
.fns-box.wild { opacity: 0.38; }
.fns-loss {
margin-top: 20px;
padding-top: 16px;
border-top: 1px solid var(--rule);
font-family: "JetBrains Mono", monospace;
font-size: 16px;
color: var(--ink);
text-align: center;
}
.fns-loss sup, .fns-loss sub { font-size: 11px; }
.fns-loss .frac { display: inline-block; margin: 0 1px; }
.fns-loss .fns-term { margin: 0 3px; white-space: nowrap; }
.fns-explain {
margin-top: 18px;
padding-top: 16px;
border-top: 1px solid var(--rule);
font-family: "Inter", sans-serif;
font-size: 13px;
line-height: 1.62;
color: var(--ink-soft);
}
.fns-explain p { margin: 0 0 11px; }
.fns-explain p:last-child { margin-bottom: 0; }
.fns-explain strong { color: var(--ink); font-weight: 600; }
.fns-explain .mono {
font-family: "JetBrains Mono", monospace;
font-size: 12px;
color: var(--ink);
}
.fns-explain .mono sup, .fns-explain .mono sub { font-size: 9px; }
/* Big stat tile */
.stat-tile {
background: var(--soft-cream);
border: 1px solid var(--rule);
padding: 14px 16px;
text-align: left;
}
.stat-tile__label {
font-family: "JetBrains Mono", monospace;
font-size: 10px; color: var(--ink-soft);
text-transform: uppercase; letter-spacing: 1.6px;
margin-bottom: 6px;
}
.stat-tile__value {
font-family: "JetBrains Mono", monospace;
font-size: 26px; font-weight: 500;
color: var(--ink);
}
.stat-tile__sub {
font-family: "JetBrains Mono", monospace;
font-size: 10px; color: var(--ink-soft);
margin-top: 4px; letter-spacing: 0.5px;
}
.stat-tile.green .stat-tile__value { color: var(--green-dark); }
.stat-tile.red .stat-tile__value { color: var(--red); }
/* Footer */
.post-foot {
max-width: 760px;
margin: 64px auto 0;
padding: 24px 32px 64px;
border-top: 1px solid var(--rule);
font-family: "JetBrains Mono", monospace;
font-size: 11px; color: var(--ink-soft);
text-transform: uppercase; letter-spacing: 1.4px;
}
.post-foot a { color: var(--green-dark); text-decoration: none; }
.post-foot a:hover { color: var(--green); }
/* Position picker (W7) */
.seq-track {
font-family: "JetBrains Mono", monospace;
font-size: 14px;
letter-spacing: 0;
background: var(--soft-cream);
border: 1px solid var(--rule);
padding: 10px 12px;
display: flex; flex-wrap: wrap; gap: 1px;
user-select: none;
}
.seq-track__b {
display: inline-flex; align-items: center; justify-content: center;
width: 22px; height: 26px;
cursor: pointer;
border-radius: 2px;
color: #fff;
font-weight: 500;
transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.seq-track__b:hover { transform: translateY(-1px); }
.seq-track__b.A { background: var(--base-a); }
.seq-track__b.T { background: var(--base-t); }
.seq-track__b.C { background: var(--base-c); }
.seq-track__b.G { background: var(--base-g); }
.seq-track__b.selected {
box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--bg);
}
/* Per-base text color (used wherever DNA letters appear in prose) */
.b-A, .b-T, .b-C, .b-G { font-weight: 500; }
.b-A { color: var(--base-a); }
.b-T { color: var(--base-t); }
.b-C { color: var(--base-c); }
.b-G { color: var(--base-g); }
/* k-mer token: colored bases inside <>, no chrome */
.kmer-token, .raw-seq {
font-family: "JetBrains Mono", monospace;
font-size: 12px;
font-weight: 500;
letter-spacing: 0.5px;
}
.kmer-token {
display: inline-flex;
align-items: center;
padding: 2px 0;
white-space: nowrap;
}
.kmer-token .br { color: var(--ink-faint); font-weight: 400; }
.kmer-token.muted { opacity: 0.45; }
.raw-seq { display: inline-flex; padding: 2px 0; }
.bpe-flow {
display: flex; align-items: center; flex-wrap: wrap;
gap: 18px;
margin: 10px 0 8px;
}
.bpe-flow .arrow {
font-family: "JetBrains Mono", monospace;
font-size: 16px;
color: var(--ink-faint);
}
/* Line 2: source token, SVG fan-out, candidate rows ----------------- */
.bpe-branches {
display: grid;
grid-template-columns: auto 96px 1fr;
grid-template-rows: auto 150px;
gap: 0;
margin-top: 12px;
}
.branch-source {
grid-column: 1; grid-row: 2;
align-self: center;
display: flex; flex-direction: column; align-items: center; gap: 6px;
padding-right: 8px;
}
.branch-source__hint {
font-family: "JetBrains Mono", monospace;
font-size: 9px; color: var(--ink-faint);
text-transform: uppercase; letter-spacing: 1.6px;
}
.branch-lines {
grid-column: 2; grid-row: 2;
width: 96px; height: 150px;
display: block;
}
.branch-lines path {
fill: none;
stroke: #ccc;
stroke-width: 1.4;
transition: stroke 0.15s, stroke-width 0.15s;
}
.branch-lines path.selected { stroke: var(--green); stroke-width: 2.2; }
.branch-header {
grid-column: 3; grid-row: 1;
display: grid;
grid-template-columns: 100px 60px 60px;
gap: 18px;
padding: 0 12px 10px;
font-family: "JetBrains Mono", monospace;
font-size: 9.5px;
font-weight: 500;
letter-spacing: 1.6px;
text-transform: uppercase;
color: var(--ink-soft);
}
.branch-header > span { text-align: center; }
.branch-header > span:first-child { text-align: left; color: var(--ink-faint); }
.branch-targets {
grid-column: 3; grid-row: 2;
display: grid;
grid-template-rows: repeat(5, 26px);
row-gap: 5px;
align-content: center;
justify-content: start;
height: 150px;
}
.cand-row {
display: grid;
grid-template-columns: 100px 60px 60px;
gap: 18px;
align-items: center;
padding: 2px 12px;
cursor: pointer;
border-radius: 2px;
transition: background 0.12s;
}
.cand-row:hover { background: rgba(0,0,0,0.03); }
.cand-row.selected { background: var(--green-tint); }
.mark {
font-family: "JetBrains Mono", monospace;
font-size: 14px;
font-weight: 500;
text-align: center;
line-height: 1;
user-select: none;
}
.mark.ok { color: var(--green); }
.mark.bad { color: var(--red); }
/* explanation note */
.note {
font-family: "Inter", sans-serif;
font-size: 12px; line-height: 1.55;
color: var(--ink-soft);
background: var(--soft-cream);
border-left: 2px solid var(--green);
padding: 10px 12px;
margin-top: 14px;
}
.note code {
font-family: "JetBrains Mono", monospace;
font-size: 11px;
background: #fff;
border: 1px solid var(--rule);
padding: 0 4px; border-radius: 2px;
color: var(--green-dark);
}
.formula {
font-family: "JetBrains Mono", monospace;
font-size: 12px;
background: var(--soft-cream);
border: 1px solid var(--rule);
padding: 10px 12px;
margin-top: 10px;
color: var(--ink);
overflow-x: auto;
}
.formula .hl { color: var(--green-dark); font-weight: 600; }
/* Iframe wrapper: white page, no widget chrome — the host page provides the
heading and description, so we only ship the interactive demo card. */
body { padding: 20px 24px; background: #fff; }
.widget { max-width: 880px; margin: 0 auto; padding: 0; border: 0; }
.widget__head, .widget__caption { display: none; }
</style>
</head>
<body>
<aside class="widget" id="widget-06">
<div class="widget__head">
<span class="widget__eyebrow">§ Widget · 06</span>
<span class="widget__title">Perturbation Impact on HBB Gene Scores</span>
</div>
<p class="widget__caption">
Comparing per-position scores before and after introducing a 30bp perturbation (positions 750–780) in the human hemoglobin beta (HBB) gene sequence.
The original sequence shows baseline model predictions, while the perturbed version reveals how local sequence changes propagate through the model's scoring.
Blue-highlighted regions mark the three coding sequence (CDS) exons. The visualization demonstrates both local effects within the perturbed region
and potential downstream impacts on score distributions across the gene.
</p>
<div class="demo">
<!-- First plot: Original vs Perturbed -->
<div style="position: relative;">
<canvas id="hbb-canvas" width="1200" height="400" style="width: 100%; height: auto; display: block; cursor: crosshair;"></canvas>
<div id="hbb-tooltip" style="position: absolute; background: rgba(0,0,0,0.8); color: white; padding: 0.5rem; border-radius: 4px; font-size: 0.875rem; pointer-events: none; display: none; white-space: nowrap;"></div>
</div>
<!-- Second plot: Difference -->
<div style="margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule);">
<div style="font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.5rem;">
Score Difference (Original - Perturbed)
</div>
<div style="position: relative;">
<canvas id="hbb-diff-canvas" width="1200" height="400" style="width: 100%; height: auto; display: block; cursor: crosshair;"></canvas>
<div id="hbb-diff-tooltip" style="position: absolute; background: rgba(0,0,0,0.8); color: white; padding: 0.5rem; border-radius: 4px; font-size: 0.875rem; pointer-events: none; display: none; white-space: nowrap;"></div>
</div>
</div>
<!-- Legends and stats at the bottom -->
<div style="margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.875rem; color: var(--fg-dim);">
<div style="display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap;">
<div style="display: flex; align-items: center; gap: 0.5rem;">
<div style="width: 20px; height: 3px; background: #317f3f;"></div>
<span>Original Scores</span>
</div>
<div style="display: flex; align-items: center; gap: 0.5rem;">
<div style="width: 20px; height: 3px; background: #b8862c;"></div>
<span>Perturbed Scores</span>
</div>
<div style="display: flex; align-items: center; gap: 0.5rem;">
<div style="width: 20px; height: 3px; background: #4a4a4a;"></div>
<span>Score Difference</span>
</div>
<div style="display: flex; align-items: center; gap: 0.5rem;">
<div style="width: 20px; height: 12px; background: rgba(59, 130, 246, 0.2);"></div>
<span>CDS regions</span>
</div>
<div style="display: flex; align-items: center; gap: 0.5rem;">
<div style="width: 20px; height: 12px; background: rgba(184, 134, 44, 0.15); border: 2px solid rgba(184, 134, 44, 0.6);"></div>
<span>Perturbed region (750-780)</span>
</div>
</div>
<div style="margin-top: 0.5rem;">
<span id="hbb-stats">Loading...</span>
</div>
<div style="margin-top: 0.5rem;">
<span id="hbb-loglik">Loading...</span>
</div>
</div>
</div>
</aside>
<script>
// Widget 06: HBB Gene Score Visualization
// ============================================================
(async function() {
const canvas = document.getElementById('hbb-canvas');
const tooltip = document.getElementById('hbb-tooltip');
const statsEl = document.getElementById('hbb-stats');
const loglikEl = document.getElementById('hbb-loglik');
if (!canvas) return;
const ctx = canvas.getContext('2d');
const dpr = window.devicePixelRatio || 1;
// CDS regions (local coordinates, 0-indexed)
const cdsRegions = [
{ start: 551, end: 642 },
{ start: 773, end: 995 },
{ start: 1846, end: 1974 }
];
// Perturbed region (local coordinates 750-780)
const perturbedRegion = { start: 750, end: 780 };
// Embedded scores (positions 4500-7000, placeholder values)
// Replace these arrays with actual score data
const numPositions = 2500; // 7000 - 4500
const original_scores = [0.251, 0.288, 0.367, 0.159, 0.167, 0.286, 0.278, 0.33, 0.329, 0.31, 0.309, 0.184, 0.197, 0.389, 0.176, 0.341, 0.328, 0.181, 0.383, 0.258, 0.396, 0.278, 0.197, 0.155, 0.4, 0.352, 0.319, 0.185, 0.321, 0.317, 0.12, 0.145, 0.187, 0.355, 0.189, 0.193, 0.237, 0.375, 0.222, 0.326, 0.209, 0.287, 0.361, 0.326, 0.29, 0.16, 0.317, 0.304, 0.17, 0.175, 0.285, 0.336, 0.332, 0.178, 0.375, 0.199, 0.363, 0.21, 0.19, 0.333, 0.235, 0.366, 0.268, 0.267, 0.193, 0.322, 0.256, 0.313, 0.312, 0.318, 0.31, 0.195, 0.185, 0.326, 0.347, 0.298, 0.363, 0.362, 0.162, 0.384, 0.157, 0.161, 0.314, 0.169, 0.335, 0.19, 0.192, 0.159, 0.303, 0.202, 0.224, 0.313, 0.304, 0.202, 0.3, 0.207, 0.376, 0.253, 0.148, 0.157, 0.315, 0.275, 0.185, 0.369, 0.295, 0.201, 0.306, 0.325, 0.221, 0.378, 0.188, 0.205, 0.185, 0.297, 0.239, 0.311, 0.221, 0.222, 0.307, 0.194, 0.278, 0.314, 0.303, 0.316, 0.288, 0.307, 0.196, 0.144, 0.327, 0.285, 0.183, 0.299, 0.134, 0.375, 0.315, 0.313, 0.329, 0.171, 0.312, 0.183, 0.294, 0.286, 0.185, 0.187, 0.328, 0.2, 0.313, 0.325, 0.317, 0.326, 0.21, 0.134, 0.37, 0.157, 0.184, 0.279, 0.271, 0.174, 0.283, 0.302, 0.187, 0.317, 0.351, 0.226, 0.312, 0.322, 0.308, 0.326, 0.414, 0.389, 0.163, 0.345, 0.171, 0.331, 0.222, 0.253, 0.345, 0.264, 0.286, 0.173, 0.373, 0.428, 0.333, 0.388, 0.336, 0.366, 0.303, 0.243, 0.165, 0.287, 0.273, 0.371, 0.391, 0.099, 0.152, 0.351, 0.284, 0.17, 0.602, 0.32, 0.17, 0.476, 0.49, 0.247, 0.274, 0.614, 0.074, 0.367, 0.424, 0.613, 0.059, 0.443, 0.358, 0.541, 0.29, 0.096, 0.16, 0.34, 0.083, 0.264, 0.121, 0.479, 0.304, 0.264, 0.177, 0.148, 0.198, 0.208, 0.353, 0.317, 0.249, 0.456, 0.335, 0.281, 0.151, 0.165, 0.371, 0.317, 0.32, 0.32, 0.344, 0.325, 0.167, 0.344, 0.155, 0.329, 0.378, 0.154, 0.171, 0.336, 0.328, 0.324, 0.186, 0.18, 0.337, 0.161, 0.153, 0.344, 0.202, 0.232, 0.297, 0.29, 0.289, 0.307, 0.319, 0.322, 0.166, 0.368, 0.306, 0.179, 0.192, 0.348, 0.345, 0.329, 0.331, 0.321, 0.18, 0.345, 0.342, 0.149, 0.356, 0.169, 0.305, 0.321, 0.175, 0.171, 0.351, 0.321, 0.308, 0.151, 0.179, 0.185, 0.177, 0.151, 0.168, 0.298, 0.32, 0.236, 0.317, 0.217, 0.379, 0.254, 0.367, 0.276, 0.336, 0.291, 0.131, 0.434, 0.326, 0.305, 0.18, 0.311, 0.233, 0.184, 0.161, 0.334, 0.182, 0.184, 0.245, 0.118, 0.25, 0.241, 0.348, 0.235, 0.294, 0.245, 0.272, 0.271, 0.275, 0.253, 0.284, 0.306, 0.269, 0.303, 0.165, 0.152, 0.375, 0.274, 0.168, 0.295, 0.172, 0.19, 0.34, 0.254, 0.26, 0.21, 0.25, 0.222, 0.382, 0.218, 0.304, 0.219, 0.194, 0.214, 0.336, 0.228, 0.244, 0.251, 0.199, 0.251, 0.286, 0.169, 0.193, 0.324, 0.319, 0.236, 0.273, 0.33, 0.195, 0.322, 0.234, 0.242, 0.197, 0.346, 0.189, 0.262, 0.26, 0.188, 0.366, 0.303, 0.266, 0.21, 0.268, 0.261, 0.237, 0.248, 0.243, 0.288, 0.261, 0.27, 0.291, 0.277, 0.222, 0.233, 0.292, 0.225, 0.36, 0.225, 0.241, 0.232, 0.291, 0.212, 0.237, 0.238, 0.224, 0.242, 0.209, 0.251, 0.278, 0.21, 0.247, 0.245, 0.226, 0.24, 0.262, 0.266, 0.223, 0.241, 0.219, 0.227, 0.213, 0.252, 0.261, 0.251, 0.231, 0.239, 0.334, 0.207, 0.266, 0.238, 0.273, 0.237, 0.212, 0.276, 0.23, 0.227, 0.236, 0.276, 0.329, 0.222, 0.245, 0.201, 0.27, 0.263, 0.372, 0.232, 0.264, 0.273, 0.244, 0.239, 0.286, 0.197, 0.303, 0.285, 0.288, 0.274, 0.375, 0.189, 0.212, 0.297, 0.31, 0.293, 0.305, 0.226, 0.228, 0.306, 0.299, 0.305, 0.23, 0.289, 0.239, 0.24, 0.241, 0.251, 0.244, 0.265, 0.217, 0.221, 0.291, 0.262, 0.324, 0.301, 0.241, 0.239, 0.284, 0.272, 0.471, 0.229, 0.247, 0.283, 0.187, 0.226, 0.319, 0.191, 0.235, 0.208, 0.278, 0.272, 0.364, 0.25, 0.253, 0.274, 0.262, 0.25, 0.365, 0.341, 0.204, 0.253, 0.292, 0.3, 0.302, 0.324, 0.251, 0.238, 0.228, 0.249, 0.226, 0.252, 0.241, 0.217, 0.253, 0.254, 0.232, 0.233, 0.275, 0.266, 0.259, 0.271, 0.237, 0.26, 0.299, 0.205, 0.241, 0.263, 0.252, 0.275, 0.221, 0.28, 0.244, 0.241, 0.226, 0.293, 0.216, 0.283, 0.209, 0.299, 0.166, 0.369, 0.27, 0.243, 0.317, 0.275, 0.898, 0.231, 0.273, 0.327, 0.393, 0.229, 0.347, 0.67, 0.971, 0.935, 0.995, 0.987, 0.917, 0.458, 0.813, 0.763, 0.923, 0.795, 0.388, 0.94, 0.996, 0.842, 0.993, 0.988, 0.94, 0.137, 0.7, 0.809, 0.832, 0.883, 0.189, 0.746, 0.994, 0.05, 0.914, 0.819, 0.339, 0.739, 0.797, 0.906, 0.937, 0.999, 0.872, 0.999, 0.996, 0.997, 0.947, 0.865, 0.808, 0.994, 0.989, 0.809, 0.857, 0.997, 0.957, 0.992, 0.994, 0.126, 0.963, 0.989, 0.95, 0.973, 0.953, 0.819, 0.955, 0.983, 0.958, 0.956, 0.933, 0.941, 0.999, 0.999, 0.856, 0.993, 0.951, 0.81, 0.993, 0.996, 0.911, 0.962, 0.983, 0.853, 0.909, 1.0, 0.952, 0.987, 0.99, 0.914, 0.998, 0.999, 1.0, 0.999, 0.963, 0.975, 0.997, 0.975, 0.992, 0.981, 0.967, 0.101, 0.927, 0.932, 0.341, 0.43, 0.274, 0.304, 0.325, 0.571, 0.818, 0.876, 0.219, 0.855, 0.962, 0.892, 0.649, 0.195, 0.778, 0.635, 0.165, 0.689, 0.535, 0.493, 0.579, 0.333, 0.468, 0.036, 0.076, 0.304, 0.382, 0.206, 0.457, 0.222, 0.576, 0.48, 0.278, 0.085, 0.557, 0.482, 0.787, 0.861, 0.654, 0.715, 0.837, 0.675, 0.672, 0.714, 0.42, 0.509, 0.147, 0.467, 0.185, 0.173, 0.44, 0.381, 0.334, 0.258, 0.232, 0.55, 0.172, 0.088, 0.342, 0.162, 0.562, 0.487, 0.341, 0.349, 0.248, 0.277, 0.206, 0.772, 0.73, 0.808, 0.232, 0.28, 0.136, 0.946, 0.896, 0.802, 0.415, 0.478, 0.808, 0.975, 0.829, 0.953, 0.605, 0.537, 0.791, 0.547, 0.778, 0.693, 0.392, 0.846, 0.689, 0.193, 0.457, 0.755, 0.023, 0.509, 0.886, 0.647, 0.424, 0.091, 0.412, 0.589, 0.084, 0.398, 0.454, 0.193, 0.345, 0.548, 0.318, 0.421, 0.12, 0.35, 0.24, 0.349, 0.391, 0.281, 0.415, 0.496, 0.438, 0.406, 0.999, 0.812, 0.93, 0.999, 0.952, 0.987, 0.997, 0.1, 0.994, 0.994, 0.919, 0.999, 0.999, 0.927, 0.99, 0.999, 0.089, 0.999, 1.0, 1.0, 0.998, 0.998, 0.552, 0.994, 0.998, 0.969, 0.997, 0.995, 0.961, 0.999, 0.999, 0.96, 1.0, 0.999, 0.968, 0.995, 0.995, 0.066, 0.2, 0.419, 0.886, 0.998, 0.998, 0.944, 0.999, 0.999, 0.927, 0.977, 0.998, 0.053, 0.83, 0.999, 0.941, 0.986, 0.995, 0.853, 0.142, 0.981, 0.978, 0.071, 0.991, 0.877, 0.881, 0.82, 0.96, 0.993, 0.988, 0.931, 0.757, 0.999, 0.922, 0.98, 0.993, 0.86, 0.942, 0.944, 0.883, 0.997, 0.998, 0.615, 0.685, 0.987, 0.959, 0.978, 0.972, 0.841, 0.995, 0.999, 0.942, 0.999, 0.997, 0.97, 0.975, 0.978, 0.061, 0.998, 1.0, 0.854, 0.999, 0.993, 0.943, 0.994, 0.985, 0.974, 1.0, 0.999, 0.096, 0.998, 1.0, 0.954, 0.932, 0.998, 0.012, 0.76, 0.84, 0.752, 0.519, 0.997, 0.919, 0.982, 0.998, 0.848, 0.923, 0.918, 0.855, 0.938, 0.993, 0.91, 0.997, 0.99, 0.84, 0.934, 0.999, 0.612, 0.251, 0.359, 0.472, 0.983, 0.999, 0.441, 0.865, 0.999, 0.916, 0.967, 0.961, 0.814, 0.746, 0.979, 0.921, 0.992, 1.0, 0.965, 0.999, 0.997, 0.961, 0.978, 0.997, 0.855, 0.989, 0.995, 0.839, 0.997, 0.986, 0.97, 0.993, 0.997, 0.8, 0.094, 0.047, 0.083, 0.97, 1.0, 0.944, 1.0, 0.999, 0.923, 0.993, 0.998, 0.871, 0.988, 0.988, 0.926, 1.0, 1.0, 0.939, 0.998, 0.958, 0.912, 0.998, 0.998, 0.957, 0.995, 0.998, 0.922, 0.981, 1.0, 0.976, 0.999, 0.997, 0.373, 0.999, 1.0, 0.976, 1.0, 1.0, 0.975, 0.999, 1.0, 0.882, 0.998, 0.995, 0.964, 1.0, 0.999, 0.981, 1.0, 0.999, 0.945, 0.924, 0.579, 0.989, 0.997, 0.997, 0.895, 0.997, 0.998, 0.988, 0.568, 0.666, 0.265, 0.537, 0.893, 0.731, 0.382, 0.73, 0.462, 0.32, 0.687, 0.784, 0.235, 0.299, 0.132, 0.474, 0.113, 0.618, 0.31, 0.467, 0.667, 0.427, 0.455, 0.664, 0.585, 0.281, 0.255, 0.199, 0.204, 0.63, 0.66, 0.209, 0.581, 0.529, 0.425, 0.597, 0.103, 0.548, 0.111, 0.512, 0.225, 0.148, 0.437, 0.144, 0.743, 0.747, 0.63, 0.112, 0.897, 0.681, 0.833, 0.646, 0.266, 0.598, 0.573, 0.902, 0.657, 0.075, 0.833, 0.761, 0.117, 0.514, 0.794, 0.694, 0.449, 0.168, 0.097, 0.396, 0.342, 0.335, 0.29, 0.242, 0.191, 0.14, 0.329, 0.722, 0.429, 0.247, 0.384, 0.745, 0.569, 0.434, 0.921, 0.786, 0.447, 0.579, 0.949, 0.675, 0.929, 0.967, 0.845, 0.893, 0.521, 0.867, 0.03, 0.069, 0.532, 0.497, 0.051, 0.872, 0.472, 0.293, 0.069, 0.189, 0.34, 0.189, 0.314, 0.351, 0.284, 0.452, 0.321, 0.144, 0.367, 0.415, 0.272, 0.069, 0.231, 0.155, 0.298, 0.411, 0.336, 0.368, 0.285, 0.34, 0.218, 0.121, 0.232, 0.474, 0.388, 0.257, 0.24, 0.256, 0.373, 0.421, 0.221, 0.287, 0.1, 0.434, 0.551, 0.445, 0.267, 0.333, 0.203, 0.568, 0.637, 0.506, 0.32, 0.407, 0.502, 0.405, 0.338, 0.273, 0.329, 0.317, 0.339, 0.133, 0.213, 0.462, 0.135, 0.281, 0.253, 0.176, 0.406, 0.318, 0.335, 0.307, 0.158, 0.352, 0.211, 0.495, 0.541, 0.101, 0.505, 0.494, 0.509, 0.492, 0.268, 0.471, 0.463, 0.464, 0.435, 0.15, 0.354, 0.394, 0.414, 0.311, 0.275, 0.421, 0.457, 0.157, 0.483, 0.528, 0.105, 0.212, 0.558, 0.543, 0.556, 0.202, 0.545, 0.505, 0.549, 0.511, 0.524, 0.518, 0.512, 0.448, 0.525, 0.183, 0.539, 0.529, 0.177, 0.54, 0.181, 0.197, 0.102, 0.179, 0.212, 0.214, 0.462, 0.511, 0.497, 0.525, 0.56, 0.209, 0.177, 0.571, 0.155, 0.545, 0.505, 0.173, 0.51, 0.183, 0.194, 0.538, 0.536, 0.082, 0.572, 0.285, 0.46, 0.114, 0.118, 0.5, 0.544, 0.198, 0.221, 0.15, 0.23, 0.468, 0.449, 0.175, 0.429, 0.143, 0.435, 0.209, 0.465, 0.28, 0.267, 0.154, 0.255, 0.2, 0.28, 0.246, 0.144, 0.128, 0.279, 0.343, 0.303, 0.444, 0.246, 0.449, 0.18, 0.531, 0.203, 0.457, 0.162, 0.264, 0.142, 0.293, 0.385, 0.307, 0.152, 0.299, 0.349, 0.364, 0.257, 0.316, 0.18, 0.352, 0.285, 0.312, 0.143, 0.36, 0.359, 0.319, 0.331, 0.381, 0.348, 0.292, 0.309, 0.316, 0.326, 0.557, 0.165, 0.228, 0.247, 0.261, 0.386, 0.119, 0.379, 0.121, 0.335, 0.169, 0.347, 0.106, 0.431, 0.208, 0.144, 0.138, 0.37, 0.228, 0.174, 0.318, 0.321, 0.156, 0.309, 0.364, 0.459, 0.316, 0.218, 0.389, 0.358, 0.663, 0.703, 0.682, 0.324, 0.124, 0.349, 0.253, 0.347, 0.442, 0.301, 0.501, 0.272, 0.189, 0.607, 0.164, 0.545, 0.167, 0.111, 0.14, 0.689, 0.489, 0.633, 0.153, 0.59, 0.29, 0.154, 0.42, 0.472, 0.482, 0.467, 0.161, 0.255, 0.613, 0.54, 0.53, 0.284, 0.09, 0.123, 0.551, 0.077, 0.12, 0.324, 0.7, 0.276, 0.082, 0.102, 0.14, 0.149, 0.225, 0.376, 0.337, 0.321, 0.315, 0.152, 0.499, 0.384, 0.363, 0.348, 0.358, 0.332, 0.484, 0.484, 0.419, 0.45, 0.332, 0.314, 0.37, 0.471, 0.096, 0.326, 0.475, 0.335, 0.329, 0.715, 0.719, 0.766, 0.728, 0.699, 0.031, 0.629, 0.834, 0.805, 0.213, 0.781, 0.852, 0.705, 0.823, 0.861, 0.832, 0.885, 0.902, 0.826, 0.852, 0.85, 0.76, 0.72, 0.707, 0.088, 0.801, 0.814, 0.111, 0.807, 0.431, 0.602, 0.649, 0.741, 0.235, 0.707, 0.898, 0.443, 0.857, 0.908, 0.899, 0.447, 0.187, 0.871, 0.86, 0.805, 0.231, 0.081, 0.882, 0.567, 0.774, 0.759, 0.144, 0.734, 0.687, 0.814, 0.411, 0.068, 0.106, 0.773, 0.393, 0.352, 0.069, 0.131, 0.367, 0.391, 0.793, 0.834, 0.694, 0.858, 0.428, 0.482, 0.708, 0.861, 0.884, 0.779, 0.838, 0.857, 0.047, 0.062, 0.032, 0.039, 0.054, 0.12, 0.081, 0.873, 0.034, 0.421, 0.652, 0.077, 0.284, 0.273, 0.574, 0.357, 0.49, 0.234, 0.681, 0.264, 0.661, 0.141, 0.73, 0.069, 0.125, 0.358, 0.456, 0.404, 0.147, 0.39, 0.467, 0.151, 0.406, 0.405, 0.399, 0.414, 0.217, 0.26, 0.434, 0.274, 0.445, 0.26, 0.123, 0.388, 0.447, 0.397, 0.428, 0.401, 0.406, 0.113, 0.409, 0.448, 0.457, 0.264, 0.449, 0.106, 0.501, 0.391, 0.294, 0.434, 0.513, 0.522, 0.127, 0.444, 0.308, 0.302, 0.306, 0.371, 0.142, 0.37, 0.384, 0.355, 0.139, 0.139, 0.132, 0.367, 0.353, 0.302, 0.319, 0.146, 0.389, 0.161, 0.348, 0.333, 0.412, 0.276, 0.389, 0.4, 0.376, 0.246, 0.127, 0.052, 0.044, 0.054, 0.268, 0.223, 0.313, 0.343, 0.297, 0.312, 0.402, 0.139, 0.304, 0.399, 0.336, 0.137, 0.296, 0.302, 0.312, 0.128, 0.368, 0.354, 0.37, 0.131, 0.364, 0.4, 0.126, 0.144, 0.139, 0.371, 0.153, 0.418, 0.377, 0.392, 0.125, 0.152, 0.29, 0.192, 0.192, 0.241, 0.389, 0.405, 0.18, 0.416, 0.264, 0.285, 0.277, 0.117, 0.318, 0.345, 0.35, 0.326, 0.32, 0.17, 0.424, 0.165, 0.385, 0.153, 0.364, 0.385, 0.382, 0.38, 0.414, 0.357, 0.337, 0.152, 0.437, 0.157, 0.134, 0.157, 0.373, 0.379, 0.258, 0.247, 0.354, 0.339, 0.091, 0.384, 0.242, 0.339, 0.345, 0.411, 0.063, 0.373, 0.343, 0.245, 0.371, 0.2, 0.072, 0.18, 0.116, 0.284, 0.305, 0.106, 0.362, 0.286, 0.24, 0.424, 0.275, 0.273, 0.287, 0.373, 0.367, 0.414, 0.321, 0.392, 0.151, 0.38, 0.218, 0.173, 0.34, 0.433, 0.303, 0.424, 0.656, 0.484, 0.591, 0.57, 0.291, 0.104, 0.403, 0.309, 0.333, 0.159, 0.365, 0.156, 0.298, 0.299, 0.163, 0.343, 0.328, 0.352, 0.14, 0.359, 0.158, 0.141, 0.352, 0.345, 0.324, 0.164, 0.354, 0.308, 0.331, 0.333, 0.389, 0.125, 0.186, 0.377, 0.323, 0.306, 0.323, 0.322, 0.146, 0.186, 0.329, 0.15, 0.204, 0.283, 0.347, 0.202, 0.33, 0.329, 0.351, 0.163, 0.183, 0.321, 0.149, 0.181, 0.331, 0.3, 0.251, 0.242, 0.301, 0.313, 0.419, 0.206, 0.299, 0.137, 0.23, 0.299, 0.339, 0.363, 0.334, 0.233, 0.34, 0.356, 0.491, 0.426, 0.234, 0.393, 0.131, 0.129, 0.341, 0.357, 0.151, 0.141, 0.157, 0.312, 0.22, 0.431, 0.355, 0.172, 0.221, 0.15, 0.306, 0.23, 0.193, 0.355, 0.271, 0.292, 0.238, 0.32, 0.286, 0.174, 0.308, 0.195, 0.301, 0.213, 0.33, 0.218, 0.222, 0.295, 0.264, 0.21, 0.189, 0.318, 0.295, 0.193, 0.249, 0.182, 0.196, 0.216, 0.298, 0.28, 0.303, 0.289, 0.18, 0.25, 0.324, 0.257, 0.348, 0.284, 0.206, 0.284, 0.307, 0.193, 0.361, 0.371, 0.299, 0.157, 0.422, 0.147, 0.213, 0.277, 0.435, 0.288, 0.418, 0.429, 0.06, 0.409, 0.487, 0.438, 0.337, 0.476, 0.539, 0.258, 0.443, 0.394, 0.57, 0.481, 0.245, 0.205, 0.112, 0.174, 0.149, 0.224, 0.955, 0.998, 0.919, 0.904, 0.979, 0.93, 0.997, 0.998, 0.334, 0.881, 0.998, 0.94, 0.539, 0.999, 0.472, 0.96, 0.996, 0.015, 0.281, 0.271, 0.85, 0.967, 0.993, 0.846, 0.904, 0.997, 0.805, 0.979, 0.993, 0.468, 0.949, 0.136, 0.199, 0.916, 0.988, 0.889, 0.988, 0.993, 0.744, 0.958, 0.979, 0.918, 0.966, 0.938, 0.493, 0.991, 0.994, 0.915, 0.999, 0.998, 0.831, 0.997, 0.996, 0.898, 0.985, 0.986, 0.43, 0.772, 0.075, 0.112, 0.881, 0.975, 0.829, 0.993, 0.996, 0.928, 0.966, 0.955, 0.926, 0.99, 0.997, 0.909, 0.999, 0.814, 0.954, 0.941, 0.994, 0.965, 1.0, 1.0, 0.039, 0.981, 0.998, 0.951, 0.97, 0.991, 0.905, 0.907, 0.967, 0.744, 0.998, 0.992, 0.566, 0.993, 1.0, 0.961, 0.988, 0.996, 0.256, 0.963, 0.914, 0.893, 0.971, 0.99, 0.78, 0.843, 1.0, 0.898, 0.974, 0.993, 0.614, 0.99, 0.997, 0.97, 0.998, 0.993, 0.9, 0.999, 0.999, 0.06, 0.995, 0.983, 0.578, 1.0, 0.789, 0.993, 0.868, 0.423, 0.668, 0.703, 0.035, 0.558, 0.826, 0.901, 0.567, 0.893, 0.533, 0.639, 0.96, 0.512, 0.894, 0.09, 0.788, 0.539, 0.341, 0.349, 0.163, 0.204, 0.155, 0.221, 0.56, 0.338, 0.463, 0.376, 0.176, 0.662, 0.892, 0.907, 0.813, 0.823, 0.117, 0.089, 0.573, 0.143, 0.676, 0.797, 0.819, 0.027, 0.67, 0.501, 0.244, 0.156, 0.53, 0.118, 0.208, 0.627, 0.474, 0.09, 0.053, 0.082, 0.71, 0.611, 0.081, 0.287, 0.4, 0.134, 0.826, 0.117, 0.858, 0.863, 0.57, 0.772, 0.079, 0.501, 0.757, 0.713, 0.459, 0.777, 0.078, 0.518, 0.377, 0.323, 0.174, 0.5, 0.598, 0.529, 0.626, 0.52, 0.35, 0.507, 0.801, 0.3, 0.829, 0.63, 0.771, 0.369, 0.441, 0.294, 0.896, 0.716, 0.453, 0.649, 0.907, 0.884, 0.034, 0.352, 0.74, 0.223, 0.93, 0.83, 0.713, 0.881, 0.938, 0.965, 0.998, 0.979, 0.971, 0.999, 0.998, 0.237, 0.768, 0.655, 0.645, 0.365, 0.737, 0.875, 0.896, 0.454, 0.4, 0.925, 0.95, 0.369, 0.919, 0.97, 0.925, 0.973, 0.846, 0.844, 0.96, 0.811, 0.752, 0.27, 0.224, 0.198, 0.1, 0.536, 0.207, 0.462, 0.353, 0.377, 0.174, 0.138, 0.136, 0.55, 0.513, 0.149, 0.596, 0.582, 0.463, 0.198, 0.431, 0.14, 0.211, 0.242, 0.413, 0.235, 0.432, 0.416, 0.447, 0.443, 0.209, 0.192, 0.366, 0.327, 0.378, 0.364, 0.393, 0.399, 0.136, 0.139, 0.148, 0.368, 0.33, 0.369, 0.155, 0.349, 0.218, 0.159, 0.171, 0.32, 0.176, 0.166, 0.207, 0.099, 0.375, 0.254, 0.289, 0.242, 0.116, 0.303, 0.285, 0.289, 0.288, 0.334, 0.347, 0.351, 0.351, 0.152, 0.347, 0.319, 0.268, 0.294, 0.324, 0.165, 0.345, 0.349, 0.455, 0.299, 0.189, 0.389, 0.38, 0.189, 0.393, 0.207, 0.119, 0.283, 0.389, 0.215, 0.22, 0.267, 0.12, 0.367, 0.372, 0.371, 0.108, 0.134, 0.276, 0.273, 0.209, 0.211, 0.262, 0.383, 0.382, 0.357, 0.36, 0.273, 0.353, 0.135, 0.364, 0.128, 0.271, 0.356, 0.253, 0.379, 0.288, 0.142, 0.292, 0.294, 0.27, 0.336, 0.357, 0.152, 0.318, 0.157, 0.188, 0.309, 0.291, 0.194, 0.347, 0.345, 0.419, 0.186, 0.361, 0.371, 0.185, 0.181, 0.205, 0.189, 0.401, 0.221, 0.222, 0.127, 0.356, 0.275, 0.132, 0.345, 0.354, 0.347, 0.121, 0.354, 0.226, 0.144, 0.255, 0.374, 0.359, 0.257, 0.225, 0.156, 0.362, 0.151, 0.498, 0.292, 0.275, 0.219, 0.212, 0.167, 0.429, 0.315, 0.169, 0.319, 0.227, 0.164, 0.19, 0.16, 0.194, 0.267, 0.229, 0.322, 0.185, 0.215, 0.187, 0.313, 0.264, 0.322, 0.262, 0.219, 0.187, 0.175, 0.275, 0.27, 0.223, 0.289, 0.288, 0.191, 0.312, 0.309, 0.176, 0.203, 0.195, 0.315, 0.188, 0.313, 0.298, 0.309, 0.288, 0.289, 0.289, 0.189, 0.267, 0.361, 0.243, 0.261, 0.195, 0.322, 0.265, 0.238, 0.275, 0.316, 0.206, 0.308, 0.254, 0.221, 0.167, 0.28, 0.267, 0.218, 0.305, 0.242, 0.271, 0.28, 0.218, 0.234, 0.353, 0.254, 0.23, 0.275, 0.27, 0.329, 0.338, 0.357, 0.249, 0.284, 0.283, 0.275, 0.319, 0.205, 0.164, 0.315, 0.324, 0.314, 0.231, 0.163, 0.312, 0.189, 0.312, 0.327, 0.288, 0.302, 0.317, 0.313, 0.331, 0.163, 0.385, 0.355, 0.334, 0.307, 0.159, 0.325, 0.362, 0.314, 0.328, 0.342, 0.167, 0.331, 0.351, 0.357, 0.358, 0.323, 0.173, 0.148, 0.404, 0.173, 0.368, 0.142, 0.145, 0.351, 0.163, 0.31, 0.324, 0.168, 0.317, 0.322, 0.286, 0.187, 0.334, 0.157, 0.329, 0.33, 0.385, 0.328, 0.17, 0.322, 0.164, 0.356, 0.217, 0.172, 0.179, 0.17, 0.323, 0.354, 0.355, 0.361, 0.153, 0.198, 0.339, 0.343, 0.224, 0.363, 0.191, 0.174, 0.362, 0.156, 0.164, 0.316, 0.345, 0.193, 0.352, 0.185, 0.429, 0.207, 0.296, 0.173, 0.196, 0.214, 0.411, 0.339, 0.182, 0.274, 0.223, 0.328, 0.232, 0.24, 0.287, 0.209, 0.334, 0.216, 0.304, 0.206, 0.301, 0.305, 0.252, 0.322, 0.258, 0.328, 0.302, 0.173, 0.232, 0.328, 0.363, 0.231, 0.167, 0.254, 0.168, 0.257, 0.275, 0.324, 0.204, 0.206, 0.295, 0.193, 0.231, 0.31, 0.311, 0.294, 0.218, 0.22, 0.287, 0.234, 0.307, 0.188, 0.277, 0.266, 0.251, 0.3, 0.166, 0.304, 0.296, 0.221, 0.282, 0.337, 0.336, 0.217];
const perturbed_scores = [0.251, 0.288, 0.367, 0.159, 0.167, 0.286, 0.278, 0.33, 0.329, 0.31, 0.309, 0.184, 0.197, 0.389, 0.176, 0.341, 0.328, 0.181, 0.383, 0.258, 0.396, 0.278, 0.197, 0.155, 0.4, 0.352, 0.319, 0.185, 0.321, 0.317, 0.12, 0.145, 0.187, 0.355, 0.189, 0.193, 0.237, 0.375, 0.222, 0.326, 0.209, 0.287, 0.361, 0.326, 0.29, 0.16, 0.317, 0.304, 0.17, 0.175, 0.285, 0.336, 0.332, 0.178, 0.375, 0.199, 0.363, 0.21, 0.19, 0.333, 0.235, 0.366, 0.268, 0.267, 0.193, 0.322, 0.256, 0.313, 0.312, 0.318, 0.31, 0.195, 0.185, 0.326, 0.347, 0.298, 0.363, 0.362, 0.162, 0.384, 0.157, 0.161, 0.314, 0.169, 0.335, 0.19, 0.192, 0.159, 0.303, 0.202, 0.224, 0.313, 0.304, 0.202, 0.3, 0.207, 0.376, 0.253, 0.148, 0.157, 0.315, 0.275, 0.185, 0.369, 0.295, 0.201, 0.306, 0.325, 0.221, 0.378, 0.188, 0.205, 0.185, 0.297, 0.239, 0.311, 0.221, 0.222, 0.307, 0.194, 0.278, 0.314, 0.303, 0.316, 0.288, 0.307, 0.196, 0.144, 0.327, 0.285, 0.183, 0.299, 0.134, 0.375, 0.315, 0.313, 0.329, 0.171, 0.312, 0.183, 0.294, 0.286, 0.185, 0.187, 0.328, 0.2, 0.313, 0.325, 0.317, 0.326, 0.21, 0.134, 0.37, 0.157, 0.184, 0.279, 0.271, 0.174, 0.283, 0.302, 0.187, 0.317, 0.351, 0.226, 0.312, 0.322, 0.308, 0.326, 0.414, 0.389, 0.163, 0.345, 0.171, 0.331, 0.222, 0.253, 0.345, 0.264, 0.286, 0.173, 0.373, 0.428, 0.333, 0.388, 0.336, 0.366, 0.303, 0.243, 0.165, 0.287, 0.273, 0.371, 0.391, 0.099, 0.152, 0.351, 0.284, 0.17, 0.602, 0.32, 0.17, 0.476, 0.49, 0.247, 0.274, 0.614, 0.074, 0.367, 0.424, 0.613, 0.059, 0.443, 0.358, 0.541, 0.29, 0.096, 0.16, 0.34, 0.083, 0.264, 0.121, 0.479, 0.304, 0.264, 0.177, 0.148, 0.198, 0.208, 0.353, 0.317, 0.249, 0.456, 0.335, 0.281, 0.151, 0.165, 0.371, 0.317, 0.32, 0.32, 0.344, 0.325, 0.167, 0.344, 0.155, 0.329, 0.378, 0.154, 0.171, 0.336, 0.328, 0.324, 0.186, 0.18, 0.337, 0.161, 0.153, 0.344, 0.202, 0.232, 0.297, 0.29, 0.289, 0.307, 0.319, 0.322, 0.166, 0.368, 0.306, 0.179, 0.192, 0.348, 0.345, 0.329, 0.331, 0.321, 0.18, 0.345, 0.342, 0.149, 0.356, 0.169, 0.305, 0.321, 0.175, 0.171, 0.351, 0.321, 0.308, 0.151, 0.179, 0.185, 0.177, 0.151, 0.168, 0.298, 0.32, 0.236, 0.317, 0.217, 0.379, 0.254, 0.367, 0.276, 0.336, 0.291, 0.131, 0.434, 0.326, 0.305, 0.18, 0.311, 0.233, 0.184, 0.161, 0.334, 0.182, 0.184, 0.245, 0.118, 0.25, 0.241, 0.348, 0.235, 0.294, 0.245, 0.272, 0.271, 0.275, 0.253, 0.284, 0.306, 0.269, 0.303, 0.165, 0.152, 0.375, 0.274, 0.168, 0.295, 0.172, 0.19, 0.34, 0.254, 0.26, 0.21, 0.25, 0.222, 0.382, 0.218, 0.304, 0.219, 0.194, 0.214, 0.336, 0.228, 0.244, 0.251, 0.199, 0.251, 0.286, 0.169, 0.193, 0.324, 0.319, 0.236, 0.273, 0.33, 0.195, 0.322, 0.234, 0.242, 0.197, 0.346, 0.189, 0.262, 0.26, 0.188, 0.366, 0.303, 0.266, 0.21, 0.268, 0.261, 0.237, 0.248, 0.243, 0.288, 0.261, 0.27, 0.291, 0.277, 0.222, 0.233, 0.292, 0.225, 0.36, 0.225, 0.241, 0.232, 0.291, 0.212, 0.237, 0.238, 0.224, 0.242, 0.209, 0.251, 0.278, 0.21, 0.247, 0.245, 0.226, 0.24, 0.262, 0.266, 0.223, 0.241, 0.219, 0.227, 0.213, 0.252, 0.261, 0.251, 0.231, 0.239, 0.334, 0.207, 0.266, 0.238, 0.273, 0.237, 0.212, 0.276, 0.23, 0.227, 0.236, 0.276, 0.329, 0.222, 0.245, 0.201, 0.27, 0.263, 0.372, 0.232, 0.264, 0.273, 0.244, 0.239, 0.286, 0.197, 0.303, 0.285, 0.288, 0.274, 0.375, 0.189, 0.212, 0.297, 0.31, 0.293, 0.305, 0.226, 0.228, 0.306, 0.299, 0.305, 0.23, 0.289, 0.239, 0.24, 0.241, 0.251, 0.244, 0.265, 0.217, 0.221, 0.291, 0.262, 0.324, 0.301, 0.241, 0.239, 0.284, 0.272, 0.471, 0.229, 0.247, 0.283, 0.187, 0.226, 0.319, 0.191, 0.235, 0.208, 0.278, 0.272, 0.364, 0.25, 0.253, 0.274, 0.262, 0.25, 0.365, 0.341, 0.204, 0.253, 0.292, 0.3, 0.302, 0.324, 0.251, 0.238, 0.228, 0.249, 0.226, 0.252, 0.241, 0.217, 0.253, 0.254, 0.232, 0.233, 0.275, 0.266, 0.259, 0.271, 0.237, 0.26, 0.299, 0.205, 0.241, 0.263, 0.252, 0.275, 0.221, 0.28, 0.244, 0.241, 0.226, 0.293, 0.216, 0.283, 0.209, 0.299, 0.166, 0.369, 0.27, 0.243, 0.317, 0.275, 0.898, 0.231, 0.273, 0.327, 0.393, 0.229, 0.347, 0.67, 0.971, 0.935, 0.995, 0.987, 0.917, 0.458, 0.813, 0.763, 0.923, 0.795, 0.388, 0.94, 0.996, 0.842, 0.993, 0.988, 0.94, 0.137, 0.7, 0.809, 0.832, 0.883, 0.189, 0.746, 0.994, 0.05, 0.914, 0.819, 0.339, 0.739, 0.797, 0.906, 0.937, 0.999, 0.872, 0.999, 0.996, 0.997, 0.947, 0.865, 0.808, 0.994, 0.989, 0.809, 0.857, 0.997, 0.957, 0.992, 0.994, 0.126, 0.963, 0.989, 0.95, 0.973, 0.953, 0.819, 0.955, 0.983, 0.958, 0.956, 0.933, 0.941, 0.999, 0.999, 0.856, 0.993, 0.951, 0.81, 0.993, 0.996, 0.911, 0.962, 0.983, 0.853, 0.909, 1.0, 0.952, 0.987, 0.99, 0.914, 0.998, 0.999, 1.0, 0.999, 0.963, 0.975, 0.997, 0.975, 0.992, 0.981, 0.967, 0.101, 0.927, 0.932, 0.341, 0.43, 0.274, 0.304, 0.325, 0.571, 0.818, 0.876, 0.219, 0.855, 0.962, 0.892, 0.649, 0.195, 0.778, 0.635, 0.165, 0.689, 0.535, 0.493, 0.579, 0.333, 0.468, 0.036, 0.076, 0.304, 0.382, 0.206, 0.457, 0.222, 0.576, 0.48, 0.278, 0.085, 0.557, 0.482, 0.787, 0.861, 0.654, 0.715, 0.837, 0.675, 0.672, 0.714, 0.42, 0.509, 0.147, 0.467, 0.185, 0.173, 0.44, 0.381, 0.334, 0.258, 0.232, 0.55, 0.172, 0.088, 0.342, 0.162, 0.562, 0.487, 0.341, 0.349, 0.248, 0.277, 0.206, 0.772, 0.73, 0.808, 0.232, 0.28, 0.136, 0.946, 0.896, 0.802, 0.415, 0.478, 0.808, 0.975, 0.829, 0.953, 0.605, 0.537, 0.791, 0.547, 0.778, 0.693, 0.392, 0.846, 0.689, 0.193, 0.457, 0.755, 0.023, 0.509, 0.031, 0.092, 0.424, 0.148, 0.165, 0.041, 0.247, 0.181, 0.127, 0.293, 0.237, 0.1, 0.564, 0.398, 0.239, 0.335, 0.269, 0.192, 0.853, 0.669, 0.557, 0.652, 0.463, 0.399, 0.91, 0.806, 0.744, 0.763, 0.657, 0.611, 0.03, 0.031, 0.832, 0.084, 0.057, 0.122, 0.156, 0.179, 0.193, 0.168, 0.364, 0.413, 0.242, 0.256, 0.169, 0.193, 0.218, 0.241, 0.232, 0.439, 0.27, 0.387, 0.206, 0.374, 0.366, 0.314, 0.434, 0.261, 0.21, 0.265, 0.259, 0.242, 0.409, 0.194, 0.147, 0.339, 0.228, 0.239, 0.271, 0.239, 0.257, 0.308, 0.311, 0.352, 0.105, 0.257, 0.305, 0.256, 0.14, 0.144, 0.25, 0.149, 0.297, 0.159, 0.153, 0.276, 0.231, 0.237, 0.363, 0.239, 0.182, 0.347, 0.253, 0.328, 0.349, 0.252, 0.315, 0.234, 0.231, 0.23, 0.162, 0.288, 0.286, 0.108, 0.089, 0.145, 0.262, 0.332, 0.451, 0.306, 0.226, 0.365, 0.198, 0.297, 0.352, 0.375, 0.317, 0.155, 0.283, 0.177, 0.947, 0.836, 0.956, 0.936, 0.809, 0.907, 0.98, 0.929, 0.885, 0.983, 0.26, 0.951, 0.885, 0.792, 0.797, 0.879, 0.074, 0.246, 0.348, 0.84, 0.923, 0.849, 0.77, 0.865, 0.988, 0.32, 0.67, 0.744, 0.715, 0.897, 0.895, 0.502, 0.761, 0.2, 0.387, 0.14, 0.994, 0.605, 0.002, 0.002, 0.003, 0.008, 0.69, 0.55, 0.398, 0.72, 0.526, 0.605, 0.759, 0.654, 0.653, 0.254, 0.604, 0.105, 0.987, 0.843, 0.99, 0.988, 0.949, 0.077, 0.496, 0.5, 0.953, 0.982, 0.565, 0.94, 0.957, 0.702, 0.689, 0.873, 0.862, 0.981, 0.008, 0.087, 0.935, 0.984, 0.741, 0.983, 0.922, 0.803, 0.9, 0.894, 0.567, 0.494, 0.922, 0.654, 0.985, 0.99, 0.911, 0.936, 0.724, 0.835, 0.976, 0.978, 0.936, 0.977, 0.987, 0.735, 0.966, 0.995, 0.887, 0.974, 0.986, 0.321, 0.982, 0.996, 0.969, 0.988, 0.996, 0.94, 0.98, 0.98, 0.814, 0.978, 0.938, 0.371, 0.996, 0.991, 0.965, 0.992, 0.997, 0.946, 0.765, 0.873, 0.974, 0.975, 0.993, 0.745, 0.99, 0.991, 0.966, 0.631, 0.329, 0.313, 0.6, 0.897, 0.851, 0.652, 0.284, 0.118, 0.111, 0.196, 0.768, 0.548, 0.092, 0.096, 0.136, 0.106, 0.443, 0.304, 0.38, 0.499, 0.328, 0.308, 0.487, 0.511, 0.309, 0.324, 0.266, 0.218, 0.438, 0.49, 0.315, 0.392, 0.4, 0.43, 0.503, 0.237, 0.525, 0.094, 0.505, 0.128, 0.101, 0.465, 0.307, 0.321, 0.176, 0.269, 0.267, 0.427, 0.62, 0.548, 0.271, 0.106, 0.294, 0.598, 0.784, 0.307, 0.207, 0.463, 0.51, 0.161, 0.483, 0.458, 0.488, 0.286, 0.292, 0.334, 0.175, 0.422, 0.316, 0.257, 0.292, 0.352, 0.371, 0.378, 0.623, 0.285, 0.235, 0.398, 0.337, 0.432, 0.194, 0.473, 0.348, 0.303, 0.311, 0.536, 0.552, 0.67, 0.533, 0.409, 0.277, 0.407, 0.504, 0.218, 0.342, 0.373, 0.413, 0.129, 0.527, 0.346, 0.244, 0.126, 0.053, 0.368, 0.286, 0.123, 0.444, 0.288, 0.186, 0.262, 0.238, 0.414, 0.217, 0.347, 0.14, 0.169, 0.132, 0.298, 0.443, 0.258, 0.312, 0.206, 0.251, 0.213, 0.176, 0.209, 0.517, 0.38, 0.232, 0.301, 0.366, 0.374, 0.363, 0.248, 0.455, 0.076, 0.429, 0.295, 0.189, 0.162, 0.231, 0.193, 0.446, 0.497, 0.405, 0.485, 0.327, 0.365, 0.295, 0.273, 0.228, 0.301, 0.279, 0.31, 0.19, 0.239, 0.424, 0.187, 0.321, 0.275, 0.229, 0.314, 0.27, 0.275, 0.236, 0.201, 0.241, 0.19, 0.356, 0.374, 0.157, 0.415, 0.355, 0.367, 0.364, 0.251, 0.368, 0.371, 0.381, 0.35, 0.205, 0.388, 0.418, 0.419, 0.235, 0.228, 0.377, 0.368, 0.162, 0.379, 0.415, 0.17, 0.161, 0.373, 0.359, 0.373, 0.183, 0.368, 0.337, 0.41, 0.338, 0.395, 0.361, 0.37, 0.552, 0.608, 0.148, 0.566, 0.539, 0.161, 0.54, 0.209, 0.243, 0.111, 0.21, 0.193, 0.198, 0.295, 0.481, 0.303, 0.383, 0.442, 0.203, 0.164, 0.485, 0.187, 0.46, 0.439, 0.197, 0.469, 0.208, 0.198, 0.462, 0.464, 0.041, 0.846, 0.088, 0.771, 0.054, 0.054, 0.414, 0.417, 0.273, 0.286, 0.151, 0.275, 0.332, 0.352, 0.226, 0.324, 0.181, 0.341, 0.233, 0.383, 0.293, 0.279, 0.169, 0.278, 0.228, 0.302, 0.28, 0.172, 0.164, 0.303, 0.363, 0.327, 0.381, 0.273, 0.388, 0.19, 0.478, 0.214, 0.401, 0.195, 0.274, 0.158, 0.258, 0.388, 0.238, 0.22, 0.228, 0.359, 0.35, 0.22, 0.292, 0.172, 0.337, 0.25, 0.279, 0.193, 0.371, 0.353, 0.283, 0.294, 0.355, 0.328, 0.275, 0.274, 0.277, 0.285, 0.587, 0.166, 0.203, 0.223, 0.234, 0.388, 0.137, 0.365, 0.151, 0.313, 0.16, 0.359, 0.148, 0.422, 0.197, 0.193, 0.184, 0.372, 0.196, 0.163, 0.319, 0.269, 0.212, 0.252, 0.319, 0.495, 0.309, 0.319, 0.35, 0.403, 0.69, 0.745, 0.741, 0.413, 0.112, 0.326, 0.224, 0.249, 0.557, 0.192, 0.6, 0.191, 0.203, 0.587, 0.175, 0.534, 0.177, 0.114, 0.133, 0.688, 0.48, 0.628, 0.139, 0.593, 0.325, 0.166, 0.406, 0.488, 0.512, 0.513, 0.135, 0.351, 0.666, 0.598, 0.593, 0.243, 0.071, 0.129, 0.622, 0.068, 0.108, 0.389, 0.734, 0.254, 0.072, 0.076, 0.108, 0.117, 0.214, 0.373, 0.328, 0.312, 0.3, 0.152, 0.493, 0.388, 0.375, 0.344, 0.321, 0.322, 0.545, 0.539, 0.436, 0.48, 0.33, 0.304, 0.392, 0.494, 0.091, 0.319, 0.499, 0.332, 0.335, 0.731, 0.73, 0.779, 0.743, 0.693, 0.031, 0.637, 0.829, 0.795, 0.218, 0.773, 0.852, 0.706, 0.826, 0.855, 0.831, 0.883, 0.901, 0.824, 0.853, 0.847, 0.758, 0.717, 0.698, 0.089, 0.794, 0.811, 0.115, 0.807, 0.424, 0.582, 0.642, 0.733, 0.24, 0.703, 0.896, 0.458, 0.855, 0.907, 0.896, 0.478, 0.186, 0.865, 0.853, 0.798, 0.231, 0.08, 0.878, 0.558, 0.773, 0.759, 0.144, 0.734, 0.687, 0.812, 0.413, 0.068, 0.106, 0.769, 0.38, 0.361, 0.071, 0.134, 0.373, 0.397, 0.795, 0.832, 0.696, 0.857, 0.427, 0.479, 0.713, 0.865, 0.892, 0.787, 0.842, 0.862, 0.047, 0.062, 0.032, 0.039, 0.053, 0.123, 0.086, 0.869, 0.034, 0.412, 0.658, 0.08, 0.266, 0.263, 0.553, 0.344, 0.487, 0.22, 0.717, 0.241, 0.708, 0.132, 0.748, 0.067, 0.122, 0.352, 0.458, 0.382, 0.144, 0.387, 0.458, 0.169, 0.411, 0.411, 0.405, 0.419, 0.221, 0.268, 0.41, 0.289, 0.406, 0.297, 0.129, 0.377, 0.433, 0.386, 0.422, 0.39, 0.41, 0.116, 0.402, 0.446, 0.449, 0.27, 0.451, 0.1, 0.483, 0.376, 0.322, 0.415, 0.497, 0.515, 0.122, 0.439, 0.311, 0.299, 0.291, 0.389, 0.132, 0.347, 0.368, 0.331, 0.136, 0.138, 0.13, 0.364, 0.353, 0.299, 0.284, 0.137, 0.357, 0.158, 0.328, 0.309, 0.406, 0.25, 0.381, 0.386, 0.361, 0.227, 0.129, 0.066, 0.054, 0.078, 0.224, 0.218, 0.345, 0.298, 0.316, 0.342, 0.348, 0.18, 0.351, 0.329, 0.373, 0.128, 0.335, 0.342, 0.282, 0.155, 0.326, 0.378, 0.323, 0.129, 0.38, 0.375, 0.142, 0.146, 0.14, 0.351, 0.152, 0.392, 0.343, 0.369, 0.147, 0.155, 0.337, 0.175, 0.175, 0.278, 0.358, 0.364, 0.177, 0.393, 0.285, 0.305, 0.304, 0.141, 0.33, 0.358, 0.329, 0.345, 0.338, 0.155, 0.446, 0.18, 0.352, 0.178, 0.375, 0.346, 0.391, 0.4, 0.393, 0.324, 0.31, 0.154, 0.44, 0.172, 0.138, 0.166, 0.362, 0.372, 0.259, 0.24, 0.357, 0.342, 0.096, 0.388, 0.243, 0.309, 0.34, 0.387, 0.071, 0.361, 0.35, 0.215, 0.383, 0.185, 0.088, 0.197, 0.143, 0.34, 0.25, 0.138, 0.323, 0.324, 0.262, 0.414, 0.292, 0.28, 0.302, 0.365, 0.378, 0.395, 0.305, 0.377, 0.154, 0.369, 0.22, 0.174, 0.341, 0.417, 0.306, 0.417, 0.67, 0.487, 0.587, 0.552, 0.272, 0.108, 0.394, 0.311, 0.333, 0.156, 0.357, 0.163, 0.291, 0.288, 0.169, 0.338, 0.329, 0.353, 0.153, 0.368, 0.167, 0.151, 0.331, 0.329, 0.314, 0.15, 0.361, 0.302, 0.344, 0.329, 0.381, 0.134, 0.174, 0.362, 0.346, 0.322, 0.299, 0.342, 0.166, 0.172, 0.353, 0.167, 0.187, 0.258, 0.371, 0.188, 0.357, 0.352, 0.352, 0.149, 0.164, 0.346, 0.153, 0.164, 0.336, 0.319, 0.228, 0.221, 0.324, 0.312, 0.442, 0.186, 0.288, 0.137, 0.21, 0.286, 0.318, 0.341, 0.313, 0.255, 0.32, 0.34, 0.485, 0.409, 0.246, 0.381, 0.147, 0.147, 0.322, 0.337, 0.163, 0.155, 0.169, 0.342, 0.216, 0.421, 0.356, 0.196, 0.229, 0.143, 0.301, 0.242, 0.212, 0.367, 0.256, 0.279, 0.254, 0.316, 0.277, 0.155, 0.299, 0.201, 0.312, 0.215, 0.328, 0.204, 0.203, 0.316, 0.275, 0.215, 0.18, 0.32, 0.304, 0.183, 0.251, 0.171, 0.181, 0.202, 0.298, 0.27, 0.304, 0.283, 0.187, 0.226, 0.314, 0.289, 0.342, 0.294, 0.188, 0.3, 0.312, 0.193, 0.338, 0.36, 0.25, 0.202, 0.434, 0.193, 0.178, 0.236, 0.427, 0.246, 0.4, 0.408, 0.106, 0.425, 0.358, 0.471, 0.399, 0.356, 0.385, 0.316, 0.33, 0.27, 0.522, 0.424, 0.352, 0.368, 0.206, 0.324, 0.254, 0.445, 0.934, 0.991, 0.92, 0.959, 0.963, 0.905, 0.998, 0.998, 0.59, 0.553, 0.996, 0.582, 0.634, 0.999, 0.673, 0.948, 0.996, 0.007, 0.301, 0.294, 0.85, 0.95, 0.981, 0.556, 0.827, 0.993, 0.835, 0.959, 0.988, 0.482, 0.921, 0.144, 0.176, 0.832, 0.98, 0.904, 0.994, 0.983, 0.807, 0.915, 0.947, 0.906, 0.98, 0.959, 0.667, 0.991, 0.991, 0.891, 0.998, 0.993, 0.618, 0.988, 0.983, 0.809, 0.98, 0.972, 0.404, 0.718, 0.044, 0.085, 0.857, 0.976, 0.859, 0.984, 0.988, 0.922, 0.929, 0.934, 0.956, 0.979, 0.988, 0.893, 0.999, 0.967, 0.95, 0.954, 0.989, 0.972, 1.0, 0.999, 0.077, 0.964, 0.998, 0.942, 0.976, 0.993, 0.889, 0.908, 0.929, 0.807, 0.994, 0.987, 0.712, 0.992, 0.999, 0.961, 0.987, 0.993, 0.102, 0.946, 0.773, 0.868, 0.923, 0.981, 0.742, 0.861, 0.998, 0.89, 0.966, 0.991, 0.295, 0.976, 0.991, 0.851, 0.999, 0.995, 0.902, 0.999, 0.998, 0.076, 0.991, 0.97, 0.801, 0.999, 0.622, 0.99, 0.861, 0.35, 0.631, 0.561, 0.093, 0.387, 0.793, 0.809, 0.419, 0.825, 0.661, 0.622, 0.934, 0.655, 0.787, 0.321, 0.266, 0.263, 0.269, 0.248, 0.138, 0.234, 0.127, 0.226, 0.494, 0.209, 0.456, 0.329, 0.154, 0.566, 0.837, 0.725, 0.789, 0.623, 0.15, 0.119, 0.492, 0.187, 0.544, 0.648, 0.555, 0.045, 0.491, 0.353, 0.228, 0.17, 0.245, 0.15, 0.194, 0.5, 0.441, 0.103, 0.064, 0.064, 0.481, 0.388, 0.164, 0.295, 0.321, 0.203, 0.691, 0.182, 0.64, 0.689, 0.466, 0.594, 0.102, 0.146, 0.27, 0.256, 0.128, 0.57, 0.16, 0.388, 0.324, 0.324, 0.234, 0.36, 0.249, 0.29, 0.312, 0.232, 0.201, 0.219, 0.317, 0.242, 0.527, 0.278, 0.387, 0.299, 0.451, 0.245, 0.689, 0.482, 0.337, 0.434, 0.433, 0.264, 0.102, 0.295, 0.306, 0.224, 0.976, 0.935, 0.773, 0.945, 0.946, 0.966, 0.998, 0.994, 0.996, 0.999, 0.999, 0.09, 0.623, 0.505, 0.638, 0.522, 0.808, 0.883, 0.949, 0.12, 0.088, 0.946, 0.968, 0.31, 0.86, 0.951, 0.698, 0.913, 0.465, 0.391, 0.845, 0.608, 0.469, 0.319, 0.317, 0.228, 0.188, 0.546, 0.199, 0.398, 0.465, 0.486, 0.15, 0.155, 0.129, 0.554, 0.513, 0.168, 0.475, 0.502, 0.465, 0.177, 0.424, 0.151, 0.233, 0.241, 0.424, 0.248, 0.412, 0.383, 0.433, 0.391, 0.29, 0.154, 0.345, 0.349, 0.363, 0.366, 0.368, 0.376, 0.143, 0.143, 0.166, 0.428, 0.387, 0.329, 0.167, 0.32, 0.237, 0.17, 0.178, 0.32, 0.183, 0.172, 0.19, 0.093, 0.383, 0.276, 0.26, 0.267, 0.107, 0.318, 0.266, 0.271, 0.268, 0.343, 0.346, 0.358, 0.352, 0.144, 0.351, 0.306, 0.279, 0.299, 0.327, 0.169, 0.347, 0.352, 0.46, 0.291, 0.191, 0.394, 0.386, 0.195, 0.399, 0.211, 0.119, 0.275, 0.387, 0.221, 0.215, 0.255, 0.122, 0.366, 0.37, 0.362, 0.109, 0.13, 0.274, 0.269, 0.208, 0.211, 0.256, 0.386, 0.38, 0.355, 0.363, 0.271, 0.354, 0.136, 0.36, 0.132, 0.271, 0.358, 0.25, 0.382, 0.285, 0.145, 0.288, 0.29, 0.275, 0.338, 0.359, 0.155, 0.31, 0.158, 0.194, 0.314, 0.294, 0.194, 0.349, 0.345, 0.419, 0.189, 0.362, 0.371, 0.186, 0.186, 0.201, 0.196, 0.399, 0.221, 0.227, 0.125, 0.356, 0.279, 0.135, 0.34, 0.353, 0.345, 0.12, 0.351, 0.228, 0.149, 0.253, 0.372, 0.352, 0.253, 0.229, 0.159, 0.36, 0.149, 0.495, 0.29, 0.269, 0.223, 0.217, 0.167, 0.426, 0.312, 0.175, 0.316, 0.23, 0.166, 0.191, 0.158, 0.201, 0.259, 0.231, 0.316, 0.188, 0.219, 0.196, 0.31, 0.267, 0.318, 0.268, 0.221, 0.193, 0.177, 0.277, 0.269, 0.22, 0.288, 0.292, 0.198, 0.309, 0.304, 0.179, 0.214, 0.2, 0.322, 0.192, 0.308, 0.291, 0.311, 0.284, 0.291, 0.285, 0.184, 0.263, 0.363, 0.244, 0.259, 0.199, 0.322, 0.254, 0.243, 0.279, 0.317, 0.207, 0.315, 0.257, 0.225, 0.169, 0.278, 0.268, 0.224, 0.301, 0.244, 0.28, 0.286, 0.215, 0.227, 0.367, 0.242, 0.224, 0.279, 0.273, 0.332, 0.299, 0.295, 0.201, 0.283, 0.285, 0.247, 0.314, 0.205, 0.17, 0.308, 0.322, 0.308, 0.221, 0.164, 0.315, 0.187, 0.313, 0.327, 0.297, 0.3, 0.325, 0.314, 0.329, 0.163, 0.389, 0.356, 0.334, 0.313, 0.159, 0.335, 0.36, 0.312, 0.328, 0.341, 0.165, 0.333, 0.367, 0.357, 0.358, 0.318, 0.169, 0.153, 0.41, 0.172, 0.373, 0.145, 0.143, 0.355, 0.167, 0.314, 0.33, 0.166, 0.319, 0.32, 0.29, 0.184, 0.342, 0.16, 0.328, 0.332, 0.386, 0.327, 0.174, 0.319, 0.164, 0.357, 0.221, 0.175, 0.182, 0.169, 0.326, 0.353, 0.348, 0.361, 0.156, 0.2, 0.331, 0.351, 0.224, 0.368, 0.19, 0.175, 0.363, 0.158, 0.166, 0.305, 0.344, 0.195, 0.36, 0.184, 0.43, 0.205, 0.298, 0.173, 0.197, 0.214, 0.413, 0.344, 0.181, 0.272, 0.222, 0.331, 0.225, 0.242, 0.281, 0.206, 0.335, 0.219, 0.313, 0.206, 0.303, 0.309, 0.252, 0.33, 0.25, 0.333, 0.31, 0.172, 0.232, 0.332, 0.361, 0.239, 0.166, 0.259, 0.166, 0.256, 0.289, 0.322, 0.204, 0.208, 0.294, 0.196, 0.225, 0.32, 0.313, 0.305, 0.213, 0.218, 0.281, 0.235, 0.314, 0.187, 0.273, 0.265, 0.251, 0.298, 0.165, 0.308, 0.301, 0.225, 0.275, 0.348, 0.339, 0.216];
// Calculate statistics for both score sets
const minScore = Math.min(...original_scores, ...perturbed_scores);
const maxScore = Math.max(...original_scores, ...perturbed_scores);
const avgOriginal = original_scores.reduce((a, b) => a + b, 0) / original_scores.length;
const avgPerturbed = perturbed_scores.reduce((a, b) => a + b, 0) / perturbed_scores.length;
// Calculate log likelihood for both score sets
const logLikOriginal = original_scores.reduce((sum, score) => sum + Math.log(score), 0);
const logLikPerturbed = perturbed_scores.reduce((sum, score) => sum + Math.log(score), 0);
statsEl.innerHTML = `<b>${numPositions.toLocaleString()}</b> positions · ` +
`Original avg: <b>${avgOriginal.toFixed(3)}</b> · ` +
`Perturbed avg: <b>${avgPerturbed.toFixed(3)}</b>`;
loglikEl.innerHTML = `Log Likelihood · Original: <b>${logLikOriginal.toFixed(2)}</b> · ` +
`Perturbed: <b>${logLikPerturbed.toFixed(2)}</b> · ` +
`Difference: <b>${(logLikOriginal - logLikPerturbed).toFixed(2)}</b>`;
// Calculate moving average with window size 10
function movingAverage(data, windowSize) {
const result = [];
for (let i = 0; i < data.length; i++) {
let sum = 0;
let count = 0;
const halfWindow = Math.floor(windowSize / 2);
for (let j = Math.max(0, i - halfWindow); j <= Math.min(data.length - 1, i + halfWindow); j++) {
sum += data[j];
count++;
}
result.push(sum / count);
}
return result;
}
const smoothedOriginal = movingAverage(original_scores, 10);
const smoothedPerturbed = movingAverage(perturbed_scores, 10);
// Drawing function
function draw() {
const w = canvas.width;
const h = canvas.height;
// Clear
ctx.clearRect(0, 0, w, h);
// Margins
const marginLeft = 60;
const marginRight = 20;
const marginTop = 20;
const marginBottom = 40;
const plotWidth = w - marginLeft - marginRight;
const plotHeight = h - marginTop - marginBottom;
// Draw CDS regions first (background)
ctx.fillStyle = 'rgba(59, 130, 246, 0.1)';
for (const region of cdsRegions) {
const x1 = marginLeft + (region.start / numPositions) * plotWidth;
const x2 = marginLeft + ((region.end + 1) / numPositions) * plotWidth;
ctx.fillRect(x1, marginTop, x2 - x1, plotHeight);
}
// Draw perturbed region (amber background)
ctx.fillStyle = 'rgba(184, 134, 44, 0.15)';
const pertX1 = marginLeft + (perturbedRegion.start / numPositions) * plotWidth;
const pertX2 = marginLeft + ((perturbedRegion.end + 1) / numPositions) * plotWidth;
ctx.fillRect(pertX1, marginTop, pertX2 - pertX1, plotHeight);
// Draw perturbed region border
ctx.strokeStyle = 'rgba(184, 134, 44, 0.6)';
ctx.lineWidth = 2;
ctx.strokeRect(pertX1, marginTop, pertX2 - pertX1, plotHeight);
// Draw axes
ctx.strokeStyle = '#666';
ctx.lineWidth = 1;
ctx.beginPath();
ctx.moveTo(marginLeft, marginTop);
ctx.lineTo(marginLeft, marginTop + plotHeight);
ctx.lineTo(marginLeft + plotWidth, marginTop + plotHeight);
ctx.stroke();
// Y-axis labels
ctx.fillStyle = '#666';
ctx.font = '12px monospace';
ctx.textAlign = 'right';
ctx.textBaseline = 'middle';
const yTicks = 5;
for (let i = 0; i <= yTicks; i++) {
const score = minScore + (maxScore - minScore) * (i / yTicks);
const y = marginTop + plotHeight - (i / yTicks) * plotHeight;
ctx.fillText(score.toFixed(1), marginLeft - 10, y);
// Grid line
ctx.strokeStyle = 'rgba(128, 128, 128, 0.1)';
ctx.beginPath();
ctx.moveTo(marginLeft, y);
ctx.lineTo(marginLeft + plotWidth, y);
ctx.stroke();
}
// X-axis labels
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.fillStyle = '#666';
const xTicks = 5;
for (let i = 0; i <= xTicks; i++) {
const pos = Math.floor((i / xTicks) * numPositions);
const x = marginLeft + (i / xTicks) * plotWidth;
ctx.fillText(pos.toLocaleString(), x, marginTop + plotHeight + 10);
}
// Axis labels
ctx.save();
ctx.translate(0, marginTop + plotHeight / 2);
ctx.rotate(-Math.PI / 2);
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.fillStyle = '#666';
ctx.font = '14px sans-serif';
ctx.fillText('Score', 0, 0);
ctx.restore();
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.fillText('Position', marginLeft + plotWidth / 2, marginTop + plotHeight + 25);
// Draw original scores line in green
ctx.strokeStyle = '#317f3f';
ctx.lineWidth = 2;
ctx.beginPath();
for (let i = 0; i < numPositions; i++) {
const x = marginLeft + (i / numPositions) * plotWidth;
const y = marginTop + plotHeight - ((smoothedOriginal[i] - minScore) / (maxScore - minScore)) * plotHeight;
if (i === 0) ctx.moveTo(x, y);
else ctx.lineTo(x, y);
}
ctx.stroke();
// Draw perturbed scores line in amber
ctx.strokeStyle = '#b8862c';
ctx.lineWidth = 2;
ctx.beginPath();
for (let i = 0; i < numPositions; i++) {
const x = marginLeft + (i / numPositions) * plotWidth;
const y = marginTop + plotHeight - ((smoothedPerturbed[i] - minScore) / (maxScore - minScore)) * plotHeight;
if (i === 0) ctx.moveTo(x, y);
else ctx.lineTo(x, y);
}
ctx.stroke();
// Draw original score points
ctx.fillStyle = 'rgba(49, 127, 63, 0.3)';
for (let i = 0; i < numPositions; i++) {
const x = marginLeft + (i / numPositions) * plotWidth;
const y = marginTop + plotHeight - ((original_scores[i] - minScore) / (maxScore - minScore)) * plotHeight;
ctx.beginPath();
ctx.arc(x, y, 1.5, 0, 2 * Math.PI);
ctx.fill();
}
// Draw perturbed score points
ctx.fillStyle = 'rgba(184, 134, 44, 0.3)';
for (let i = 0; i < numPositions; i++) {
const x = marginLeft + (i / numPositions) * plotWidth;
const y = marginTop + plotHeight - ((perturbed_scores[i] - minScore) / (maxScore - minScore)) * plotHeight;
ctx.beginPath();
ctx.arc(x, y, 1.5, 0, 2 * Math.PI);
ctx.fill();
}
}
// Initial draw
draw();
// Mouse interaction
let mousePos = null;
canvas.addEventListener('mousemove', (e) => {
const rect = canvas.getBoundingClientRect();
const scaleX = canvas.width / rect.width;
const scaleY = canvas.height / rect.height;
const x = (e.clientX - rect.left) * scaleX;
const y = (e.clientY - rect.top) * scaleY;
const marginLeft = 60;
const marginRight = 20;
const marginTop = 20;
const marginBottom = 40;
const plotWidth = canvas.width - marginLeft - marginRight;
const plotHeight = canvas.height - marginTop - marginBottom;
// Check if mouse is in plot area
if (x >= marginLeft && x <= marginLeft + plotWidth &&
y >= marginTop && y <= marginTop + plotHeight) {
const pos = Math.floor(((x - marginLeft) / plotWidth) * numPositions);
if (pos >= 0 && pos < numPositions) {
mousePos = pos;
// Check if in CDS
let inCds = false;
for (const region of cdsRegions) {
if (pos >= region.start && pos <= region.end) {
inCds = true;
break;
}
}
// Check if in perturbed region
const inPerturbed = pos >= perturbedRegion.start && pos <= perturbedRegion.end;
// Build tooltip
let tooltipHTML = `Position: <b>${pos}</b><br>Original: <b>${original_scores[pos].toFixed(4)}</b><br>Perturbed: <b>${perturbed_scores[pos].toFixed(4)}</b>`;
if (inCds) tooltipHTML += '<br><span style="color: #3b82f6;">CDS</span>';
if (inPerturbed) tooltipHTML += '<br><span style="color: #b8862c;">Perturbed Region</span>';
tooltip.style.display = 'block';
tooltip.style.left = e.clientX + 10 + 'px';
tooltip.style.top = e.clientY + 10 + 'px';
tooltip.innerHTML = tooltipHTML;
}
} else {
mousePos = null;
tooltip.style.display = 'none';
}
});
canvas.addEventListener('mouseleave', () => {
mousePos = null;
tooltip.style.display = 'none';
});
// Redraw on window resize
window.addEventListener('resize', draw);
})();
// ============================================================
// Widget 06b: Difference Plot (Original - Perturbed)
// ============================================================
(async function() {
const canvas = document.getElementById('hbb-diff-canvas');
const tooltip = document.getElementById('hbb-diff-tooltip');
if (!canvas) return;
const ctx = canvas.getContext('2d');
// Use the same data from the main plot
const numPositions = 2500;
// Get data from the parent scope by re-reading from the page
const scriptContent = document.scripts[document.scripts.length - 1].textContent;
// For now, we'll recalculate - in production you'd share the data properly
const original_scores = [0.251, 0.288, 0.367, 0.159, 0.167, 0.286, 0.278, 0.33, 0.329, 0.31, 0.309, 0.184, 0.197, 0.389, 0.176, 0.341, 0.328, 0.181, 0.383, 0.258, 0.396, 0.278, 0.197, 0.155, 0.4, 0.352, 0.319, 0.185, 0.321, 0.317, 0.12, 0.145, 0.187, 0.355, 0.189, 0.193, 0.237, 0.375, 0.222, 0.326, 0.209, 0.287, 0.361, 0.326, 0.29, 0.16, 0.317, 0.304, 0.17, 0.175, 0.285, 0.336, 0.332, 0.178, 0.375, 0.199, 0.363, 0.21, 0.19, 0.333, 0.235, 0.366, 0.268, 0.267, 0.193, 0.322, 0.256, 0.313, 0.312, 0.318, 0.31, 0.195, 0.185, 0.326, 0.347, 0.298, 0.363, 0.362, 0.162, 0.384, 0.157, 0.161, 0.314, 0.169, 0.335, 0.19, 0.192, 0.159, 0.303, 0.202, 0.224, 0.313, 0.304, 0.202, 0.3, 0.207, 0.376, 0.253, 0.148, 0.157, 0.315, 0.275, 0.185, 0.369, 0.295, 0.201, 0.306, 0.325, 0.221, 0.378, 0.188, 0.205, 0.185, 0.297, 0.239, 0.311, 0.221, 0.222, 0.307, 0.194, 0.278, 0.314, 0.303, 0.316, 0.288, 0.307, 0.196, 0.144, 0.327, 0.285, 0.183, 0.299, 0.134, 0.375, 0.315, 0.313, 0.329, 0.171, 0.312, 0.183, 0.294, 0.286, 0.185, 0.187, 0.328, 0.2, 0.313, 0.325, 0.317, 0.326, 0.21, 0.134, 0.37, 0.157, 0.184, 0.279, 0.271, 0.174, 0.283, 0.302, 0.187, 0.317, 0.351, 0.226, 0.312, 0.322, 0.308, 0.326, 0.414, 0.389, 0.163, 0.345, 0.171, 0.331, 0.222, 0.253, 0.345, 0.264, 0.286, 0.173, 0.373, 0.428, 0.333, 0.388, 0.336, 0.366, 0.303, 0.243, 0.165, 0.287, 0.273, 0.371, 0.391, 0.099, 0.152, 0.351, 0.284, 0.17, 0.602, 0.32, 0.17, 0.476, 0.49, 0.247, 0.274, 0.614, 0.074, 0.367, 0.424, 0.613, 0.059, 0.443, 0.358, 0.541, 0.29, 0.096, 0.16, 0.34, 0.083, 0.264, 0.121, 0.479, 0.304, 0.264, 0.177, 0.148, 0.198, 0.208, 0.353, 0.317, 0.249, 0.456, 0.335, 0.281, 0.151, 0.165, 0.371, 0.317, 0.32, 0.32, 0.344, 0.325, 0.167, 0.344, 0.155, 0.329, 0.378, 0.154, 0.171, 0.336, 0.328, 0.324, 0.186, 0.18, 0.337, 0.161, 0.153, 0.344, 0.202, 0.232, 0.297, 0.29, 0.289, 0.307, 0.319, 0.322, 0.166, 0.368, 0.306, 0.179, 0.192, 0.348, 0.345, 0.329, 0.331, 0.321, 0.18, 0.345, 0.342, 0.149, 0.356, 0.169, 0.305, 0.321, 0.175, 0.171, 0.351, 0.321, 0.308, 0.151, 0.179, 0.185, 0.177, 0.151, 0.168, 0.298, 0.32, 0.236, 0.317, 0.217, 0.379, 0.254, 0.367, 0.276, 0.336, 0.291, 0.131, 0.434, 0.326, 0.305, 0.18, 0.311, 0.233, 0.184, 0.161, 0.334, 0.182, 0.184, 0.245, 0.118, 0.25, 0.241, 0.348, 0.235, 0.294, 0.245, 0.272, 0.271, 0.275, 0.253, 0.284, 0.306, 0.269, 0.303, 0.165, 0.152, 0.375, 0.274, 0.168, 0.295, 0.172, 0.19, 0.34, 0.254, 0.26, 0.21, 0.25, 0.222, 0.382, 0.218, 0.304, 0.219, 0.194, 0.214, 0.336, 0.228, 0.244, 0.251, 0.199, 0.251, 0.286, 0.169, 0.193, 0.324, 0.319, 0.236, 0.273, 0.33, 0.195, 0.322, 0.234, 0.242, 0.197, 0.346, 0.189, 0.262, 0.26, 0.188, 0.366, 0.303, 0.266, 0.21, 0.268, 0.261, 0.237, 0.248, 0.243, 0.288, 0.261, 0.27, 0.291, 0.277, 0.222, 0.233, 0.292, 0.225, 0.36, 0.225, 0.241, 0.232, 0.291, 0.212, 0.237, 0.238, 0.224, 0.242, 0.209, 0.251, 0.278, 0.21, 0.247, 0.245, 0.226, 0.24, 0.262, 0.266, 0.223, 0.241, 0.219, 0.227, 0.213, 0.252, 0.261, 0.251, 0.231, 0.239, 0.334, 0.207, 0.266, 0.238, 0.273, 0.237, 0.212, 0.276, 0.23, 0.227, 0.236, 0.276, 0.329, 0.222, 0.245, 0.201, 0.27, 0.263, 0.372, 0.232, 0.264, 0.273, 0.244, 0.239, 0.286, 0.197, 0.303, 0.285, 0.288, 0.274, 0.375, 0.189, 0.212, 0.297, 0.31, 0.293, 0.305, 0.226, 0.228, 0.306, 0.299, 0.305, 0.23, 0.289, 0.239, 0.24, 0.241, 0.251, 0.244, 0.265, 0.217, 0.221, 0.291, 0.262, 0.324, 0.301, 0.241, 0.239, 0.284, 0.272, 0.471, 0.229, 0.247, 0.283, 0.187, 0.226, 0.319, 0.191, 0.235, 0.208, 0.278, 0.272, 0.364, 0.25, 0.253, 0.274, 0.262, 0.25, 0.365, 0.341, 0.204, 0.253, 0.292, 0.3, 0.302, 0.324, 0.251, 0.238, 0.228, 0.249, 0.226, 0.252, 0.241, 0.217, 0.253, 0.254, 0.232, 0.233, 0.275, 0.266, 0.259, 0.271, 0.237, 0.26, 0.299, 0.205, 0.241, 0.263, 0.252, 0.275, 0.221, 0.28, 0.244, 0.241, 0.226, 0.293, 0.216, 0.283, 0.209, 0.299, 0.166, 0.369, 0.27, 0.243, 0.317, 0.275, 0.898, 0.231, 0.273, 0.327, 0.393, 0.229, 0.347, 0.67, 0.971, 0.935, 0.995, 0.987, 0.917, 0.458, 0.813, 0.763, 0.923, 0.795, 0.388, 0.94, 0.996, 0.842, 0.993, 0.988, 0.94, 0.137, 0.7, 0.809, 0.832, 0.883, 0.189, 0.746, 0.994, 0.05, 0.914, 0.819, 0.339, 0.739, 0.797, 0.906, 0.937, 0.999, 0.872, 0.999, 0.996, 0.997, 0.947, 0.865, 0.808, 0.994, 0.989, 0.809, 0.857, 0.997, 0.957, 0.992, 0.994, 0.126, 0.963, 0.989, 0.95, 0.973, 0.953, 0.819, 0.955, 0.983, 0.958, 0.956, 0.933, 0.941, 0.999, 0.999, 0.856, 0.993, 0.951, 0.81, 0.993, 0.996, 0.911, 0.962, 0.983, 0.853, 0.909, 1.0, 0.952, 0.987, 0.99, 0.914, 0.998, 0.999, 1.0, 0.999, 0.963, 0.975, 0.997, 0.975, 0.992, 0.981, 0.967, 0.101, 0.927, 0.932, 0.341, 0.43, 0.274, 0.304, 0.325, 0.571, 0.818, 0.876, 0.219, 0.855, 0.962, 0.892, 0.649, 0.195, 0.778, 0.635, 0.165, 0.689, 0.535, 0.493, 0.579, 0.333, 0.468, 0.036, 0.076, 0.304, 0.382, 0.206, 0.457, 0.222, 0.576, 0.48, 0.278, 0.085, 0.557, 0.482, 0.787, 0.861, 0.654, 0.715, 0.837, 0.675, 0.672, 0.714, 0.42, 0.509, 0.147, 0.467, 0.185, 0.173, 0.44, 0.381, 0.334, 0.258, 0.232, 0.55, 0.172, 0.088, 0.342, 0.162, 0.562, 0.487, 0.341, 0.349, 0.248, 0.277, 0.206, 0.772, 0.73, 0.808, 0.232, 0.28, 0.136, 0.946, 0.896, 0.802, 0.415, 0.478, 0.808, 0.975, 0.829, 0.953, 0.605, 0.537, 0.791, 0.547, 0.778, 0.693, 0.392, 0.846, 0.689, 0.193, 0.457, 0.755, 0.023, 0.509, 0.886, 0.647, 0.424, 0.091, 0.412, 0.589, 0.084, 0.398, 0.454, 0.193, 0.345, 0.548, 0.318, 0.421, 0.12, 0.35, 0.24, 0.349, 0.391, 0.281, 0.415, 0.496, 0.438, 0.406, 0.999, 0.812, 0.93, 0.999, 0.952, 0.987, 0.997, 0.1, 0.994, 0.994, 0.919, 0.999, 0.999, 0.927, 0.99, 0.999, 0.089, 0.999, 1.0, 1.0, 0.998, 0.998, 0.552, 0.994, 0.998, 0.969, 0.997, 0.995, 0.961, 0.999, 0.999, 0.96, 1.0, 0.999, 0.968, 0.995, 0.995, 0.066, 0.2, 0.419, 0.886, 0.998, 0.998, 0.944, 0.999, 0.999, 0.927, 0.977, 0.998, 0.053, 0.83, 0.999, 0.941, 0.986, 0.995, 0.853, 0.142, 0.981, 0.978, 0.071, 0.991, 0.877, 0.881, 0.82, 0.96, 0.993, 0.988, 0.931, 0.757, 0.999, 0.922, 0.98, 0.993, 0.86, 0.942, 0.944, 0.883, 0.997, 0.998, 0.615, 0.685, 0.987, 0.959, 0.978, 0.972, 0.841, 0.995, 0.999, 0.942, 0.999, 0.997, 0.97, 0.975, 0.978, 0.061, 0.998, 1.0, 0.854, 0.999, 0.993, 0.943, 0.994, 0.985, 0.974, 1.0, 0.999, 0.096, 0.998, 1.0, 0.954, 0.932, 0.998, 0.012, 0.76, 0.84, 0.752, 0.519, 0.997, 0.919, 0.982, 0.998, 0.848, 0.923, 0.918, 0.855, 0.938, 0.993, 0.91, 0.997, 0.99, 0.84, 0.934, 0.999, 0.612, 0.251, 0.359, 0.472, 0.983, 0.999, 0.441, 0.865, 0.999, 0.916, 0.967, 0.961, 0.814, 0.746, 0.979, 0.921, 0.992, 1.0, 0.965, 0.999, 0.997, 0.961, 0.978, 0.997, 0.855, 0.989, 0.995, 0.839, 0.997, 0.986, 0.97, 0.993, 0.997, 0.8, 0.094, 0.047, 0.083, 0.97, 1.0, 0.944, 1.0, 0.999, 0.923, 0.993, 0.998, 0.871, 0.988, 0.988, 0.926, 1.0, 1.0, 0.939, 0.998, 0.958, 0.912, 0.998, 0.998, 0.957, 0.995, 0.998, 0.922, 0.981, 1.0, 0.976, 0.999, 0.997, 0.373, 0.999, 1.0, 0.976, 1.0, 1.0, 0.975, 0.999, 1.0, 0.882, 0.998, 0.995, 0.964, 1.0, 0.999, 0.981, 1.0, 0.999, 0.945, 0.924, 0.579, 0.989, 0.997, 0.997, 0.895, 0.997, 0.998, 0.988, 0.568, 0.666, 0.265, 0.537, 0.893, 0.731, 0.382, 0.73, 0.462, 0.32, 0.687, 0.784, 0.235, 0.299, 0.132, 0.474, 0.113, 0.618, 0.31, 0.467, 0.667, 0.427, 0.455, 0.664, 0.585, 0.281, 0.255, 0.199, 0.204, 0.63, 0.66, 0.209, 0.581, 0.529, 0.425, 0.597, 0.103, 0.548, 0.111, 0.512, 0.225, 0.148, 0.437, 0.144, 0.743, 0.747, 0.63, 0.112, 0.897, 0.681, 0.833, 0.646, 0.266, 0.598, 0.573, 0.902, 0.657, 0.075, 0.833, 0.761, 0.117, 0.514, 0.794, 0.694, 0.449, 0.168, 0.097, 0.396, 0.342, 0.335, 0.29, 0.242, 0.191, 0.14, 0.329, 0.722, 0.429, 0.247, 0.384, 0.745, 0.569, 0.434, 0.921, 0.786, 0.447, 0.579, 0.949, 0.675, 0.929, 0.967, 0.845, 0.893, 0.521, 0.867, 0.03, 0.069, 0.532, 0.497, 0.051, 0.872, 0.472, 0.293, 0.069, 0.189, 0.34, 0.189, 0.314, 0.351, 0.284, 0.452, 0.321, 0.144, 0.367, 0.415, 0.272, 0.069, 0.231, 0.155, 0.298, 0.411, 0.336, 0.368, 0.285, 0.34, 0.218, 0.121, 0.232, 0.474, 0.388, 0.257, 0.24, 0.256, 0.373, 0.421, 0.221, 0.287, 0.1, 0.434, 0.551, 0.445, 0.267, 0.333, 0.203, 0.568, 0.637, 0.506, 0.32, 0.407, 0.502, 0.405, 0.338, 0.273, 0.329, 0.317, 0.339, 0.133, 0.213, 0.462, 0.135, 0.281, 0.253, 0.176, 0.406, 0.318, 0.335, 0.307, 0.158, 0.352, 0.211, 0.495, 0.541, 0.101, 0.505, 0.494, 0.509, 0.492, 0.268, 0.471, 0.463, 0.464, 0.435, 0.15, 0.354, 0.394, 0.414, 0.311, 0.275, 0.421, 0.457, 0.157, 0.483, 0.528, 0.105, 0.212, 0.558, 0.543, 0.556, 0.202, 0.545, 0.505, 0.549, 0.511, 0.524, 0.518, 0.512, 0.448, 0.525, 0.183, 0.539, 0.529, 0.177, 0.54, 0.181, 0.197, 0.102, 0.179, 0.212, 0.214, 0.462, 0.511, 0.497, 0.525, 0.56, 0.209, 0.177, 0.571, 0.155, 0.545, 0.505, 0.173, 0.51, 0.183, 0.194, 0.538, 0.536, 0.082, 0.572, 0.285, 0.46, 0.114, 0.118, 0.5, 0.544, 0.198, 0.221, 0.15, 0.23, 0.468, 0.449, 0.175, 0.429, 0.143, 0.435, 0.209, 0.465, 0.28, 0.267, 0.154, 0.255, 0.2, 0.28, 0.246, 0.144, 0.128, 0.279, 0.343, 0.303, 0.444, 0.246, 0.449, 0.18, 0.531, 0.203, 0.457, 0.162, 0.264, 0.142, 0.293, 0.385, 0.307, 0.152, 0.299, 0.349, 0.364, 0.257, 0.316, 0.18, 0.352, 0.285, 0.312, 0.143, 0.36, 0.359, 0.319, 0.331, 0.381, 0.348, 0.292, 0.309, 0.316, 0.326, 0.557, 0.165, 0.228, 0.247, 0.261, 0.386, 0.119, 0.379, 0.121, 0.335, 0.169, 0.347, 0.106, 0.431, 0.208, 0.144, 0.138, 0.37, 0.228, 0.174, 0.318, 0.321, 0.156, 0.309, 0.364, 0.459, 0.316, 0.218, 0.389, 0.358, 0.663, 0.703, 0.682, 0.324, 0.124, 0.349, 0.253, 0.347, 0.442, 0.301, 0.501, 0.272, 0.189, 0.607, 0.164, 0.545, 0.167, 0.111, 0.14, 0.689, 0.489, 0.633, 0.153, 0.59, 0.29, 0.154, 0.42, 0.472, 0.482, 0.467, 0.161, 0.255, 0.613, 0.54, 0.53, 0.284, 0.09, 0.123, 0.551, 0.077, 0.12, 0.324, 0.7, 0.276, 0.082, 0.102, 0.14, 0.149, 0.225, 0.376, 0.337, 0.321, 0.315, 0.152, 0.499, 0.384, 0.363, 0.348, 0.358, 0.332, 0.484, 0.484, 0.419, 0.45, 0.332, 0.314, 0.37, 0.471, 0.096, 0.326, 0.475, 0.335, 0.329, 0.715, 0.719, 0.766, 0.728, 0.699, 0.031, 0.629, 0.834, 0.805, 0.213, 0.781, 0.852, 0.705, 0.823, 0.861, 0.832, 0.885, 0.902, 0.826, 0.852, 0.85, 0.76, 0.72, 0.707, 0.088, 0.801, 0.814, 0.111, 0.807, 0.431, 0.602, 0.649, 0.741, 0.235, 0.707, 0.898, 0.443, 0.857, 0.908, 0.899, 0.447, 0.187, 0.871, 0.86, 0.805, 0.231, 0.081, 0.882, 0.567, 0.774, 0.759, 0.144, 0.734, 0.687, 0.814, 0.411, 0.068, 0.106, 0.773, 0.393, 0.352, 0.069, 0.131, 0.367, 0.391, 0.793, 0.834, 0.694, 0.858, 0.428, 0.482, 0.708, 0.861, 0.884, 0.779, 0.838, 0.857, 0.047, 0.062, 0.032, 0.039, 0.054, 0.12, 0.081, 0.873, 0.034, 0.421, 0.652, 0.077, 0.284, 0.273, 0.574, 0.357, 0.49, 0.234, 0.681, 0.264, 0.661, 0.141, 0.73, 0.069, 0.125, 0.358, 0.456, 0.404, 0.147, 0.39, 0.467, 0.151, 0.406, 0.405, 0.399, 0.414, 0.217, 0.26, 0.434, 0.274, 0.445, 0.26, 0.123, 0.388, 0.447, 0.397, 0.428, 0.401, 0.406, 0.113, 0.409, 0.448, 0.457, 0.264, 0.449, 0.106, 0.501, 0.391, 0.294, 0.434, 0.513, 0.522, 0.127, 0.444, 0.308, 0.302, 0.306, 0.371, 0.142, 0.37, 0.384, 0.355, 0.139, 0.139, 0.132, 0.367, 0.353, 0.302, 0.319, 0.146, 0.389, 0.161, 0.348, 0.333, 0.412, 0.276, 0.389, 0.4, 0.376, 0.246, 0.127, 0.052, 0.044, 0.054, 0.268, 0.223, 0.313, 0.343, 0.297, 0.312, 0.402, 0.139, 0.304, 0.399, 0.336, 0.137, 0.296, 0.302, 0.312, 0.128, 0.368, 0.354, 0.37, 0.131, 0.364, 0.4, 0.126, 0.144, 0.139, 0.371, 0.153, 0.418, 0.377, 0.392, 0.125, 0.152, 0.29, 0.192, 0.192, 0.241, 0.389, 0.405, 0.18, 0.416, 0.264, 0.285, 0.277, 0.117, 0.318, 0.345, 0.35, 0.326, 0.32, 0.17, 0.424, 0.165, 0.385, 0.153, 0.364, 0.385, 0.382, 0.38, 0.414, 0.357, 0.337, 0.152, 0.437, 0.157, 0.134, 0.157, 0.373, 0.379, 0.258, 0.247, 0.354, 0.339, 0.091, 0.384, 0.242, 0.339, 0.345, 0.411, 0.063, 0.373, 0.343, 0.245, 0.371, 0.2, 0.072, 0.18, 0.116, 0.284, 0.305, 0.106, 0.362, 0.286, 0.24, 0.424, 0.275, 0.273, 0.287, 0.373, 0.367, 0.414, 0.321, 0.392, 0.151, 0.38, 0.218, 0.173, 0.34, 0.433, 0.303, 0.424, 0.656, 0.484, 0.591, 0.57, 0.291, 0.104, 0.403, 0.309, 0.333, 0.159, 0.365, 0.156, 0.298, 0.299, 0.163, 0.343, 0.328, 0.352, 0.14, 0.359, 0.158, 0.141, 0.352, 0.345, 0.324, 0.164, 0.354, 0.308, 0.331, 0.333, 0.389, 0.125, 0.186, 0.377, 0.323, 0.306, 0.323, 0.322, 0.146, 0.186, 0.329, 0.15, 0.204, 0.283, 0.347, 0.202, 0.33, 0.329, 0.351, 0.163, 0.183, 0.321, 0.149, 0.181, 0.331, 0.3, 0.251, 0.242, 0.301, 0.313, 0.419, 0.206, 0.299, 0.137, 0.23, 0.299, 0.339, 0.363, 0.334, 0.233, 0.34, 0.356, 0.491, 0.426, 0.234, 0.393, 0.131, 0.129, 0.341, 0.357, 0.151, 0.141, 0.157, 0.312, 0.22, 0.431, 0.355, 0.172, 0.221, 0.15, 0.306, 0.23, 0.193, 0.355, 0.271, 0.292, 0.238, 0.32, 0.286, 0.174, 0.308, 0.195, 0.301, 0.213, 0.33, 0.218, 0.222, 0.295, 0.264, 0.21, 0.189, 0.318, 0.295, 0.193, 0.249, 0.182, 0.196, 0.216, 0.298, 0.28, 0.303, 0.289, 0.18, 0.25, 0.324, 0.257, 0.348, 0.284, 0.206, 0.284, 0.307, 0.193, 0.361, 0.371, 0.299, 0.157, 0.422, 0.147, 0.213, 0.277, 0.435, 0.288, 0.418, 0.429, 0.06, 0.409, 0.487, 0.438, 0.337, 0.476, 0.539, 0.258, 0.443, 0.394, 0.57, 0.481, 0.245, 0.205, 0.112, 0.174, 0.149, 0.224, 0.955, 0.998, 0.919, 0.904, 0.979, 0.93, 0.997, 0.998, 0.334, 0.881, 0.998, 0.94, 0.539, 0.999, 0.472, 0.96, 0.996, 0.015, 0.281, 0.271, 0.85, 0.967, 0.993, 0.846, 0.904, 0.997, 0.805, 0.979, 0.993, 0.468, 0.949, 0.136, 0.199, 0.916, 0.988, 0.889, 0.988, 0.993, 0.744, 0.958, 0.979, 0.918, 0.966, 0.938, 0.493, 0.991, 0.994, 0.915, 0.999, 0.998, 0.831, 0.997, 0.996, 0.898, 0.985, 0.986, 0.43, 0.772, 0.075, 0.112, 0.881, 0.975, 0.829, 0.993, 0.996, 0.928, 0.966, 0.955, 0.926, 0.99, 0.997, 0.909, 0.999, 0.814, 0.954, 0.941, 0.994, 0.965, 1.0, 1.0, 0.039, 0.981, 0.998, 0.951, 0.97, 0.991, 0.905, 0.907, 0.967, 0.744, 0.998, 0.992, 0.566, 0.993, 1.0, 0.961, 0.988, 0.996, 0.256, 0.963, 0.914, 0.893, 0.971, 0.99, 0.78, 0.843, 1.0, 0.898, 0.974, 0.993, 0.614, 0.99, 0.997, 0.97, 0.998, 0.993, 0.9, 0.999, 0.999, 0.06, 0.995, 0.983, 0.578, 1.0, 0.789, 0.993, 0.868, 0.423, 0.668, 0.703, 0.035, 0.558, 0.826, 0.901, 0.567, 0.893, 0.533, 0.639, 0.96, 0.512, 0.894, 0.09, 0.788, 0.539, 0.341, 0.349, 0.163, 0.204, 0.155, 0.221, 0.56, 0.338, 0.463, 0.376, 0.176, 0.662, 0.892, 0.907, 0.813, 0.823, 0.117, 0.089, 0.573, 0.143, 0.676, 0.797, 0.819, 0.027, 0.67, 0.501, 0.244, 0.156, 0.53, 0.118, 0.208, 0.627, 0.474, 0.09, 0.053, 0.082, 0.71, 0.611, 0.081, 0.287, 0.4, 0.134, 0.826, 0.117, 0.858, 0.863, 0.57, 0.772, 0.079, 0.501, 0.757, 0.713, 0.459, 0.777, 0.078, 0.518, 0.377, 0.323, 0.174, 0.5, 0.598, 0.529, 0.626, 0.52, 0.35, 0.507, 0.801, 0.3, 0.829, 0.63, 0.771, 0.369, 0.441, 0.294, 0.896, 0.716, 0.453, 0.649, 0.907, 0.884, 0.034, 0.352, 0.74, 0.223, 0.93, 0.83, 0.713, 0.881, 0.938, 0.965, 0.998, 0.979, 0.971, 0.999, 0.998, 0.237, 0.768, 0.655, 0.645, 0.365, 0.737, 0.875, 0.896, 0.454, 0.4, 0.925, 0.95, 0.369, 0.919, 0.97, 0.925, 0.973, 0.846, 0.844, 0.96, 0.811, 0.752, 0.27, 0.224, 0.198, 0.1, 0.536, 0.207, 0.462, 0.353, 0.377, 0.174, 0.138, 0.136, 0.55, 0.513, 0.149, 0.596, 0.582, 0.463, 0.198, 0.431, 0.14, 0.211, 0.242, 0.413, 0.235, 0.432, 0.416, 0.447, 0.443, 0.209, 0.192, 0.366, 0.327, 0.378, 0.364, 0.393, 0.399, 0.136, 0.139, 0.148, 0.368, 0.33, 0.369, 0.155, 0.349, 0.218, 0.159, 0.171, 0.32, 0.176, 0.166, 0.207, 0.099, 0.375, 0.254, 0.289, 0.242, 0.116, 0.303, 0.285, 0.289, 0.288, 0.334, 0.347, 0.351, 0.351, 0.152, 0.347, 0.319, 0.268, 0.294, 0.324, 0.165, 0.345, 0.349, 0.455, 0.299, 0.189, 0.389, 0.38, 0.189, 0.393, 0.207, 0.119, 0.283, 0.389, 0.215, 0.22, 0.267, 0.12, 0.367, 0.372, 0.371, 0.108, 0.134, 0.276, 0.273, 0.209, 0.211, 0.262, 0.383, 0.382, 0.357, 0.36, 0.273, 0.353, 0.135, 0.364, 0.128, 0.271, 0.356, 0.253, 0.379, 0.288, 0.142, 0.292, 0.294, 0.27, 0.336, 0.357, 0.152, 0.318, 0.157, 0.188, 0.309, 0.291, 0.194, 0.347, 0.345, 0.419, 0.186, 0.361, 0.371, 0.185, 0.181, 0.205, 0.189, 0.401, 0.221, 0.222, 0.127, 0.356, 0.275, 0.132, 0.345, 0.354, 0.347, 0.121, 0.354, 0.226, 0.144, 0.255, 0.374, 0.359, 0.257, 0.225, 0.156, 0.362, 0.151, 0.498, 0.292, 0.275, 0.219, 0.212, 0.167, 0.429, 0.315, 0.169, 0.319, 0.227, 0.164, 0.19, 0.16, 0.194, 0.267, 0.229, 0.322, 0.185, 0.215, 0.187, 0.313, 0.264, 0.322, 0.262, 0.219, 0.187, 0.175, 0.275, 0.27, 0.223, 0.289, 0.288, 0.191, 0.312, 0.309, 0.176, 0.203, 0.195, 0.315, 0.188, 0.313, 0.298, 0.309, 0.288, 0.289, 0.289, 0.189, 0.267, 0.361, 0.243, 0.261, 0.195, 0.322, 0.265, 0.238, 0.275, 0.316, 0.206, 0.308, 0.254, 0.221, 0.167, 0.28, 0.267, 0.218, 0.305, 0.242, 0.271, 0.28, 0.218, 0.234, 0.353, 0.254, 0.23, 0.275, 0.27, 0.329, 0.338, 0.357, 0.249, 0.284, 0.283, 0.275, 0.319, 0.205, 0.164, 0.315, 0.324, 0.314, 0.231, 0.163, 0.312, 0.189, 0.312, 0.327, 0.288, 0.302, 0.317, 0.313, 0.331, 0.163, 0.385, 0.355, 0.334, 0.307, 0.159, 0.325, 0.362, 0.314, 0.328, 0.342, 0.167, 0.331, 0.351, 0.357, 0.358, 0.323, 0.173, 0.148, 0.404, 0.173, 0.368, 0.142, 0.145, 0.351, 0.163, 0.31, 0.324, 0.168, 0.317, 0.322, 0.286, 0.187, 0.334, 0.157, 0.329, 0.33, 0.385, 0.328, 0.17, 0.322, 0.164, 0.356, 0.217, 0.172, 0.179, 0.17, 0.323, 0.354, 0.355, 0.361, 0.153, 0.198, 0.339, 0.343, 0.224, 0.363, 0.191, 0.174, 0.362, 0.156, 0.164, 0.316, 0.345, 0.193, 0.352, 0.185, 0.429, 0.207, 0.296, 0.173, 0.196, 0.214, 0.411, 0.339, 0.182, 0.274, 0.223, 0.328, 0.232, 0.24, 0.287, 0.209, 0.334, 0.216, 0.304, 0.206, 0.301, 0.305, 0.252, 0.322, 0.258, 0.328, 0.302, 0.173, 0.232, 0.328, 0.363, 0.231, 0.167, 0.254, 0.168, 0.257, 0.275, 0.324, 0.204, 0.206, 0.295, 0.193, 0.231, 0.31, 0.311, 0.294, 0.218, 0.22, 0.287, 0.234, 0.307, 0.188, 0.277, 0.266, 0.251, 0.3, 0.166, 0.304, 0.296, 0.221, 0.282, 0.337, 0.336, 0.217];
const perturbed_scores = [0.251, 0.288, 0.367, 0.159, 0.167, 0.286, 0.278, 0.33, 0.329, 0.31, 0.309, 0.184, 0.197, 0.389, 0.176, 0.341, 0.328, 0.181, 0.383, 0.258, 0.396, 0.278, 0.197, 0.155, 0.4, 0.352, 0.319, 0.185, 0.321, 0.317, 0.12, 0.145, 0.187, 0.355, 0.189, 0.193, 0.237, 0.375, 0.222, 0.326, 0.209, 0.287, 0.361, 0.326, 0.29, 0.16, 0.317, 0.304, 0.17, 0.175, 0.285, 0.336, 0.332, 0.178, 0.375, 0.199, 0.363, 0.21, 0.19, 0.333, 0.235, 0.366, 0.268, 0.267, 0.193, 0.322, 0.256, 0.313, 0.312, 0.318, 0.31, 0.195, 0.185, 0.326, 0.347, 0.298, 0.363, 0.362, 0.162, 0.384, 0.157, 0.161, 0.314, 0.169, 0.335, 0.19, 0.192, 0.159, 0.303, 0.202, 0.224, 0.313, 0.304, 0.202, 0.3, 0.207, 0.376, 0.253, 0.148, 0.157, 0.315, 0.275, 0.185, 0.369, 0.295, 0.201, 0.306, 0.325, 0.221, 0.378, 0.188, 0.205, 0.185, 0.297, 0.239, 0.311, 0.221, 0.222, 0.307, 0.194, 0.278, 0.314, 0.303, 0.316, 0.288, 0.307, 0.196, 0.144, 0.327, 0.285, 0.183, 0.299, 0.134, 0.375, 0.315, 0.313, 0.329, 0.171, 0.312, 0.183, 0.294, 0.286, 0.185, 0.187, 0.328, 0.2, 0.313, 0.325, 0.317, 0.326, 0.21, 0.134, 0.37, 0.157, 0.184, 0.279, 0.271, 0.174, 0.283, 0.302, 0.187, 0.317, 0.351, 0.226, 0.312, 0.322, 0.308, 0.326, 0.414, 0.389, 0.163, 0.345, 0.171, 0.331, 0.222, 0.253, 0.345, 0.264, 0.286, 0.173, 0.373, 0.428, 0.333, 0.388, 0.336, 0.366, 0.303, 0.243, 0.165, 0.287, 0.273, 0.371, 0.391, 0.099, 0.152, 0.351, 0.284, 0.17, 0.602, 0.32, 0.17, 0.476, 0.49, 0.247, 0.274, 0.614, 0.074, 0.367, 0.424, 0.613, 0.059, 0.443, 0.358, 0.541, 0.29, 0.096, 0.16, 0.34, 0.083, 0.264, 0.121, 0.479, 0.304, 0.264, 0.177, 0.148, 0.198, 0.208, 0.353, 0.317, 0.249, 0.456, 0.335, 0.281, 0.151, 0.165, 0.371, 0.317, 0.32, 0.32, 0.344, 0.325, 0.167, 0.344, 0.155, 0.329, 0.378, 0.154, 0.171, 0.336, 0.328, 0.324, 0.186, 0.18, 0.337, 0.161, 0.153, 0.344, 0.202, 0.232, 0.297, 0.29, 0.289, 0.307, 0.319, 0.322, 0.166, 0.368, 0.306, 0.179, 0.192, 0.348, 0.345, 0.329, 0.331, 0.321, 0.18, 0.345, 0.342, 0.149, 0.356, 0.169, 0.305, 0.321, 0.175, 0.171, 0.351, 0.321, 0.308, 0.151, 0.179, 0.185, 0.177, 0.151, 0.168, 0.298, 0.32, 0.236, 0.317, 0.217, 0.379, 0.254, 0.367, 0.276, 0.336, 0.291, 0.131, 0.434, 0.326, 0.305, 0.18, 0.311, 0.233, 0.184, 0.161, 0.334, 0.182, 0.184, 0.245, 0.118, 0.25, 0.241, 0.348, 0.235, 0.294, 0.245, 0.272, 0.271, 0.275, 0.253, 0.284, 0.306, 0.269, 0.303, 0.165, 0.152, 0.375, 0.274, 0.168, 0.295, 0.172, 0.19, 0.34, 0.254, 0.26, 0.21, 0.25, 0.222, 0.382, 0.218, 0.304, 0.219, 0.194, 0.214, 0.336, 0.228, 0.244, 0.251, 0.199, 0.251, 0.286, 0.169, 0.193, 0.324, 0.319, 0.236, 0.273, 0.33, 0.195, 0.322, 0.234, 0.242, 0.197, 0.346, 0.189, 0.262, 0.26, 0.188, 0.366, 0.303, 0.266, 0.21, 0.268, 0.261, 0.237, 0.248, 0.243, 0.288, 0.261, 0.27, 0.291, 0.277, 0.222, 0.233, 0.292, 0.225, 0.36, 0.225, 0.241, 0.232, 0.291, 0.212, 0.237, 0.238, 0.224, 0.242, 0.209, 0.251, 0.278, 0.21, 0.247, 0.245, 0.226, 0.24, 0.262, 0.266, 0.223, 0.241, 0.219, 0.227, 0.213, 0.252, 0.261, 0.251, 0.231, 0.239, 0.334, 0.207, 0.266, 0.238, 0.273, 0.237, 0.212, 0.276, 0.23, 0.227, 0.236, 0.276, 0.329, 0.222, 0.245, 0.201, 0.27, 0.263, 0.372, 0.232, 0.264, 0.273, 0.244, 0.239, 0.286, 0.197, 0.303, 0.285, 0.288, 0.274, 0.375, 0.189, 0.212, 0.297, 0.31, 0.293, 0.305, 0.226, 0.228, 0.306, 0.299, 0.305, 0.23, 0.289, 0.239, 0.24, 0.241, 0.251, 0.244, 0.265, 0.217, 0.221, 0.291, 0.262, 0.324, 0.301, 0.241, 0.239, 0.284, 0.272, 0.471, 0.229, 0.247, 0.283, 0.187, 0.226, 0.319, 0.191, 0.235, 0.208, 0.278, 0.272, 0.364, 0.25, 0.253, 0.274, 0.262, 0.25, 0.365, 0.341, 0.204, 0.253, 0.292, 0.3, 0.302, 0.324, 0.251, 0.238, 0.228, 0.249, 0.226, 0.252, 0.241, 0.217, 0.253, 0.254, 0.232, 0.233, 0.275, 0.266, 0.259, 0.271, 0.237, 0.26, 0.299, 0.205, 0.241, 0.263, 0.252, 0.275, 0.221, 0.28, 0.244, 0.241, 0.226, 0.293, 0.216, 0.283, 0.209, 0.299, 0.166, 0.369, 0.27, 0.243, 0.317, 0.275, 0.898, 0.231, 0.273, 0.327, 0.393, 0.229, 0.347, 0.67, 0.971, 0.935, 0.995, 0.987, 0.917, 0.458, 0.813, 0.763, 0.923, 0.795, 0.388, 0.94, 0.996, 0.842, 0.993, 0.988, 0.94, 0.137, 0.7, 0.809, 0.832, 0.883, 0.189, 0.746, 0.994, 0.05, 0.914, 0.819, 0.339, 0.739, 0.797, 0.906, 0.937, 0.999, 0.872, 0.999, 0.996, 0.997, 0.947, 0.865, 0.808, 0.994, 0.989, 0.809, 0.857, 0.997, 0.957, 0.992, 0.994, 0.126, 0.963, 0.989, 0.95, 0.973, 0.953, 0.819, 0.955, 0.983, 0.958, 0.956, 0.933, 0.941, 0.999, 0.999, 0.856, 0.993, 0.951, 0.81, 0.993, 0.996, 0.911, 0.962, 0.983, 0.853, 0.909, 1.0, 0.952, 0.987, 0.99, 0.914, 0.998, 0.999, 1.0, 0.999, 0.963, 0.975, 0.997, 0.975, 0.992, 0.981, 0.967, 0.101, 0.927, 0.932, 0.341, 0.43, 0.274, 0.304, 0.325, 0.571, 0.818, 0.876, 0.219, 0.855, 0.962, 0.892, 0.649, 0.195, 0.778, 0.635, 0.165, 0.689, 0.535, 0.493, 0.579, 0.333, 0.468, 0.036, 0.076, 0.304, 0.382, 0.206, 0.457, 0.222, 0.576, 0.48, 0.278, 0.085, 0.557, 0.482, 0.787, 0.861, 0.654, 0.715, 0.837, 0.675, 0.672, 0.714, 0.42, 0.509, 0.147, 0.467, 0.185, 0.173, 0.44, 0.381, 0.334, 0.258, 0.232, 0.55, 0.172, 0.088, 0.342, 0.162, 0.562, 0.487, 0.341, 0.349, 0.248, 0.277, 0.206, 0.772, 0.73, 0.808, 0.232, 0.28, 0.136, 0.946, 0.896, 0.802, 0.415, 0.478, 0.808, 0.975, 0.829, 0.953, 0.605, 0.537, 0.791, 0.547, 0.778, 0.693, 0.392, 0.846, 0.689, 0.193, 0.457, 0.755, 0.023, 0.509, 0.031, 0.092, 0.424, 0.148, 0.165, 0.041, 0.247, 0.181, 0.127, 0.293, 0.237, 0.1, 0.564, 0.398, 0.239, 0.335, 0.269, 0.192, 0.853, 0.669, 0.557, 0.652, 0.463, 0.399, 0.91, 0.806, 0.744, 0.763, 0.657, 0.611, 0.03, 0.031, 0.832, 0.084, 0.057, 0.122, 0.156, 0.179, 0.193, 0.168, 0.364, 0.413, 0.242, 0.256, 0.169, 0.193, 0.218, 0.241, 0.232, 0.439, 0.27, 0.387, 0.206, 0.374, 0.366, 0.314, 0.434, 0.261, 0.21, 0.265, 0.259, 0.242, 0.409, 0.194, 0.147, 0.339, 0.228, 0.239, 0.271, 0.239, 0.257, 0.308, 0.311, 0.352, 0.105, 0.257, 0.305, 0.256, 0.14, 0.144, 0.25, 0.149, 0.297, 0.159, 0.153, 0.276, 0.231, 0.237, 0.363, 0.239, 0.182, 0.347, 0.253, 0.328, 0.349, 0.252, 0.315, 0.234, 0.231, 0.23, 0.162, 0.288, 0.286, 0.108, 0.089, 0.145, 0.262, 0.332, 0.451, 0.306, 0.226, 0.365, 0.198, 0.297, 0.352, 0.375, 0.317, 0.155, 0.283, 0.177, 0.947, 0.836, 0.956, 0.936, 0.809, 0.907, 0.98, 0.929, 0.885, 0.983, 0.26, 0.951, 0.885, 0.792, 0.797, 0.879, 0.074, 0.246, 0.348, 0.84, 0.923, 0.849, 0.77, 0.865, 0.988, 0.32, 0.67, 0.744, 0.715, 0.897, 0.895, 0.502, 0.761, 0.2, 0.387, 0.14, 0.994, 0.605, 0.002, 0.002, 0.003, 0.008, 0.69, 0.55, 0.398, 0.72, 0.526, 0.605, 0.759, 0.654, 0.653, 0.254, 0.604, 0.105, 0.987, 0.843, 0.99, 0.988, 0.949, 0.077, 0.496, 0.5, 0.953, 0.982, 0.565, 0.94, 0.957, 0.702, 0.689, 0.873, 0.862, 0.981, 0.008, 0.087, 0.935, 0.984, 0.741, 0.983, 0.922, 0.803, 0.9, 0.894, 0.567, 0.494, 0.922, 0.654, 0.985, 0.99, 0.911, 0.936, 0.724, 0.835, 0.976, 0.978, 0.936, 0.977, 0.987, 0.735, 0.966, 0.995, 0.887, 0.974, 0.986, 0.321, 0.982, 0.996, 0.969, 0.988, 0.996, 0.94, 0.98, 0.98, 0.814, 0.978, 0.938, 0.371, 0.996, 0.991, 0.965, 0.992, 0.997, 0.946, 0.765, 0.873, 0.974, 0.975, 0.993, 0.745, 0.99, 0.991, 0.966, 0.631, 0.329, 0.313, 0.6, 0.897, 0.851, 0.652, 0.284, 0.118, 0.111, 0.196, 0.768, 0.548, 0.092, 0.096, 0.136, 0.106, 0.443, 0.304, 0.38, 0.499, 0.328, 0.308, 0.487, 0.511, 0.309, 0.324, 0.266, 0.218, 0.438, 0.49, 0.315, 0.392, 0.4, 0.43, 0.503, 0.237, 0.525, 0.094, 0.505, 0.128, 0.101, 0.465, 0.307, 0.321, 0.176, 0.269, 0.267, 0.427, 0.62, 0.548, 0.271, 0.106, 0.294, 0.598, 0.784, 0.307, 0.207, 0.463, 0.51, 0.161, 0.483, 0.458, 0.488, 0.286, 0.292, 0.334, 0.175, 0.422, 0.316, 0.257, 0.292, 0.352, 0.371, 0.378, 0.623, 0.285, 0.235, 0.398, 0.337, 0.432, 0.194, 0.473, 0.348, 0.303, 0.311, 0.536, 0.552, 0.67, 0.533, 0.409, 0.277, 0.407, 0.504, 0.218, 0.342, 0.373, 0.413, 0.129, 0.527, 0.346, 0.244, 0.126, 0.053, 0.368, 0.286, 0.123, 0.444, 0.288, 0.186, 0.262, 0.238, 0.414, 0.217, 0.347, 0.14, 0.169, 0.132, 0.298, 0.443, 0.258, 0.312, 0.206, 0.251, 0.213, 0.176, 0.209, 0.517, 0.38, 0.232, 0.301, 0.366, 0.374, 0.363, 0.248, 0.455, 0.076, 0.429, 0.295, 0.189, 0.162, 0.231, 0.193, 0.446, 0.497, 0.405, 0.485, 0.327, 0.365, 0.295, 0.273, 0.228, 0.301, 0.279, 0.31, 0.19, 0.239, 0.424, 0.187, 0.321, 0.275, 0.229, 0.314, 0.27, 0.275, 0.236, 0.201, 0.241, 0.19, 0.356, 0.374, 0.157, 0.415, 0.355, 0.367, 0.364, 0.251, 0.368, 0.371, 0.381, 0.35, 0.205, 0.388, 0.418, 0.419, 0.235, 0.228, 0.377, 0.368, 0.162, 0.379, 0.415, 0.17, 0.161, 0.373, 0.359, 0.373, 0.183, 0.368, 0.337, 0.41, 0.338, 0.395, 0.361, 0.37, 0.552, 0.608, 0.148, 0.566, 0.539, 0.161, 0.54, 0.209, 0.243, 0.111, 0.21, 0.193, 0.198, 0.295, 0.481, 0.303, 0.383, 0.442, 0.203, 0.164, 0.485, 0.187, 0.46, 0.439, 0.197, 0.469, 0.208, 0.198, 0.462, 0.464, 0.041, 0.846, 0.088, 0.771, 0.054, 0.054, 0.414, 0.417, 0.273, 0.286, 0.151, 0.275, 0.332, 0.352, 0.226, 0.324, 0.181, 0.341, 0.233, 0.383, 0.293, 0.279, 0.169, 0.278, 0.228, 0.302, 0.28, 0.172, 0.164, 0.303, 0.363, 0.327, 0.381, 0.273, 0.388, 0.19, 0.478, 0.214, 0.401, 0.195, 0.274, 0.158, 0.258, 0.388, 0.238, 0.22, 0.228, 0.359, 0.35, 0.22, 0.292, 0.172, 0.337, 0.25, 0.279, 0.193, 0.371, 0.353, 0.283, 0.294, 0.355, 0.328, 0.275, 0.274, 0.277, 0.285, 0.587, 0.166, 0.203, 0.223, 0.234, 0.388, 0.137, 0.365, 0.151, 0.313, 0.16, 0.359, 0.148, 0.422, 0.197, 0.193, 0.184, 0.372, 0.196, 0.163, 0.319, 0.269, 0.212, 0.252, 0.319, 0.495, 0.309, 0.319, 0.35, 0.403, 0.69, 0.745, 0.741, 0.413, 0.112, 0.326, 0.224, 0.249, 0.557, 0.192, 0.6, 0.191, 0.203, 0.587, 0.175, 0.534, 0.177, 0.114, 0.133, 0.688, 0.48, 0.628, 0.139, 0.593, 0.325, 0.166, 0.406, 0.488, 0.512, 0.513, 0.135, 0.351, 0.666, 0.598, 0.593, 0.243, 0.071, 0.129, 0.622, 0.068, 0.108, 0.389, 0.734, 0.254, 0.072, 0.076, 0.108, 0.117, 0.214, 0.373, 0.328, 0.312, 0.3, 0.152, 0.493, 0.388, 0.375, 0.344, 0.321, 0.322, 0.545, 0.539, 0.436, 0.48, 0.33, 0.304, 0.392, 0.494, 0.091, 0.319, 0.499, 0.332, 0.335, 0.731, 0.73, 0.779, 0.743, 0.693, 0.031, 0.637, 0.829, 0.795, 0.218, 0.773, 0.852, 0.706, 0.826, 0.855, 0.831, 0.883, 0.901, 0.824, 0.853, 0.847, 0.758, 0.717, 0.698, 0.089, 0.794, 0.811, 0.115, 0.807, 0.424, 0.582, 0.642, 0.733, 0.24, 0.703, 0.896, 0.458, 0.855, 0.907, 0.896, 0.478, 0.186, 0.865, 0.853, 0.798, 0.231, 0.08, 0.878, 0.558, 0.773, 0.759, 0.144, 0.734, 0.687, 0.812, 0.413, 0.068, 0.106, 0.769, 0.38, 0.361, 0.071, 0.134, 0.373, 0.397, 0.795, 0.832, 0.696, 0.857, 0.427, 0.479, 0.713, 0.865, 0.892, 0.787, 0.842, 0.862, 0.047, 0.062, 0.032, 0.039, 0.053, 0.123, 0.086, 0.869, 0.034, 0.412, 0.658, 0.08, 0.266, 0.263, 0.553, 0.344, 0.487, 0.22, 0.717, 0.241, 0.708, 0.132, 0.748, 0.067, 0.122, 0.352, 0.458, 0.382, 0.144, 0.387, 0.458, 0.169, 0.411, 0.411, 0.405, 0.419, 0.221, 0.268, 0.41, 0.289, 0.406, 0.297, 0.129, 0.377, 0.433, 0.386, 0.422, 0.39, 0.41, 0.116, 0.402, 0.446, 0.449, 0.27, 0.451, 0.1, 0.483, 0.376, 0.322, 0.415, 0.497, 0.515, 0.122, 0.439, 0.311, 0.299, 0.291, 0.389, 0.132, 0.347, 0.368, 0.331, 0.136, 0.138, 0.13, 0.364, 0.353, 0.299, 0.284, 0.137, 0.357, 0.158, 0.328, 0.309, 0.406, 0.25, 0.381, 0.386, 0.361, 0.227, 0.129, 0.066, 0.054, 0.078, 0.224, 0.218, 0.345, 0.298, 0.316, 0.342, 0.348, 0.18, 0.351, 0.329, 0.373, 0.128, 0.335, 0.342, 0.282, 0.155, 0.326, 0.378, 0.323, 0.129, 0.38, 0.375, 0.142, 0.146, 0.14, 0.351, 0.152, 0.392, 0.343, 0.369, 0.147, 0.155, 0.337, 0.175, 0.175, 0.278, 0.358, 0.364, 0.177, 0.393, 0.285, 0.305, 0.304, 0.141, 0.33, 0.358, 0.329, 0.345, 0.338, 0.155, 0.446, 0.18, 0.352, 0.178, 0.375, 0.346, 0.391, 0.4, 0.393, 0.324, 0.31, 0.154, 0.44, 0.172, 0.138, 0.166, 0.362, 0.372, 0.259, 0.24, 0.357, 0.342, 0.096, 0.388, 0.243, 0.309, 0.34, 0.387, 0.071, 0.361, 0.35, 0.215, 0.383, 0.185, 0.088, 0.197, 0.143, 0.34, 0.25, 0.138, 0.323, 0.324, 0.262, 0.414, 0.292, 0.28, 0.302, 0.365, 0.378, 0.395, 0.305, 0.377, 0.154, 0.369, 0.22, 0.174, 0.341, 0.417, 0.306, 0.417, 0.67, 0.487, 0.587, 0.552, 0.272, 0.108, 0.394, 0.311, 0.333, 0.156, 0.357, 0.163, 0.291, 0.288, 0.169, 0.338, 0.329, 0.353, 0.153, 0.368, 0.167, 0.151, 0.331, 0.329, 0.314, 0.15, 0.361, 0.302, 0.344, 0.329, 0.381, 0.134, 0.174, 0.362, 0.346, 0.322, 0.299, 0.342, 0.166, 0.172, 0.353, 0.167, 0.187, 0.258, 0.371, 0.188, 0.357, 0.352, 0.352, 0.149, 0.164, 0.346, 0.153, 0.164, 0.336, 0.319, 0.228, 0.221, 0.324, 0.312, 0.442, 0.186, 0.288, 0.137, 0.21, 0.286, 0.318, 0.341, 0.313, 0.255, 0.32, 0.34, 0.485, 0.409, 0.246, 0.381, 0.147, 0.147, 0.322, 0.337, 0.163, 0.155, 0.169, 0.342, 0.216, 0.421, 0.356, 0.196, 0.229, 0.143, 0.301, 0.242, 0.212, 0.367, 0.256, 0.279, 0.254, 0.316, 0.277, 0.155, 0.299, 0.201, 0.312, 0.215, 0.328, 0.204, 0.203, 0.316, 0.275, 0.215, 0.18, 0.32, 0.304, 0.183, 0.251, 0.171, 0.181, 0.202, 0.298, 0.27, 0.304, 0.283, 0.187, 0.226, 0.314, 0.289, 0.342, 0.294, 0.188, 0.3, 0.312, 0.193, 0.338, 0.36, 0.25, 0.202, 0.434, 0.193, 0.178, 0.236, 0.427, 0.246, 0.4, 0.408, 0.106, 0.425, 0.358, 0.471, 0.399, 0.356, 0.385, 0.316, 0.33, 0.27, 0.522, 0.424, 0.352, 0.368, 0.206, 0.324, 0.254, 0.445, 0.934, 0.991, 0.92, 0.959, 0.963, 0.905, 0.998, 0.998, 0.59, 0.553, 0.996, 0.582, 0.634, 0.999, 0.673, 0.948, 0.996, 0.007, 0.301, 0.294, 0.85, 0.95, 0.981, 0.556, 0.827, 0.993, 0.835, 0.959, 0.988, 0.482, 0.921, 0.144, 0.176, 0.832, 0.98, 0.904, 0.994, 0.983, 0.807, 0.915, 0.947, 0.906, 0.98, 0.959, 0.667, 0.991, 0.991, 0.891, 0.998, 0.993, 0.618, 0.988, 0.983, 0.809, 0.98, 0.972, 0.404, 0.718, 0.044, 0.085, 0.857, 0.976, 0.859, 0.984, 0.988, 0.922, 0.929, 0.934, 0.956, 0.979, 0.988, 0.893, 0.999, 0.967, 0.95, 0.954, 0.989, 0.972, 1.0, 0.999, 0.077, 0.964, 0.998, 0.942, 0.976, 0.993, 0.889, 0.908, 0.929, 0.807, 0.994, 0.987, 0.712, 0.992, 0.999, 0.961, 0.987, 0.993, 0.102, 0.946, 0.773, 0.868, 0.923, 0.981, 0.742, 0.861, 0.998, 0.89, 0.966, 0.991, 0.295, 0.976, 0.991, 0.851, 0.999, 0.995, 0.902, 0.999, 0.998, 0.076, 0.991, 0.97, 0.801, 0.999, 0.622, 0.99, 0.861, 0.35, 0.631, 0.561, 0.093, 0.387, 0.793, 0.809, 0.419, 0.825, 0.661, 0.622, 0.934, 0.655, 0.787, 0.321, 0.266, 0.263, 0.269, 0.248, 0.138, 0.234, 0.127, 0.226, 0.494, 0.209, 0.456, 0.329, 0.154, 0.566, 0.837, 0.725, 0.789, 0.623, 0.15, 0.119, 0.492, 0.187, 0.544, 0.648, 0.555, 0.045, 0.491, 0.353, 0.228, 0.17, 0.245, 0.15, 0.194, 0.5, 0.441, 0.103, 0.064, 0.064, 0.481, 0.388, 0.164, 0.295, 0.321, 0.203, 0.691, 0.182, 0.64, 0.689, 0.466, 0.594, 0.102, 0.146, 0.27, 0.256, 0.128, 0.57, 0.16, 0.388, 0.324, 0.324, 0.234, 0.36, 0.249, 0.29, 0.312, 0.232, 0.201, 0.219, 0.317, 0.242, 0.527, 0.278, 0.387, 0.299, 0.451, 0.245, 0.689, 0.482, 0.337, 0.434, 0.433, 0.264, 0.102, 0.295, 0.306, 0.224, 0.976, 0.935, 0.773, 0.945, 0.946, 0.966, 0.998, 0.994, 0.996, 0.999, 0.999, 0.09, 0.623, 0.505, 0.638, 0.522, 0.808, 0.883, 0.949, 0.12, 0.088, 0.946, 0.968, 0.31, 0.86, 0.951, 0.698, 0.913, 0.465, 0.391, 0.845, 0.608, 0.469, 0.319, 0.317, 0.228, 0.188, 0.546, 0.199, 0.398, 0.465, 0.486, 0.15, 0.155, 0.129, 0.554, 0.513, 0.168, 0.475, 0.502, 0.465, 0.177, 0.424, 0.151, 0.233, 0.241, 0.424, 0.248, 0.412, 0.383, 0.433, 0.391, 0.29, 0.154, 0.345, 0.349, 0.363, 0.366, 0.368, 0.376, 0.143, 0.143, 0.166, 0.428, 0.387, 0.329, 0.167, 0.32, 0.237, 0.17, 0.178, 0.32, 0.183, 0.172, 0.19, 0.093, 0.383, 0.276, 0.26, 0.267, 0.107, 0.318, 0.266, 0.271, 0.268, 0.343, 0.346, 0.358, 0.352, 0.144, 0.351, 0.306, 0.279, 0.299, 0.327, 0.169, 0.347, 0.352, 0.46, 0.291, 0.191, 0.394, 0.386, 0.195, 0.399, 0.211, 0.119, 0.275, 0.387, 0.221, 0.215, 0.255, 0.122, 0.366, 0.37, 0.362, 0.109, 0.13, 0.274, 0.269, 0.208, 0.211, 0.256, 0.386, 0.38, 0.355, 0.363, 0.271, 0.354, 0.136, 0.36, 0.132, 0.271, 0.358, 0.25, 0.382, 0.285, 0.145, 0.288, 0.29, 0.275, 0.338, 0.359, 0.155, 0.31, 0.158, 0.194, 0.314, 0.294, 0.194, 0.349, 0.345, 0.419, 0.189, 0.362, 0.371, 0.186, 0.186, 0.201, 0.196, 0.399, 0.221, 0.227, 0.125, 0.356, 0.279, 0.135, 0.34, 0.353, 0.345, 0.12, 0.351, 0.228, 0.149, 0.253, 0.372, 0.352, 0.253, 0.229, 0.159, 0.36, 0.149, 0.495, 0.29, 0.269, 0.223, 0.217, 0.167, 0.426, 0.312, 0.175, 0.316, 0.23, 0.166, 0.191, 0.158, 0.201, 0.259, 0.231, 0.316, 0.188, 0.219, 0.196, 0.31, 0.267, 0.318, 0.268, 0.221, 0.193, 0.177, 0.277, 0.269, 0.22, 0.288, 0.292, 0.198, 0.309, 0.304, 0.179, 0.214, 0.2, 0.322, 0.192, 0.308, 0.291, 0.311, 0.284, 0.291, 0.285, 0.184, 0.263, 0.363, 0.244, 0.259, 0.199, 0.322, 0.254, 0.243, 0.279, 0.317, 0.207, 0.315, 0.257, 0.225, 0.169, 0.278, 0.268, 0.224, 0.301, 0.244, 0.28, 0.286, 0.215, 0.227, 0.367, 0.242, 0.224, 0.279, 0.273, 0.332, 0.299, 0.295, 0.201, 0.283, 0.285, 0.247, 0.314, 0.205, 0.17, 0.308, 0.322, 0.308, 0.221, 0.164, 0.315, 0.187, 0.313, 0.327, 0.297, 0.3, 0.325, 0.314, 0.329, 0.163, 0.389, 0.356, 0.334, 0.313, 0.159, 0.335, 0.36, 0.312, 0.328, 0.341, 0.165, 0.333, 0.367, 0.357, 0.358, 0.318, 0.169, 0.153, 0.41, 0.172, 0.373, 0.145, 0.143, 0.355, 0.167, 0.314, 0.33, 0.166, 0.319, 0.32, 0.29, 0.184, 0.342, 0.16, 0.328, 0.332, 0.386, 0.327, 0.174, 0.319, 0.164, 0.357, 0.221, 0.175, 0.182, 0.169, 0.326, 0.353, 0.348, 0.361, 0.156, 0.2, 0.331, 0.351, 0.224, 0.368, 0.19, 0.175, 0.363, 0.158, 0.166, 0.305, 0.344, 0.195, 0.36, 0.184, 0.43, 0.205, 0.298, 0.173, 0.197, 0.214, 0.413, 0.344, 0.181, 0.272, 0.222, 0.331, 0.225, 0.242, 0.281, 0.206, 0.335, 0.219, 0.313, 0.206, 0.303, 0.309, 0.252, 0.33, 0.25, 0.333, 0.31, 0.172, 0.232, 0.332, 0.361, 0.239, 0.166, 0.259, 0.166, 0.256, 0.289, 0.322, 0.204, 0.208, 0.294, 0.196, 0.225, 0.32, 0.313, 0.305, 0.213, 0.218, 0.281, 0.235, 0.314, 0.187, 0.273, 0.265, 0.251, 0.298, 0.165, 0.308, 0.301, 0.225, 0.275, 0.348, 0.339, 0.216];
// Calculate differences
const differences = [];
for (let i = 0; i < numPositions; i++) {
differences.push(original_scores[i] - perturbed_scores[i]);
}
const minDiff = Math.min(...differences);
const maxDiff = Math.max(...differences);
// CDS and perturbed regions (same as main plot)
const cdsRegions = [
{ start: 551, end: 642 },
{ start: 773, end: 995 },
{ start: 1846, end: 1974 }
];
const perturbedRegion = { start: 750, end: 780 };
// Calculate moving average
function movingAverage(data, windowSize) {
const result = [];
for (let i = 0; i < data.length; i++) {
let sum = 0;
let count = 0;
const halfWindow = Math.floor(windowSize / 2);
for (let j = Math.max(0, i - halfWindow); j <= Math.min(data.length - 1, i + halfWindow); j++) {
sum += data[j];
count++;
}
result.push(sum / count);
}
return result;
}
const smoothedDiff = movingAverage(differences, 10);
// Drawing function
function draw() {
const w = canvas.width;
const h = canvas.height;
ctx.clearRect(0, 0, w, h);
const marginLeft = 60;
const marginRight = 20;
const marginTop = 20;
const marginBottom = 40;
const plotWidth = w - marginLeft - marginRight;
const plotHeight = h - marginTop - marginBottom;
// Draw CDS regions
ctx.fillStyle = 'rgba(59, 130, 246, 0.1)';
for (const region of cdsRegions) {
const x1 = marginLeft + (region.start / numPositions) * plotWidth;
const x2 = marginLeft + ((region.end + 1) / numPositions) * plotWidth;
ctx.fillRect(x1, marginTop, x2 - x1, plotHeight);
}
// Draw perturbed region
ctx.fillStyle = 'rgba(184, 134, 44, 0.15)';
const pertX1 = marginLeft + (perturbedRegion.start / numPositions) * plotWidth;
const pertX2 = marginLeft + ((perturbedRegion.end + 1) / numPositions) * plotWidth;
ctx.fillRect(pertX1, marginTop, pertX2 - pertX1, plotHeight);
ctx.strokeStyle = 'rgba(184, 134, 44, 0.6)';
ctx.lineWidth = 2;
ctx.strokeRect(pertX1, marginTop, pertX2 - pertX1, plotHeight);
// Fixed y-axis range
const yMin = -0.2;
const yMax = 0.8;
// Draw zero line (emphasized)
const zeroY = marginTop + plotHeight - ((0 - yMin) / (yMax - yMin)) * plotHeight;
ctx.strokeStyle = '#666';
ctx.lineWidth = 1.5;
ctx.setLineDash([]);
ctx.beginPath();
ctx.moveTo(marginLeft, zeroY);
ctx.lineTo(marginLeft + plotWidth, zeroY);
ctx.stroke();
// Draw axes
ctx.strokeStyle = '#666';
ctx.lineWidth = 1;
ctx.beginPath();
ctx.moveTo(marginLeft, marginTop);
ctx.lineTo(marginLeft, marginTop + plotHeight);
ctx.lineTo(marginLeft + plotWidth, marginTop + plotHeight);
ctx.stroke();
// Y-axis labels with fixed range
ctx.fillStyle = '#666';
ctx.font = '12px monospace';
ctx.textAlign = 'right';
ctx.textBaseline = 'middle';
const yTickValues = [-0.2, 0, 0.2, 0.4, 0.6, 0.8];
for (const tickValue of yTickValues) {
const y = marginTop + plotHeight - ((tickValue - yMin) / (yMax - yMin)) * plotHeight;
// Emphasize zero label
if (tickValue === 0) {
ctx.font = 'bold 12px monospace';
ctx.fillText(tickValue.toFixed(1), marginLeft - 10, y);
ctx.font = '12px monospace';
} else {
ctx.fillText(tickValue.toFixed(1), marginLeft - 10, y);
}
// Grid lines
ctx.strokeStyle = 'rgba(128, 128, 128, 0.1)';
ctx.beginPath();
ctx.moveTo(marginLeft, y);
ctx.lineTo(marginLeft + plotWidth, y);
ctx.stroke();
}
// X-axis labels
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.fillStyle = '#666';
const xTicks = 5;
for (let i = 0; i <= xTicks; i++) {
const pos = Math.floor((i / xTicks) * numPositions);
const x = marginLeft + (i / xTicks) * plotWidth;
ctx.fillText(pos.toLocaleString(), x, marginTop + plotHeight + 10);
}
// Axis labels
ctx.save();
ctx.translate(0, marginTop + plotHeight / 2);
ctx.rotate(-Math.PI / 2);
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.fillStyle = '#666';
ctx.font = '14px sans-serif';
ctx.fillText('Score Difference', 0, 0);
ctx.restore();
ctx.textAlign = 'center';
ctx.textBaseline = 'top';
ctx.fillText('Position', marginLeft + plotWidth / 2, marginTop + plotHeight + 25);
// Draw difference line with dark gray color
ctx.strokeStyle = '#4a4a4a';
ctx.lineWidth = 2;
ctx.beginPath();
for (let i = 0; i < numPositions; i++) {
const x = marginLeft + (i / numPositions) * plotWidth;
const y = marginTop + plotHeight - ((smoothedDiff[i] - yMin) / (yMax - yMin)) * plotHeight;
if (i === 0) ctx.moveTo(x, y);
else ctx.lineTo(x, y);
}
ctx.stroke();
// Draw difference points
ctx.fillStyle = 'rgba(74, 74, 74, 0.3)';
for (let i = 0; i < numPositions; i++) {
const x = marginLeft + (i / numPositions) * plotWidth;
const y = marginTop + plotHeight - ((differences[i] - yMin) / (yMax - yMin)) * plotHeight;
ctx.beginPath();
ctx.arc(x, y, 1.5, 0, 2 * Math.PI);
ctx.fill();
}
}
draw();
// Mouse interaction
let mousePos = null;
canvas.addEventListener('mousemove', (e) => {
const rect = canvas.getBoundingClientRect();
const scaleX = canvas.width / rect.width;
const scaleY = canvas.height / rect.height;
const x = (e.clientX - rect.left) * scaleX;
const y = (e.clientY - rect.top) * scaleY;
const marginLeft = 60;
const marginRight = 20;
const marginTop = 20;
const marginBottom = 40;
const plotWidth = canvas.width - marginLeft - marginRight;
const plotHeight = canvas.height - marginTop - marginBottom;
if (x >= marginLeft && x <= marginLeft + plotWidth &&
y >= marginTop && y <= marginTop + plotHeight) {
const pos = Math.floor(((x - marginLeft) / plotWidth) * numPositions);
if (pos >= 0 && pos < numPositions) {
mousePos = pos;
const inCds = cdsRegions.some(r => pos >= r.start && pos <= r.end);
const inPerturbed = pos >= perturbedRegion.start && pos <= perturbedRegion.end;
let tooltipHTML = `Position: <b>${pos}</b><br>Difference: <b>${differences[pos].toFixed(4)}</b>`;
if (inCds) tooltipHTML += '<br><span style="color: #3b82f6;">CDS</span>';
if (inPerturbed) tooltipHTML += '<br><span style="color: #b8862c;">Perturbed Region</span>';
tooltip.style.display = 'block';
tooltip.style.left = e.clientX + 10 + 'px';
tooltip.style.top = e.clientY + 10 + 'px';
tooltip.innerHTML = tooltipHTML;
}
} else {
mousePos = null;
tooltip.style.display = 'none';
}
});
canvas.addEventListener('mouseleave', () => {
mousePos = null;
tooltip.style.display = 'none';
});
window.addEventListener('resize', draw);
})();
</script>
</body>
</html>