Mercurial > repos > fubar > jbrowse2
view x/static/js/5736.48705208.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/5736.48705208.chunk.js","mappings":"uOAOe,SAASA,GAAkC,IACxDC,EAAG,MACHC,IAKA,OACEC,EAAAA,cAAA,WACEA,EAAAA,cAACC,EAAAA,EAAU,KAAC,6CACZD,EAAAA,cAAA,UACGF,EACEI,MAAM,KACNC,QAAOC,KAAQA,IACfC,KAAI,CAACD,EAAIE,KACR,MAAOC,EAAOC,EAASC,EAAUC,GAAWN,EAAGF,MAAM,KAC/CS,GAAWC,EAAAA,EAAAA,gBAAeF,GAC1BG,EAAQC,KAAKC,MAAMJ,EAAW,GAC9BK,GAASR,EACTS,GAAOT,EAAWG,EAClBO,EAAKF,EAAQH,EACbM,EAAKF,EAAMJ,EACXO,EAAY,GAAGb,KAASO,KAAKO,IAAI,EAAGH,MAAOC,IAG3CG,EAAgB,GAAGf,KAFJS,EAAMO,eAAe,YACvBN,EAAIM,eAAe,aAC2Bd,OAAcE,OAC/E,OAEEX,EAAAA,cAAA,MAAIwB,IAAK,GAAGJ,KAAad,KACvBN,EAAAA,cAACyB,EAAAA,EAAI,CACHC,KAAK,IACLC,QAASC,UACPC,EAAMC,kBAGNC,EAAAA,EAAAA,GAASX,EAAWrB,EAAM,GAG3BuB,GAEA,KAMnB,C,0BCrCA,MAAMU,GAAiCC,EAAAA,EAAAA,OACrC,IAAM,kCAEFC,GAAkCD,EAAAA,EAAAA,OACtC,IAAM,iCAGO,SAASE,GAA+B,MACrDpC,EAAK,QACLqC,EAAO,SACPC,IAMA,MAAMC,GAAUC,EAAAA,EAAAA,YAAWxC,IACrB,KAAEyC,GAASzC,GACV0C,EAAKC,IAAUC,EAAA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,gBAGE,MAKX,IACN,C,wNEzGe,SAASE,EAAwBC,GAK9C,MAAM,MAAEpG,EAAK,IAAED,EAAG,QAAEsC,GAAY+D,EAC1B7D,GAAUC,EAAAA,EAAAA,YAAWxC,IACrB,cAAEqG,IAAkBC,EAAAA,EAAAA,QAAO/D,GACjC,IAAID,EAEJ,IACEA,EAAW+D,EAAcE,YAAY,sBACvC,CAAE,MAAOtB,GACP,CAGF,OACEhF,EAAAA,cAACuG,EAAAA,SAAQC,EAAA,GAAKL,EAAK,CAAEM,MAAM,6BACzBzG,EAAAA,cAACH,EAAiC,CAACE,MAAOA,EAAOD,IAAKA,IACrDuC,EACCrC,EAAAA,cAACmC,EAA8B,CAC7BE,SAAUA,EACVtC,MAAOA,EACPqC,QAASA,IAET,KAGV,C","sources":["../../../plugins/alignments/src/AlignmentsFeatureDetail/SupplementaryAlignmentsLocStrings.tsx","../../../plugins/alignments/src/AlignmentsFeatureDetail/LaunchSupplementaryAlignmentBreakpointSplitViewPanel.tsx","../../../plugins/alignments/src/AlignmentsFeatureDetail/getSAFeatures.ts","../../../plugins/alignments/src/AlignmentsFeatureDetail/SupplementaryAlignments.tsx"],"sourcesContent":["import React from 'react'\nimport { Typography, Link } from '@mui/material'\n// locals\nimport { getLengthOnRef } from '../MismatchParser'\nimport { navToLoc } from './util'\nimport { AlignmentFeatureWidgetModel } from './stateModelFactory'\n\nexport default function SupplementaryAlignmentsLocStrings({\n tag,\n model,\n}: {\n tag: string\n model: AlignmentFeatureWidgetModel\n}) {\n return (\n <div>\n <Typography>List of supplementary alignment locations</Typography>\n <ul>\n {tag\n .split(';')\n .filter(SA => !!SA)\n .map((SA, idx) => {\n const [saRef, saStart, saStrand, saCigar] = SA.split(',')\n const saLength = getLengthOnRef(saCigar!)\n const extra = Math.floor(saLength / 5)\n const start = +saStart!\n const end = +saStart! + saLength\n const sp = start - extra\n const ep = end + extra\n const locString = `${saRef}:${Math.max(1, sp)}-${ep}`\n const displayStart = start.toLocaleString('en-US')\n const displayEnd = end.toLocaleString('en-US')\n const displayString = `${saRef}:${displayStart}-${displayEnd} (${saStrand}) [${saLength}bp]`\n return (\n /* biome-ignore lint/suspicious/noArrayIndexKey: */\n <li key={`${locString}-${idx}`}>\n <Link\n href=\"#\"\n onClick={async event => {\n event.preventDefault()\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n navToLoc(locString, model)\n }}\n >\n {displayString}\n </Link>\n </li>\n )\n })}\n </ul>\n </div>\n )\n}\n","import React, { lazy, useEffect, useState } from 'react'\nimport { Typography, Link } from '@mui/material'\nimport {\n SimpleFeature,\n SimpleFeatureSerialized,\n getSession,\n toLocale,\n} from '@jbrowse/core/util'\nimport { ErrorMessage } from '@jbrowse/core/ui'\nimport { ViewType } from '@jbrowse/core/pluggableElementTypes'\n\n// locals\nimport { AlignmentFeatureWidgetModel } from './stateModelFactory'\nimport { ReducedFeature, getSAFeatures } from './getSAFeatures'\n\n// lazies\nconst BreakendMultiLevelOptionDialog = lazy(\n () => import('./BreakendMultiLevelOptionDialog'),\n)\nconst BreakendSingleLevelOptionDialog = lazy(\n () => import('./BreakendSingleLevelOptionDialog'),\n)\n\nexport default function LaunchBreakpointSplitViewPanel({\n model,\n feature,\n viewType,\n}: {\n model: AlignmentFeatureWidgetModel\n feature: SimpleFeatureSerialized\n viewType: ViewType\n}) {\n const session = getSession(model)\n const { view } = model\n const [res, setRes] = useState<ReducedFeature[]>()\n const [error, setError] = useState<unknown>()\n useEffect(() => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ;(async () => {\n try {\n const feats = await getSAFeatures({\n view,\n feature: new SimpleFeature(feature),\n })\n setRes(feats)\n } catch (e) {\n setError(e)\n console.error(e)\n }\n })()\n }, [feature, view])\n\n const ret = [] as [ReducedFeature, ReducedFeature][]\n if (res) {\n for (let i = 0; i < res.length - 1; i++) {\n ret.push([res[i]!, res[i + 1]!] as const)\n }\n }\n return ret.length ? (\n <div>\n <Typography>Launch split view</Typography>\n {error ? <ErrorMessage error={error} /> : null}\n <ul>\n {ret.map((arg, index) => {\n const [f1, f2] = arg\n return (\n <li key={`${JSON.stringify(arg)}-${index}`}>\n {f1.refName}:{toLocale(f1.strand === 1 ? f1.end : f1.start)} ->{' '}\n {f2.refName}:{toLocale(f2.strand === 1 ? f2.start : f2.end)}{' '}\n <Link\n href=\"#\"\n onClick={event => {\n event.preventDefault()\n session.queueDialog(handleClose => [\n BreakendMultiLevelOptionDialog,\n {\n handleClose,\n model,\n feature: new SimpleFeature({ ...f1, mate: f2 }),\n // @ts-expect-error\n viewType,\n view: model.view,\n assemblyName: model.view.displayedRegions[0].assemblyName,\n },\n ])\n }}\n >\n (top/bottom)\n </Link>{' '}\n <Link\n href=\"#\"\n onClick={event => {\n event.preventDefault()\n session.queueDialog(handleClose => [\n BreakendSingleLevelOptionDialog,\n {\n handleClose,\n model,\n feature: new SimpleFeature({ ...f1, mate: f2 }),\n // @ts-expect-error\n viewType,\n view: model.view,\n assemblyName: model.view.displayedRegions[0].assemblyName,\n },\n ])\n }}\n >\n (single row)\n </Link>\n </li>\n )\n })}\n </ul>\n </div>\n ) : null\n}\n","import { Feature, getSession } from '@jbrowse/core/util'\n\n// locals\nimport { featurizeSA, getClip, getLengthSansClipping } from '../MismatchParser'\nimport { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'\nimport { getTag } from '../util'\n\nexport interface ReducedFeature {\n refName: string\n start: number\n clipPos: number\n end: number\n strand: number\n seqLength: number\n syntenyId?: number\n uniqueId: string\n mate: {\n refName: string\n start: number\n end: number\n syntenyId?: number\n uniqueId?: string\n }\n}\n\nexport async function getSAFeatures({\n view,\n feature,\n}: {\n view: LinearGenomeViewModel\n feature: Feature\n}) {\n const { assemblyManager } = getSession(view)\n const cigar = feature.get('CIGAR') as string\n const origStrand = feature.get('strand') as number\n const SA = (getTag(feature, 'SA') as string) || ''\n const readName = feature.get('name') as string\n const clipPos = getClip(cigar, 1)\n\n // get the canonical refname for the read because if the read.get('refName')\n // is chr1 and the actual fasta refName is 1 then no tracks can be opened on\n // the top panel of the linear read vs ref\n const assembly = await assemblyManager.waitForAssembly(view.assemblyNames[0]!)\n if (!assembly) {\n throw new Error('assembly not found')\n }\n\n const suppAlns = featurizeSA(SA, feature.id(), origStrand, readName, true)\n\n const feat = feature.toJSON()\n feat.clipPos = clipPos\n feat.strand = 1\n\n feat.mate = {\n refName: readName,\n start: clipPos,\n end: clipPos + getLengthSansClipping(cigar),\n }\n const features = [feat, ...suppAlns] as ReducedFeature[]\n\n features.forEach((f, idx) => {\n f.refName = assembly.getCanonicalRefName(f.refName) || f.refName\n f.syntenyId = idx\n f.mate.syntenyId = idx\n f.mate.uniqueId = `${f.uniqueId}_mate`\n })\n features.sort((a, b) => a.clipPos - b.clipPos)\n return features\n}\n","import React from 'react'\nimport { BaseCard } from '@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail'\nimport { SimpleFeatureSerialized, getEnv, getSession } from '@jbrowse/core/util'\nimport { ViewType } from '@jbrowse/core/pluggableElementTypes'\n\n// locals\nimport { AlignmentFeatureWidgetModel } from './stateModelFactory'\nimport SupplementaryAlignmentsLocStrings from './SupplementaryAlignmentsLocStrings'\nimport LaunchBreakpointSplitViewPanel from './LaunchSupplementaryAlignmentBreakpointSplitViewPanel'\n\nexport default function SupplementaryAlignments(props: {\n tag: string\n model: AlignmentFeatureWidgetModel\n feature: SimpleFeatureSerialized\n}) {\n const { model, tag, feature } = props\n const session = getSession(model)\n const { pluginManager } = getEnv(session)\n let viewType: ViewType | undefined\n\n try {\n viewType = pluginManager.getViewType('BreakpointSplitView')\n } catch (e) {\n // ignore\n }\n\n return (\n <BaseCard {...props} title=\"Supplementary alignments\">\n <SupplementaryAlignmentsLocStrings model={model} tag={tag} />\n {viewType ? (\n <LaunchBreakpointSplitViewPanel\n viewType={viewType}\n model={model}\n feature={feature}\n />\n ) : null}\n </BaseCard>\n )\n}\n"],"names":["SupplementaryAlignmentsLocStrings","tag","model","React","Typography","split","filter","SA","map","idx","saRef","saStart","saStrand","saCigar","saLength","getLengthOnRef","extra","Math","floor","start","end","sp","ep","locString","max","displayString","toLocaleString","key","Link","href","onClick","async","event","preventDefault","navToLoc","BreakendMultiLevelOptionDialog","lazy","BreakendSingleLevelOptionDialog","LaunchBreakpointSplitViewPanel","feature","viewType","session","getSession","view","res","setRes","useState","error","setError","useEffect","feats","assemblyManager","cigar","get","origStrand","getTag","readName","clipPos","getClip","assembly","waitForAssembly","assemblyNames","Error","suppAlns","featurizeSA","id","feat","toJSON","strand","mate","refName","getLengthSansClipping","features","forEach","f","getCanonicalRefName","syntenyId","uniqueId","sort","a","b","getSAFeatures","SimpleFeature","e","console","ret","i","length","push","ErrorMessage","arg","index","f1","f2","JSON","stringify","toLocale","queueDialog","handleClose","assemblyName","displayedRegions","SupplementaryAlignments","props","pluginManager","getEnv","getViewType","BaseCard","_extends","title"],"sourceRoot":""}