MAIDR Documentation - v4.4.0
    Preparing search index...
    • Binds a D3.js Manhattan plot to MAIDR.

      A Manhattan plot is a scatter of -log10(p) against genomic position, drawn with tens of thousands of points of which a few dozen matter. The question a reader asks it is never "what is at this coordinate" — it is "which points cross the line, and what are they called", so the two accessors that answer that (label, group) and the significance cutoff are what this binder adds to bindD3Scatter.

      All three are optional, and the chart still reads without them: the trace simply reports no findings when no cutoff was declared, rather than guessing one. It is worth supplying them — the cutoff is the whole reason the chart was drawn, and it is written nowhere a screen reader can reach.

      Parameters

      • svg: Element

        The SVG element containing the D3 Manhattan plot.

      • config: D3ManhattanConfig

        Configuration specifying the selector, accessors and cutoff.

      Returns D3BinderResult

      A D3BinderResult with the MAIDR data and generated layer.

      bindD3Manhattan(svgElement, {
      selector: 'circle.snp',
      title: 'Genome-wide Association',
      axes: { x: 'Position', y: '-log10(p)', fill: 'Chromosome' },
      x: 'pos',
      y: 'logP',
      label: 'snp',
      group: 'chromosome',
      significance: 7.3,
      });