All files / src/analysis/run index.ts

100% Statements 47/47
100% Branches 0/0
100% Functions 0/0
100% Lines 47/47

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73                              2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x                     2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x  
/**
 * Every task's runner, by task id.
 *
 * The worker's whole dispatch: a `run` request names a task, this map says what
 * to call. It is the **worker-side** half of the split `analysis/job.ts`
 * describes — the descriptors in `analysis/tasks/` are imported by the panel and
 * the registry on the main thread, and nothing in that half names `MetaCooler`.
 *
 * A task id present here and absent from `analysis/registry.ts` is a task that
 * can be run and never offered; the reverse is a row that fails the moment it is
 * clicked. `test/unit/analysis-registry.test.ts` asserts the two agree, because
 * neither mistake is visible in either file.
 */
 
import type { TaskRunner } from '../job'
import { runApa } from './apa'
import { runArrowhead } from './arrowhead'
import { runCellQc } from './cellqc'
import { runChromosight } from './chromosight'
import { runCisTrans } from './cistrans'
import { runCompartments } from './compartments'
import { runDi } from './di'
import { runHicScore } from './hicscore'
import { runHiccups } from './hiccups'
import { runScalogram } from './scalogram'
import { runHicrep } from './hicrep'
import { runCoverage } from './coverage'
import { runExpected } from './expected'
import { runPairsQc } from './pairsqc'
import { runFourC } from './fourc'
import { runInsulation } from './insulation'
import { runInterArm } from './interarm'
import { runMapReport } from './mapreport'
import { runReconstruct, runSpatialTracks, runStructureMap } from './structure'
import { runMagNetwork, runMagPurity, runMagQc, runMagSplit } from './mags'
 
/**
 * Real runners only, and deliberately never stubbed with a fake.
 *
 * A placeholder runner that returned an empty result would make the worker, the
 * runner and the panel all appear to work while producing nothing — which is the
 * one failure mode this subtree is least able to notice, because every layer
 * would report success. An unknown id raises instead, naming itself, which is
 * what `analysis.worker.ts` does with it.
 */
export const RUNNERS: Record<string, TaskRunner> = {
  expected: runExpected,
  pairsqc: runPairsQc,
  mapreport: runMapReport,
  coverage: runCoverage,
  cistrans: runCisTrans,
  cellqc: runCellQc,
  insulation: runInsulation,
  di: runDi,
  hicscore: runHicScore,
  arrowhead: runArrowhead,
  scalogram: runScalogram,
  fourc: runFourC,
  apa: runApa,
  loops: runHiccups,
  chromosight: runChromosight,
  compartments: runCompartments,
  interarm: runInterArm,
  hicrep: runHicrep,
  structuremap: runStructureMap,
  spatialtracks: runSpatialTracks,
  reconstruct3d: runReconstruct,
  magqc: runMagQc,
  magnetwork: runMagNetwork,
  magpurity: runMagPurity,
  magsplit: runMagSplit,
}