INNER CODE UNIT · JavaScript

groupFor

oncologylab/fp-tools · src/fp_tools/resources/static_browser/app.js:102

function groupFor(motif) {
  if (!motif.significant) return "n.s.";
  return motif.effect >= 0 ? `${state.first}_up` : `${state.second}_up`;
}
function downloadBlob(blob, name) {
  const url = URL.createObjectURL(blob),
    anchor = document.createElement("a");
  anchor.href = url;
  anchor.download = name;
  document.body.appendChild(anchor);
  anchor.click();
  anchor.remove();
  setTimeout(() => URL.revokeObjectURL(url), 1000);
}
async function fetchJson(path) {
  const response = await fetch(path);
  if (!response.ok) throw new Error(`${path}: HTTP ${response.status}`);
  return response.json();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…