view x/static/js/5727.f7a524b6.chunk.js.map @ 125:49f3d3878413 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author fubar
date Sat, 05 Oct 2024 23:58:05 +0000
parents
children
line wrap: on
line source

{"version":3,"file":"static/js/5727.f7a524b6.chunk.js","mappings":"8MAgCA,SAASA,EAAOC,EAAYC,GAC1B,MAAMC,EAAOF,EAAEG,IAAI,QACnB,OAAOD,EAAOA,EAAKD,GAAOD,EAAEG,IAAIF,EAClC,CAqCO,SAASG,EAAgBC,EAAgBC,GAC9C,MAAMC,EAAOF,EAAMF,IAAI,OACvB,GAAII,EACF,OAAO,IAAIC,IACTD,EACGE,KAAIC,IAAOC,EAAAA,EAAAA,GAAcD,KACzBE,OAAOC,EAAAA,UACPJ,KAAIK,GAAO,CAACA,EAAIC,aAAcD,MACjCX,IAAI,GAAGG,EAAMH,IAAI,cAAcG,EAAMH,IAAI,SAAW,IAG1D,C,0BChFO,MAAMa,EACP,CACFC,KAAM,KACNC,KAAM,KAENC,KAAM,KACNC,KAAM,KAENC,KAAM,KACNC,KAAM,KAENC,KAAM,KACNC,KAAM,MAgCGC,EAAU,CACrBC,GAAI,gBACJC,GAAI,gBACJC,GAAI,gBACJC,GAAI,iBASOC,EAAc,CACzBC,6BAA6BC,EAAAA,EAAAA,IAAM,UAAW,IAC9CC,6BAA6BD,EAAAA,EAAAA,IAAM,UAAW,IAC9CE,kBAAkBF,EAAAA,EAAAA,IAAM,UAAW,IACnCG,kBAAkBH,EAAAA,EAAAA,IAAM,UAAW,IACnCI,wBAAwBJ,EAAAA,EAAAA,IAAM,UAAW,IACzCK,wBAAwBL,EAAAA,EAAAA,IAAM,UAAW,IACzCM,oBAAoBN,EAAAA,EAAAA,IAAM,UAAW,IACrCO,oBAAoBP,EAAAA,EAAAA,IAAM,UAAW,IACrCQ,eAAeR,EAAAA,EAAAA,IAAM,UAAW,IAChCS,eAAeT,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C,UAAUrC,GACpBO,YAAahF,IAAOmB,EAAe,GAAK,EACxCkE,QAASA,KACP,MAAMC,EAAgB9G,EAAQ+G,YAC5B,uBACA,iBACA,CACEC,YAAaQ,EAActL,IAAIsF,IAAK0F,WAGxClH,EAAQoH,aAAaN,EAAc,EAErCO,YAAaA,KACXzE,EAAgBpB,EAAG,EAErB8F,WAAYA,KACV1E,OAAgBpC,EAAU,IAIlC,CACA,OAAO8C,CAAG,IAIlB,ICtFA,GA5BgB/D,EAAAA,EAAAA,WAAS,SAAUkK,GAMjC,MAAM,MAAEjK,EAAK,QAAEC,GAAYgK,EACrBpE,EAAS7F,EAAMkK,iBAAiBjK,GAGtC,MAAwB,oBAApB4F,EAAO,IAAIsE,KACNxG,EAAAA,cAACyG,EAAyBH,GAIN,iBAApBpE,EAAO,IAAIsE,KACXnK,EAAMqK,kBAAkBpK,GAC7B0D,EAAAA,cAAC2G,EAAmBL,GAClBjK,EAAMuK,kBAAkBtK,GAC1B0D,EAAAA,cAAC6G,EAAmBP,GAEpBtG,EAAAA,cAAC8G,EAAcR,GAGV,IAEX,G","sources":["../../../plugins/breakpoint-split-view/src/BreakpointSplitView/components/util.ts","../../../plugins/breakpoint-split-view/src/BreakpointSplitView/components/getOrientationColor.tsx","../../../plugins/breakpoint-split-view/src/BreakpointSplitView/components/AlignmentConnections.tsx","../../../plugins/breakpoint-split-view/src/BreakpointSplitView/components/Breakends.tsx","../../../plugins/breakpoint-split-view/src/BreakpointSplitView/components/Translocations.tsx","../../../plugins/breakpoint-split-view/src/BreakpointSplitView/components/PairedFeatures.tsx","../../../plugins/breakpoint-split-view/src/BreakpointSplitView/components/Overlay.tsx"],"sourcesContent":["import { Feature, notEmpty } from '@jbrowse/core/util'\n\nimport { parseBreakend } from '@gmod/vcf'\n\n// this finds candidate alignment features, aimed at plotting split reads from\n// BAM/CRAM files\nexport function getBadlyPairedAlignments(features: Map<string, Feature>) {\n  const candidates = new Map<string, Feature[]>()\n  const alreadySeen = new Set<string>()\n\n  // this finds candidate features that share the same name\n  for (const feature of features.values()) {\n    const flags = feature.get('flags')\n    const id = feature.id()\n    const unmapped = flags & 4\n    const correctlyPaired = flags & 2\n\n    if (!alreadySeen.has(id) && !correctlyPaired && !unmapped) {\n      const n = feature.get('name')\n      let val = candidates.get(n)\n      if (!val) {\n        val = []\n        candidates.set(n, val)\n      }\n      val.push(feature)\n    }\n    alreadySeen.add(feature.id())\n  }\n\n  return [...candidates.values()].filter(v => v.length > 1)\n}\n\nfunction getTag(f: Feature, tag: string) {\n  const tags = f.get('tags')\n  return tags ? tags[tag] : f.get(tag)\n}\n\n// this finds candidate alignment features, aimed at plotting split reads from\n// BAM/CRAM files\nexport function getMatchedAlignmentFeatures(features: Map<string, Feature>) {\n  const candidates = new Map<string, Feature[]>()\n  const alreadySeen = new Set<string>()\n\n  // this finds candidate features that share the same name\n  for (const feature of features.values()) {\n    const id = feature.id()\n    const unmapped = feature.get('flags') & 4\n    const hasSA = !!getTag(feature, 'SA')\n    if (!alreadySeen.has(id) && !unmapped && hasSA) {\n      const n = feature.get('name')\n      let val = candidates.get(n)\n      if (!val) {\n        val = []\n        candidates.set(n, val)\n      }\n      val.push(feature)\n    }\n    alreadySeen.add(feature.id())\n  }\n\n  return [...candidates.values()].filter(v => v.length > 1)\n}\n\nexport function hasPairedReads(features: Map<string, Feature>) {\n  for (const f of features.values()) {\n    if (f.get('flags') & 1) {\n      return true\n    }\n  }\n  return false\n}\n\nexport function findMatchingAlt(feat1: Feature, feat2: Feature) {\n  const alts = feat1.get('ALT') as string[] | undefined\n  if (alts) {\n    return new Map(\n      alts\n        .map(alt => parseBreakend(alt))\n        .filter(notEmpty)\n        .map(bnd => [bnd.MatePosition, bnd]),\n    ).get(`${feat2.get('refName')}:${feat2.get('start') + 1}`)\n  }\n  return undefined\n}\n\n// Returns paired BND features across multiple views by inspecting the ALT\n// field to get exact coordinate matches\nexport function getMatchedBreakendFeatures(feats: Map<string, Feature>) {\n  const candidates = new Map<string, Feature[]>()\n  const alreadySeen = new Set<string>()\n\n  for (const f of feats.values()) {\n    if (!alreadySeen.has(f.id()) && f.get('type') === 'breakend') {\n      const alts = f.get('ALT') as string[] | undefined\n      alts?.forEach(a => {\n        const cur = `${f.get('refName')}:${f.get('start') + 1}`\n        const bnd = parseBreakend(a)\n        if (bnd) {\n          const val = candidates.get(cur)\n          if (!val) {\n            candidates.set(bnd.MatePosition || 'none', [f])\n          } else {\n            val.push(f)\n          }\n        }\n      })\n    }\n    alreadySeen.add(f.id())\n  }\n\n  return [...candidates.values()].filter(v => v.length > 1)\n}\n\n// Getting \"matched\" TRA means just return all TRA\nexport function getMatchedTranslocationFeatures(feats: Map<string, Feature>) {\n  const ret: Feature[][] = []\n  const alreadySeen = new Set<string>()\n\n  for (const f of feats.values()) {\n    if (!alreadySeen.has(f.id()) && f.get('ALT')[0] === '<TRA>') {\n      ret.push([f])\n    }\n    alreadySeen.add(f.id())\n  }\n\n  return ret\n}\n\n// Getting \"matched\" TRA means just return all TRA\nexport function getMatchedPairedFeatures(feats: Map<string, Feature>) {\n  const candidates = new Map<string, Feature[]>()\n  const alreadySeen = new Set<string>()\n\n  for (const f of feats.values()) {\n    if (!alreadySeen.has(f.id()) && f.get('type') === 'paired_feature') {\n      const r1 = f.id().replace('-r1', '')\n      const r2 = f.id().replace('-r2', '')\n      if (f.id().endsWith('-r1')) {\n        if (!candidates.get(r1)) {\n          candidates.set(r1, [])\n        }\n        candidates.get(r1)!.push(f)\n      } else if (f.id().endsWith('-r2')) {\n        if (!candidates.get(r2)) {\n          candidates.set(r2, [])\n        }\n        candidates.get(r2)!.push(f)\n      }\n    }\n    alreadySeen.add(f.id())\n  }\n\n  return [...candidates.values()].filter(v => v.length > 1)\n}\n","import { alpha } from '@mui/material'\n// orientation definitions from igv.js, see also\n// https://software.broadinstitute.org/software/igv/interpreting_pair_orientations\nexport const orientationTypes = {\n  fr: {\n    F1R2: 'LR',\n    F2R1: 'LR',\n\n    F1F2: 'LL',\n    F2F1: 'LL',\n\n    R1R2: 'RR',\n    R2R1: 'RR',\n\n    R1F2: 'RL',\n    R2F1: 'RL',\n  } as Record<string, string>,\n\n  rf: {\n    R1F2: 'LR',\n    R2F1: 'LR',\n\n    R1R2: 'LL',\n    R2R1: 'LL',\n\n    F1F2: 'RR',\n    F2F1: 'RR',\n\n    F1R2: 'RL',\n    F2R1: 'RL',\n  } as Record<string, string>,\n\n  ff: {\n    F2F1: 'LR',\n    R1R2: 'LR',\n\n    F2R1: 'LL',\n    R1F2: 'LL',\n\n    R2F1: 'RR',\n    F1R2: 'RR',\n\n    R2R1: 'RL',\n    F1F2: 'RL',\n  } as Record<string, string>,\n}\n\nexport const pairMap = {\n  LR: 'color_pair_lr',\n  LL: 'color_pair_ll',\n  RR: 'color_pair_rr',\n  RL: 'color_pair_rl',\n} as const\n\n// manually calculated by running\n// const color = require('color')\n// Object.fromEntries(Object.entries(fillColor).map(([key,val])=>{\n//   return [key, color(val).darken('0.3').hex()]\n// }))\n// this avoids (expensive) use of Color module at runtime\nexport const strokeColor = {\n  color_fwd_strand_not_proper: alpha('#CA6767', 0.8),\n  color_rev_strand_not_proper: alpha('#7272AA', 0.8),\n  color_fwd_strand: alpha('#DC2A2A', 0.8),\n  color_rev_strand: alpha('#4141BA', 0.8),\n  color_fwd_missing_mate: alpha('#921111', 0.8),\n  color_rev_missing_mate: alpha('#111192', 0.8),\n  color_fwd_diff_chr: alpha('#000000', 0.8),\n  color_rev_diff_chr: alpha('#696969', 0.8),\n  color_pair_lr: alpha('#8C8C8C', 0.8),\n  color_pair_rr: alpha('#00005A', 0.8),\n  color_pair_rl: alpha('#005A5A', 0.8),\n  color_pair_ll: alpha('#005A00', 0.8),\n  color_nostrand: alpha('#8C8C8C', 0.8),\n  color_interchrom: alpha('#5A005A', 0.8),\n  color_longinsert: alpha('#B30000', 0.8),\n  color_shortinsert: alpha('#FF3A5C', 0.8),\n  color_unknown: alpha('#555', 0.8),\n}\n\nconst defaultColor = strokeColor.color_unknown\n\nexport function getPairedOrientationColorOrDefault(f: {\n  pair_orientation?: string\n}) {\n  const type = orientationTypes.fr\n  const r = type[f.pair_orientation || ''] as keyof typeof pairMap\n  const type2 = pairMap[r] as keyof typeof strokeColor\n  return r === 'LR' ? undefined : strokeColor[type2]\n}\n\nexport function getLongReadOrientationColorOrDefault(s1: number, s2: number) {\n  if (s1 === -1 && s2 === 1) {\n    return strokeColor.color_pair_rr\n  } else if (s1 === 1 && s2 === -1) {\n    return strokeColor.color_pair_ll\n  } else {\n    return strokeColor.color_unknown\n  }\n}\n\nexport function getLongReadOrientationAbnormal(s1: number, s2: number) {\n  if (s1 === -1 && s2 === 1) {\n    return true\n  } else if (s1 === 1 && s2 === -1) {\n    return true\n  } else {\n    return false\n  }\n}\n\nexport function isAbnormalOrientation(f: { pair_orientation?: string }) {\n  const type = orientationTypes.fr\n  const r = type[f.pair_orientation || ''] as keyof typeof pairMap\n  return r !== 'LR'\n}\n\nexport function getPairedOrientationColor(f: { pair_orientation?: string }) {\n  return getPairedOrientationColorOrDefault(f) || defaultColor\n}\n","import React, { useMemo, useState } from 'react'\nimport { observer } from 'mobx-react'\nimport { getSnapshot } from 'mobx-state-tree'\nimport { useTheme } from '@mui/material'\nimport { getSession, getStrokeProps } from '@jbrowse/core/util'\n\n// locals\nimport {\n  getBadlyPairedAlignments,\n  getMatchedAlignmentFeatures,\n  hasPairedReads,\n} from './util'\nimport {\n  yPos,\n  useNextFrame,\n  getPxFromCoordinate,\n  heightFromSpecificLevel,\n} from '../util'\nimport { BreakpointViewModel } from '../model'\nimport {\n  getLongReadOrientationAbnormal,\n  getLongReadOrientationColorOrDefault,\n  getPairedOrientationColor,\n  isAbnormalOrientation,\n} from './getOrientationColor'\n\nconst [LEFT, , RIGHT] = [0, 1, 2, 3] as const\n\nconst AlignmentConnections = observer(function ({\n  model,\n  trackId,\n  parentRef,\n  getTrackYPosOverride,\n}: {\n  model: BreakpointViewModel\n  trackId: string\n  parentRef: React.RefObject<SVGSVGElement>\n  getTrackYPosOverride?: (trackId: string, level: number) => number\n}) {\n  const { views, showIntraviewLinks } = model\n  const theme = useTheme()\n  const session = getSession(model)\n  const snap = getSnapshot(model)\n  const { assemblyManager } = session\n  const v0 = views[0]\n  const assembly = v0 ? assemblyManager.get(v0.assemblyNames[0]!) : undefined\n  useNextFrame(snap)\n  const allFeatures = model.getTrackFeatures(trackId)\n  const hasPaired = useMemo(() => hasPairedReads(allFeatures), [allFeatures])\n  const layoutMatches = useMemo(() => {\n    const layoutMatches = model.getMatchedFeaturesInLayout(\n      trackId,\n      hasPaired\n        ? getBadlyPairedAlignments(allFeatures)\n        : getMatchedAlignmentFeatures(allFeatures),\n    )\n    if (!hasPaired) {\n      layoutMatches.forEach(m => {\n        m.sort((a, b) => a.feature.get('clipPos') - b.feature.get('clipPos'))\n      })\n    }\n    return layoutMatches\n  }, [allFeatures, trackId, hasPaired, model])\n\n  const [mouseoverElt, setMouseoverElt] = useState<string>()\n\n  let yOffset = 0\n  if (parentRef.current) {\n    const rect = parentRef.current.getBoundingClientRect()\n    yOffset = rect.top\n  }\n\n  return assembly ? (\n    <g\n      fill=\"none\"\n      data-testid={layoutMatches.length ? `${trackId}-loaded` : trackId}\n    >\n      {layoutMatches.map(chunk => {\n        const ret = []\n        // we follow a path in the list of chunks, not from top to bottom, just in series\n        // following x1,y1 -> x2,y2\n        for (let i = 0; i < chunk.length - 1; i++) {\n          const { layout: c1, feature: f1, level: level1 } = chunk[i]!\n          const { layout: c2, feature: f2, level: level2 } = chunk[i + 1]!\n\n          if (!c1 || !c2) {\n            console.warn('received null layout for a overlay feature')\n            return null\n          }\n\n          // disable rendering connections in a single row\n          if (!showIntraviewLinks && level1 === level2) {\n            return null\n          }\n          const f1ref = assembly.getCanonicalRefName(f1.get('refName'))\n          const f2ref = assembly.getCanonicalRefName(f2.get('refName'))\n\n          if (!f1ref || !f2ref) {\n            throw new Error(`unable to find ref for ${f1ref || f2ref}`)\n          }\n          const r = {\n            pair_orientation: f1.get('pair_orientation'),\n          }\n\n          const s1 = f1.get('strand')\n          const s2 = f2.get('strand')\n          const sameRef = f1ref === f2ref\n          const checkOrientation = sameRef\n          let orientationColor = ''\n          let isAbnormal = false\n          if (checkOrientation) {\n            if (hasPaired) {\n              orientationColor = getPairedOrientationColor(r)\n              isAbnormal = isAbnormalOrientation(r)\n            } else {\n              orientationColor = getLongReadOrientationColorOrDefault(s1, s2)\n              isAbnormal = getLongReadOrientationAbnormal(s1, s2)\n            }\n          }\n          const p1 = c1[s1 === -1 ? LEFT : RIGHT]\n          const sn1 = s2 === -1\n          const p2 = hasPaired ? c2[sn1 ? LEFT : RIGHT] : c2[sn1 ? RIGHT : LEFT]\n          const x1 = getPxFromCoordinate(views[level1]!, f1ref, p1)\n          const x2 = getPxFromCoordinate(views[level2]!, f2ref, p2)\n          const reversed1 = views[level1]!.pxToBp(x1).reversed\n          const reversed2 = views[level2]!.pxToBp(x2).reversed\n          const rf1 = reversed1 ? -1 : 1\n          const rf2 = reversed2 ? -1 : 1\n          const tracks = views.map(v => v.getTrack(trackId))\n          const y1 =\n            yPos(trackId, level1, views, tracks, c1, getTrackYPosOverride) -\n            yOffset\n          const y2 =\n            yPos(trackId, level2, views, tracks, c2, getTrackYPosOverride) -\n            yOffset\n          const sameLevel = level1 === level2\n          const abnormalSpecialRenderFlag = sameLevel && isAbnormal\n          const trackHeight = abnormalSpecialRenderFlag\n            ? tracks[level1].displays[0].height\n            : 0\n          const pf1 = hasPaired ? -1 : 1\n          const y0 = heightFromSpecificLevel(\n            views,\n            trackId,\n            level1,\n            getTrackYPosOverride,\n          )\n\n          // possible todo: use totalCurveHeight to possibly make alternative\n          // squiggle if the S is too small\n          const path = [\n            'M',\n            x1,\n            y1,\n            'C',\n\n            // first bezier x,y\n            x1 + 200 * f1.get('strand') * rf1,\n            abnormalSpecialRenderFlag\n              ? Math.min(y0 - yOffset + trackHeight, y1 + trackHeight)\n              : y1,\n\n            // second bezier x,y\n            x2 - 200 * f2.get('strand') * rf2 * pf1,\n            abnormalSpecialRenderFlag\n              ? Math.min(y0 - yOffset + trackHeight, y2 + trackHeight)\n              : y2,\n\n            // third bezier x,y\n            x2,\n            y2,\n          ].join(' ')\n          const id = `${f1.id()}-${f2.id()}`\n          ret.push(\n            <path\n              d={path}\n              key={id}\n              data-testid=\"r1\"\n              strokeWidth={mouseoverElt === id ? 5 : 1}\n              {...getStrokeProps(\n                orientationColor || theme.palette.text.disabled,\n              )}\n              onClick={() => {\n                const featureWidget = session.addWidget?.(\n                  'BreakpointAlignmentsWidget',\n                  'breakpointAlignments',\n                  {\n                    featureData: {\n                      feature1: (\n                        allFeatures.get(f1.id()) || { toJSON: () => {} }\n                      ).toJSON(),\n                      feature2: (\n                        allFeatures.get(f2.id()) || { toJSON: () => {} }\n                      ).toJSON(),\n                    },\n                  },\n                )\n                session.showWidget?.(featureWidget)\n              }}\n              onMouseOver={() => {\n                setMouseoverElt(id)\n              }}\n              onMouseOut={() => {\n                setMouseoverElt(undefined)\n              }}\n            />,\n          )\n        }\n        return ret\n      })}\n    </g>\n  ) : null\n})\n\nexport default AlignmentConnections\n","import React, { useState, useMemo } from 'react'\nimport { getSession } from '@jbrowse/core/util'\nimport { observer } from 'mobx-react'\nimport { getSnapshot } from 'mobx-state-tree'\n\n// locals\nimport { findMatchingAlt, getMatchedBreakendFeatures } from './util'\nimport { yPos, getPxFromCoordinate, useNextFrame } from '../util'\nimport { BreakpointViewModel } from '../model'\n\nconst [LEFT] = [0, 1, 2, 3] as const\n\nconst Breakends = observer(function ({\n  model,\n  trackId,\n  parentRef: ref,\n  getTrackYPosOverride,\n}: {\n  model: BreakpointViewModel\n  trackId: string\n  parentRef: React.RefObject<SVGSVGElement>\n  getTrackYPosOverride?: (trackId: string, level: number) => number\n}) {\n  const { views } = model\n  const session = getSession(model)\n  const { assemblyManager } = session\n  const totalFeatures = model.getTrackFeatures(trackId)\n  const layoutMatches = useMemo(\n    () =>\n      model.getMatchedFeaturesInLayout(\n        trackId,\n        getMatchedBreakendFeatures(totalFeatures),\n      ),\n    [totalFeatures, trackId, model],\n  )\n\n  const [mouseoverElt, setMouseoverElt] = useState<string>()\n  const snap = getSnapshot(model)\n  useNextFrame(snap)\n  const assembly = assemblyManager.get(views[0]!.assemblyNames[0]!)\n\n  if (!assembly) {\n    return null\n  }\n\n  let yoff = 0\n  if (ref.current) {\n    const rect = ref.current.getBoundingClientRect()\n    yoff = rect.top\n  }\n\n  return (\n    <g\n      stroke=\"green\"\n      strokeWidth={5}\n      fill=\"none\"\n      data-testid={layoutMatches.length ? `${trackId}-loaded` : trackId}\n    >\n      {layoutMatches.map(chunk => {\n        const ret = []\n        // we follow a path in the list of chunks, not from top to bottom, just\n        // in series following x1,y1 -> x2,y2\n        for (let i = 0; i < chunk.length - 1; i += 1) {\n          const { layout: c1, feature: f1, level: level1 } = chunk[i]!\n          const { layout: c2, feature: f2, level: level2 } = chunk[i + 1]!\n          const id = f1.id()\n\n          const relevantAlt = findMatchingAlt(f1, f2)\n          if (!c1 || !c2) {\n            return null\n          }\n          const f1origref = f1.get('refName')\n          const f2origref = f2.get('refName')\n          const f1ref = assembly.getCanonicalRefName(f1origref)\n          const f2ref = assembly.getCanonicalRefName(f2origref)\n          if (!f1ref || !f2ref) {\n            throw new Error(`unable to find ref for ${f1ref || f2ref}`)\n          }\n          const x1 = getPxFromCoordinate(views[level1]!, f1ref, c1[LEFT])\n          const x2 = getPxFromCoordinate(views[level2]!, f2ref, c2[LEFT])\n          const reversed1 = views[level1]!.pxToBp(x1).reversed\n          const reversed2 = views[level2]!.pxToBp(x2).reversed\n\n          const tracks = views.map(v => v.getTrack(trackId))\n          const y1 =\n            yPos(trackId, level1, views, tracks, c1, getTrackYPosOverride) -\n            yoff\n          const y2 =\n            yPos(trackId, level2, views, tracks, c2, getTrackYPosOverride) -\n            yoff\n          if (!relevantAlt) {\n            console.warn('the relevant ALT allele was not found, cannot render')\n          } else {\n            const path = [\n              'M', // move to\n              x1 -\n                20 *\n                  (relevantAlt.Join === 'left' ? -1 : 1) *\n                  (reversed1 ? -1 : 1),\n              y1,\n              'L', // line to\n              x1,\n              y1,\n              'L', // line to\n              x2,\n              y2,\n              'L', // line to\n              x2 -\n                20 *\n                  (relevantAlt.MateDirection === 'left' ? 1 : -1) *\n                  (reversed2 ? -1 : 1),\n              y2,\n            ].join(' ')\n            ret.push(\n              <path\n                d={path}\n                data-testid=\"r2\"\n                key={JSON.stringify(path)}\n                strokeWidth={id === mouseoverElt ? 10 : 5}\n                onClick={() => {\n                  const featureWidget = session.addWidget?.(\n                    'VariantFeatureWidget',\n                    'variantFeature',\n                    {\n                      featureData: totalFeatures.get(id)?.toJSON(),\n                    },\n                  )\n                  session.showWidget?.(featureWidget)\n                }}\n                onMouseOver={() => {\n                  setMouseoverElt(id)\n                }}\n                onMouseOut={() => {\n                  setMouseoverElt(undefined)\n                }}\n              />,\n            )\n          }\n        }\n        return ret\n      })}\n    </g>\n  )\n})\n\nexport default Breakends\n","import React, { useState, useMemo } from 'react'\nimport { getSession } from '@jbrowse/core/util'\nimport { observer } from 'mobx-react'\nimport { getSnapshot } from 'mobx-state-tree'\n\n// locals\nimport { getMatchedTranslocationFeatures } from './util'\nimport { yPos, getPxFromCoordinate, useNextFrame } from '../util'\nimport { BreakpointViewModel, LayoutRecord } from '../model'\n\nconst [LEFT] = [0, 1, 2, 3] as const\n\nfunction str(s: string) {\n  if (s === '+') {\n    return 1\n  } else if (s === '-') {\n    return -1\n  } else {\n    return 0\n  }\n}\n\nconst Translocations = observer(function ({\n  model,\n  trackId,\n  parentRef: ref,\n  getTrackYPosOverride,\n}: {\n  model: BreakpointViewModel\n  trackId: string\n  parentRef: React.RefObject<SVGSVGElement>\n  getTrackYPosOverride?: (trackId: string, level: number) => number\n}) {\n  const { views } = model\n  const session = getSession(model)\n  const { assemblyManager } = session\n  const totalFeatures = model.getTrackFeatures(trackId)\n  const layoutMatches = useMemo(\n    () =>\n      model.getMatchedFeaturesInLayout(\n        trackId,\n        getMatchedTranslocationFeatures(totalFeatures),\n      ),\n\n    [totalFeatures, trackId, model],\n  )\n\n  const [mouseoverElt, setMouseoverElt] = useState<string>()\n  const snap = getSnapshot(model)\n  useNextFrame(snap)\n\n  const assembly = assemblyManager.get(views[0]!.assemblyNames[0]!)\n  if (!assembly) {\n    return null\n  }\n\n  let yOffset = 0\n  if (ref.current) {\n    const rect = ref.current.getBoundingClientRect()\n    yOffset = rect.top\n  }\n\n  // we hardcode the TRA to go to the \"other view\" and if there is none, we\n  // just return null here note: would need to do processing of the INFO\n  // CHR2/END and see which view could contain those coordinates to really do\n  // it properly\n  if (views.length < 2) {\n    return null\n  }\n  return (\n    <g\n      fill=\"none\"\n      stroke=\"green\"\n      strokeWidth={5}\n      data-testid={layoutMatches.length ? `${trackId}-loaded` : trackId}\n    >\n      {layoutMatches.map(chunk => {\n        // we follow a path in the list of chunks, not from top to bottom,\n        // just in series following x1,y1 -> x2,y2\n        const ret = []\n        for (const { layout: c1, feature: f1, level: level1 } of chunk) {\n          const level2 = level1 === 0 ? 1 : 0\n          const id = f1.id()\n          if (!c1) {\n            return null\n          }\n\n          const info = f1.get('INFO')\n          const chr2 = info.CHR2[0]\n          const end2 = info.END[0]\n          const res = info.STRANDS?.[0]?.split('') // not all files have STRANDS\n          const [myDirection, mateDirection] = res ?? ['.', '.']\n\n          const r = getPxFromCoordinate(views[level2]!, chr2, end2)\n          if (r) {\n            const c2: LayoutRecord = [r, 0, r + 1, 0]\n            const x1 = getPxFromCoordinate(\n              views[level1]!,\n              f1.get('refName'),\n              c1[LEFT],\n            )\n            const x2 = r\n            const reversed1 = views[level1]!.pxToBp(x1).reversed\n            const reversed2 = views[level2]!.pxToBp(x2).reversed\n\n            const tracks = views.map(v => v.getTrack(trackId))\n            const y1 =\n              yPos(trackId, level1, views, tracks, c1, getTrackYPosOverride) -\n              yOffset\n            const y2 =\n              yPos(trackId, level2, views, tracks, c2, getTrackYPosOverride) -\n              yOffset\n\n            const path = [\n              'M', // move to\n              x1 - 20 * str(myDirection) * (reversed1 ? -1 : 1),\n              y1,\n              'L', // line to\n              x1,\n              y1,\n              'L', // line to as const\n              x2,\n              y2,\n              'L', // line to\n              x2 - 20 * str(mateDirection) * (reversed2 ? -1 : 1),\n              y2,\n            ].join(' ')\n            ret.push(\n              <path\n                d={path}\n                key={JSON.stringify(path)}\n                strokeWidth={id === mouseoverElt ? 10 : 5}\n                onClick={() => {\n                  const featureWidget = session.addWidget?.(\n                    'VariantFeatureWidget',\n                    'variantFeature',\n                    {\n                      featureData: (\n                        totalFeatures.get(id) || { toJSON: () => {} }\n                      ).toJSON(),\n                    },\n                  )\n                  session.showWidget?.(featureWidget)\n                }}\n                onMouseOver={() => {\n                  setMouseoverElt(id)\n                }}\n                onMouseOut={() => {\n                  setMouseoverElt(undefined)\n                }}\n              />,\n            )\n          }\n        }\n        return ret\n      })}\n    </g>\n  )\n})\n\nexport default Translocations\n","import React, { useState, useMemo } from 'react'\nimport { getSession } from '@jbrowse/core/util'\nimport { observer } from 'mobx-react'\nimport { getSnapshot } from 'mobx-state-tree'\n\n// locals\nimport { getMatchedPairedFeatures } from './util'\nimport { yPos, getPxFromCoordinate, useNextFrame } from '../util'\nimport { BreakpointViewModel } from '../model'\n\nconst [LEFT] = [0, 1, 2, 3] as const\n\nconst PairedFeatures = observer(function ({\n  model,\n  trackId,\n  parentRef: ref,\n  getTrackYPosOverride,\n}: {\n  model: BreakpointViewModel\n  trackId: string\n  parentRef: React.RefObject<SVGSVGElement>\n  getTrackYPosOverride?: (trackId: string, level: number) => number\n}) {\n  const { views } = model\n  const session = getSession(model)\n  const { assemblyManager } = session\n  const totalFeatures = model.getTrackFeatures(trackId)\n  const layoutMatches = useMemo(\n    () =>\n      model.getMatchedFeaturesInLayout(\n        trackId,\n        getMatchedPairedFeatures(totalFeatures),\n      ),\n    [totalFeatures, trackId, model],\n  )\n\n  const [mouseoverElt, setMouseoverElt] = useState<string>()\n  const snap = getSnapshot(model)\n  useNextFrame(snap)\n  const assembly = assemblyManager.get(views[0]!.assemblyNames[0]!)\n\n  if (!assembly) {\n    return null\n  }\n\n  let yoff = 0\n  if (ref.current) {\n    const rect = ref.current.getBoundingClientRect()\n    yoff = rect.top\n  }\n\n  return (\n    <g\n      stroke=\"green\"\n      strokeWidth={5}\n      fill=\"none\"\n      data-testid={layoutMatches.length ? `${trackId}-loaded` : trackId}\n    >\n      {layoutMatches.map(chunk => {\n        const ret = []\n        // we follow a path in the list of chunks, not from top to bottom, just\n        // in series following x1,y1 -> x2,y2\n        for (let i = 0; i < chunk.length - 1; i += 1) {\n          const { layout: c1, feature: f1, level: level1 } = chunk[i]!\n          const { layout: c2, feature: f2, level: level2 } = chunk[i + 1]!\n          const id = f1.id()\n\n          if (!c1 || !c2) {\n            return null\n          }\n          const f1origref = f1.get('refName')\n          const f2origref = f2.get('refName')\n          const f1ref = assembly.getCanonicalRefName(f1origref)\n          const f2ref = assembly.getCanonicalRefName(f2origref)\n          if (!f1ref || !f2ref) {\n            throw new Error(`unable to find ref for ${f1ref || f2ref}`)\n          }\n          const x1 = getPxFromCoordinate(views[level1]!, f1ref, c1[LEFT])\n          const x2 = getPxFromCoordinate(views[level2]!, f2ref, c2[LEFT])\n\n          const tracks = views.map(v => v.getTrack(trackId))\n          const y1 =\n            yPos(trackId, level1, views, tracks, c1, getTrackYPosOverride) -\n            yoff\n          const y2 =\n            yPos(trackId, level2, views, tracks, c2, getTrackYPosOverride) -\n            yoff\n          const path = [\n            'M', // move to\n            x1,\n            y1,\n            'L', // line to\n            x2,\n            y2,\n          ].join(' ')\n          ret.push(\n            <path\n              d={path}\n              data-testid=\"r2\"\n              key={JSON.stringify(path)}\n              strokeWidth={id === mouseoverElt ? 10 : 5}\n              onClick={() => {\n                const featureWidget = session.addWidget?.(\n                  'VariantFeatureWidget',\n                  'variantFeature',\n                  {\n                    featureData: totalFeatures.get(id)?.toJSON(),\n                  },\n                )\n                session.showWidget?.(featureWidget)\n              }}\n              onMouseOver={() => {\n                setMouseoverElt(id)\n              }}\n              onMouseOut={() => {\n                setMouseoverElt(undefined)\n              }}\n            />,\n          )\n        }\n        return ret\n      })}\n    </g>\n  )\n})\n\nexport default PairedFeatures\n","import React from 'react'\nimport { observer } from 'mobx-react'\n\n// locals\nimport { BreakpointViewModel } from '../model'\nimport AlignmentConnections from './AlignmentConnections'\nimport Breakends from './Breakends'\nimport Translocations from './Translocations'\nimport PairedFeatures from './PairedFeatures'\n\nconst Overlay = observer(function (props: {\n  parentRef: React.RefObject<SVGSVGElement>\n  model: BreakpointViewModel\n  trackId: string\n  getTrackYPosOverride?: (trackId: string, level: number) => number\n}) {\n  const { model, trackId } = props\n  const tracks = model.getMatchedTracks(trackId)\n\n  // curvy line type arcs\n  if (tracks[0]?.type === 'AlignmentsTrack') {\n    return <AlignmentConnections {...props} />\n  }\n\n  // translocation type arcs\n  else if (tracks[0]?.type === 'VariantTrack') {\n    return model.hasTranslocations(trackId) ? (\n      <Translocations {...props} />\n    ) : model.hasPairedFeatures(trackId) ? (\n      <PairedFeatures {...props} />\n    ) : (\n      <Breakends {...props} />\n    )\n  } else {\n    return null\n  }\n})\n\nexport default Overlay\n"],"names":["getTag","f","tag","tags","get","findMatchingAlt","feat1","feat2","alts","Map","map","alt","parseBreakend","filter","notEmpty","bnd","MatePosition","orientationTypes","F1R2","F2R1","F1F2","F2F1","R1R2","R2R1","R1F2","R2F1","pairMap","LR","LL","RR","RL","strokeColor","color_fwd_strand_not_proper","alpha","color_rev_strand_not_proper","color_fwd_strand","color_rev_strand","color_fwd_missing_mate","color_rev_missing_mate","color_fwd_diff_chr","color_rev_diff_chr","color_pair_lr","color_pair_rr","color_pair_rl","color_pair_ll","color_nostrand","color_interchrom","color_longinsert","color_shortinsert","color_unknown","defaultColor","getLongReadOrientationColorOrDefault","s1","s2","getLongReadOrientationAbnormal","LEFT","RIGHT","observer","model","trackId","parentRef","getTrackYPosOverride","views","showIntraviewLinks","theme","useTheme","session","getSession","snap","getSnapshot","assemblyManager","v0","assembly","assemblyNames","undefined","useNextFrame","allFeatures","getTrackFeatures","hasPaired","useMemo","features","values","hasPairedReads","layoutMatches","getMatchedFeaturesInLayout","candidates","alreadySeen","Set","feature","flags","id","unmapped","correctlyPaired","has","n","val","set","push","add","v","length","getBadlyPairedAlignments","hasSA","getMatchedAlignmentFeatures","forEach","m","sort","a","b","mouseoverElt","setMouseoverElt","useState","yOffset","current","rect","getBoundingClientRect","top","React","fill","chunk","ret","i","layout","c1","f1","level","level1","c2","f2","level2","console","warn","f1ref","getCanonicalRefName","f2ref","Error","r","pair_orientation","orientationColor","isAbnormal","getPairedOrientationColorOrDefault","p1","sn1","p2","x1","getPxFromCoordinate","x2","rf1","pxToBp","reversed","rf2","tracks","getTrack","y1","yPos","y2","abnormalSpecialRenderFlag","trackHeight","displays","height","pf1","y0","heightFromSpecificLevel","path","Math","min","join","_extends","d","key","strokeWidth","getStrokeProps","palette","text","disabled","onClick","featureWidget","addWidget","featureData","feature1","toJSON","feature2","showWidget","onMouseOver","onMouseOut","ref","totalFeatures","feats","cur","getMatchedBreakendFeatures","yoff","stroke","relevantAlt","f1origref","f2origref","reversed1","reversed2","Join","MateDirection","JSON","stringify","str","s","getMatchedTranslocationFeatures","info","chr2","CHR2","end2","END","res","STRANDS","split","myDirection","mateDirection","r1","replace","r2","endsWith","getMatchedPairedFeatures","props","getMatchedTracks","type","AlignmentConnections","hasTranslocations","Translocations","hasPairedFeatures","PairedFeatures","Breakends"],"sourceRoot":""}