INNER CODE UNIT · JavaScript

colorFor

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

function colorFor(motif) {
  if (!motif.significant) return state.colors.neutral;
  return motif.effect >= 0 ? state.colors.first : state.colors.second;
}
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);
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…