Mercurial > repos > fubar > jbrowse2
view x/static/js/7842.cbff451c.chunk.js.map @ 133:cec274db51c0 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 7d28252954cae9f8db5f8a85d8f29cb2865b504b-dirty
author | fubar |
---|---|
date | Fri, 18 Oct 2024 11:57:55 +0000 |
parents | 49f3d3878413 |
children |
line wrap: on
line source
{"version":3,"file":"static/js/7842.cbff451c.chunk.js","mappings":"iLAMe,MAAMA,UACXC,EAAAA,YAMR,cAAMC,GACJ,MAAMC,EAAKC,KAAKC,cACVC,GAAOC,EAAAA,EAAAA,cAAaH,KAAKI,QAAQ,sBAAuBL,GACxDM,QAAaH,EAAKI,SAAS,QACjC,OAAOC,OAAOC,YACZH,EACGI,MAAM,cACNC,KAAIC,GAAKA,EAAEC,SACXC,QAAOF,KAAOA,IACdD,KAAII,IACH,MAAOC,EAAMC,GAAUF,EAAKL,MAAM,MAClC,MAAO,CAACM,GAAQC,EAAQ,IAGhC,CAEA,WAAMC,GAOJ,OANKjB,KAAKkB,SACRlB,KAAKkB,OAASlB,KAAKF,WAAWqB,OAAOC,IAEnC,MADApB,KAAKkB,YAASG,EACRD,CAAC,KAGJpB,KAAKkB,MACd,CAEA,gBAAaI,GACX,MAAMC,QAAgBvB,KAAKiB,QAC3B,OAAOV,OAAOiB,KAAKD,GAASb,KAAIe,IAAW,CACzCA,UACAC,MAAO,EACPC,IAAKJ,EAAQE,MAEjB,CAEOG,SAAAA,GACL,MAAO,CAAC,CACV,CAEOC,aAAAA,GAAuC,E","sources":["../../../plugins/sequence/src/ChromSizesAdapter/ChromSizesAdapter.ts"],"sourcesContent":["import {\n RegionsAdapter,\n BaseAdapter,\n} from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { openLocation } from '@jbrowse/core/util/io'\n\nexport default class ChromSizesAdapter\n extends BaseAdapter\n implements RegionsAdapter\n{\n // the map of refSeq to length\n protected setupP?: Promise<Record<string, number>>\n\n async setupPre() {\n const pm = this.pluginManager\n const file = openLocation(this.getConf('chromSizesLocation'), pm)\n const data = await file.readFile('utf8')\n return Object.fromEntries(\n data\n .split(/\\n|\\r\\n|\\r/)\n .map(f => f.trim())\n .filter(f => !!f)\n .map(line => {\n const [name, length] = line.split('\\t')\n return [name!, +length!]\n }),\n )\n }\n\n async setup() {\n if (!this.setupP) {\n this.setupP = this.setupPre().catch((e: unknown) => {\n this.setupP = undefined\n throw e\n })\n }\n return this.setupP\n }\n\n public async getRegions() {\n const refSeqs = await this.setup()\n return Object.keys(refSeqs).map(refName => ({\n refName,\n start: 0,\n end: refSeqs[refName]!,\n }))\n }\n\n public getHeader() {\n return {}\n }\n\n public freeResources(/* { region } */): void {}\n}\n"],"names":["ChromSizesAdapter","BaseAdapter","setupPre","pm","this","pluginManager","file","openLocation","getConf","data","readFile","Object","fromEntries","split","map","f","trim","filter","line","name","length","setup","setupP","catch","e","undefined","getRegions","refSeqs","keys","refName","start","end","getHeader","freeResources"],"sourceRoot":""}