Mercurial > repos > fubar > jbrowse2
view x/static/js/9206.bbf34514.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/9206.bbf34514.chunk.js","mappings":"iMAKe,MAAMA,UAA0BC,EAAAA,QAC7C,cAAaC,GACX,MAAMC,EAAgBC,KAAKC,QAAQ,iBAC7BC,EAAcF,KAAKC,QAAQ,eAC3BE,EAAcH,KAAKC,QAAQ,eAC3BG,EAAY,CAChBC,OAAOC,EAAAA,EAAAA,cAAaP,EAA+BC,KAAKO,eACxDC,KAAKF,EAAAA,EAAAA,cAAaJ,EAA6BF,KAAKO,eACpDE,KAAKH,EAAAA,EAAAA,cAAaH,EAA6BH,KAAKO,gBAGtD,MAAO,CAAEF,MAAO,IAAIK,EAAAA,GAAkBN,GACxC,E,iICEa,MAAMO,UAA4BC,EAAAA,oBAGvCC,SAAW,IAAIC,EAAAA,EAA6C,CAClEC,MAAO,IAAIC,EAAAA,EAAS,CAAEC,QAAS,MAC/BC,KAAMC,MAAOC,EAASC,KACpB,MAAM,QAAEC,EAAO,MAAEC,EAAK,IAAEC,EAAG,MAAEnB,GAAUe,EACvC,OAAOf,EAAMoB,YAAYH,EAASC,EAAOC,EAAK,IAAKJ,EAAMC,UAAS,IAItE,iBAAaK,CAAYC,GACvB,MAAM,MAAEtB,SAAgBL,KAAK4B,QAC7B,OAAOvB,EAAMwB,iBAAiBF,EAChC,CAEA,gBAAaG,CAAWH,GACtB,MAAM,MAAEtB,SAAgBL,KAAK4B,QACvBG,QAAiB1B,EAAM2B,iBAAiBL,GAC9C,OAAOM,OAAOC,KAAKH,GAAUI,KAAIb,IAAW,CAC1CA,UACAC,MAAO,EACPC,IAAKO,EAAST,MAElB,CAEA,cAAaxB,GACX,MAA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IAAIC,EAAAA,cAAc,CAChBC,GAAI,GAAG/C,KAAWC,KAAS0B,IAC3BqB,KAAM,CAAEhD,UAASC,QAAOC,IAAKyB,EAAWY,UAI9CK,EAASK,UAAU,GAEvB,CAOOC,aAAAA,GAAuC,E","sources":["../../../plugins/sequence/src/BgzipFastaAdapter/BgzipFastaAdapter.ts","../../../plugins/sequence/src/IndexedFastaAdapter/IndexedFastaAdapter.ts"],"sourcesContent":["import { BgzipIndexedFasta } from '@gmod/indexedfasta'\nimport { FileLocation } from '@jbrowse/core/util/types'\nimport { openLocation } from '@jbrowse/core/util/io'\nimport IndexedFasta from '../IndexedFastaAdapter/IndexedFastaAdapter'\n\nexport default class BgzipFastaAdapter extends IndexedFasta {\n public async setupPre() {\n const fastaLocation = this.getConf('fastaLocation')\n const faiLocation = this.getConf('faiLocation')\n const gziLocation = this.getConf('gziLocation')\n const fastaOpts = {\n fasta: openLocation(fastaLocation as FileLocation, this.pluginManager),\n fai: openLocation(faiLocation as FileLocation, this.pluginManager),\n gzi: openLocation(gziLocation as FileLocation, this.pluginManager),\n }\n\n return { fasta: new BgzipIndexedFasta(fastaOpts) }\n }\n}\n","import { IndexedFasta } from '@gmod/indexedfasta'\nimport {\n BaseSequenceAdapter,\n BaseOptions,\n} from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { FileLocation, NoAssemblyRegion } from '@jbrowse/core/util/types'\nimport { openLocation } from '@jbrowse/core/util/io'\nimport { ObservableCreate } from '@jbrowse/core/util/rxjs'\nimport { SimpleFeature, Feature } from '@jbrowse/core/util'\nimport AbortablePromiseCache from '@gmod/abortable-promise-cache'\nimport QuickLRU from '@jbrowse/core/util/QuickLRU'\n\ninterface T {\n refName: string\n start: number\n end: number\n fasta: IndexedFasta\n}\n\nexport default class IndexedFastaAdapter extends BaseSequenceAdapter {\n protected setupP?: Promise<{ fasta: IndexedFasta }>\n\n private seqCache = new AbortablePromiseCache<T, string | undefined>({\n cache: new QuickLRU({ maxSize: 200 }),\n fill: async (args: T, signal?: AbortSignal) => {\n const { refName, start, end, fasta } = args\n return fasta.getSequence(refName, start, end, { ...args, signal })\n },\n })\n\n public async getRefNames(opts?: BaseOptions) {\n const { fasta } = await this.setup()\n return fasta.getSequenceNames(opts)\n }\n\n public async getRegions(opts?: BaseOptions) {\n const { fasta } = await this.setup()\n const seqSizes = await fasta.getSequenceSizes(opts)\n return Object.keys(seqSizes).map(refName => ({\n refName,\n start: 0,\n end: seqSizes[refName]!,\n }))\n }\n\n public async setupPre() {\n const fastaLocation = this.getConf('fastaLocation') as FileLocation\n const faiLocation = this.getConf('faiLocation') as FileLocation\n\n return {\n fasta: new IndexedFasta({\n fasta: openLocation(fastaLocation, this.pluginManager),\n fai: openLocation(faiLocation, this.pluginManager),\n }),\n }\n }\n\n public async getHeader() {\n const loc = this.getConf('metadataLocation')\n return loc.uri === '' || loc.uri === '/path/to/fa.metadata.yaml'\n ? null\n : openLocation(loc, this.pluginManager).readFile('utf8')\n }\n\n public 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 getFeatures(region: NoAssemblyRegion, opts?: BaseOptions) {\n const { refName, start, end } = region\n return ObservableCreate<Feature>(async observer => {\n const { fasta } = await this.setup()\n const size = await fasta.getSequenceSize(refName, opts)\n const regionEnd = Math.min(size, end)\n const chunks = []\n const chunkSize = 128000\n\n const s = start - (start % chunkSize)\n const e = end + (chunkSize - (end % chunkSize))\n for (let chunkStart = s; chunkStart < e; chunkStart += chunkSize) {\n const r = {\n refName,\n start: chunkStart,\n end: chunkStart + chunkSize,\n }\n chunks.push(\n this.seqCache.get(JSON.stringify(r), { ...r, fasta }, opts?.signal),\n )\n }\n const seq = (await Promise.all(chunks))\n .join('')\n .slice(start - s)\n .slice(0, end - start)\n if (seq) {\n observer.next(\n new SimpleFeature({\n id: `${refName} ${start}-${regionEnd}`,\n data: { refName, start, end: regionEnd, seq },\n }),\n )\n }\n observer.complete()\n })\n }\n\n /**\n * called to provide a hint that data tied to a certain region\n * will not be needed for the foreseeable future and can be purged\n * from caches, etc\n */\n public freeResources(/* { region } */): void {}\n}\n"],"names":["BgzipFastaAdapter","IndexedFasta","setupPre","fastaLocation","this","getConf","faiLocation","gziLocation","fastaOpts","fasta","openLocation","pluginManager","fai","gzi","BgzipIndexedFasta","IndexedFastaAdapter","BaseSequenceAdapter","seqCache","AbortablePromiseCache","cache","QuickLRU","maxSize","fill","async","args","signal","refName","start","end","getSequence","getRefNames","opts","setup","getSequenceNames","getRegions","seqSizes","getSequenceSizes","Object","keys","map","getHeader","loc","uri","readFile","setupP","catch","e","undefined","getFeatures","region","ObservableCreate","size","getSequenceSize","regionEnd","Math","min","chunks","chunkSize","s","chunkStart","r","push","get","JSON","stringify","seq","Promise","all","join","slice","observer","next","SimpleFeature","id","data","complete","freeResources"],"sourceRoot":""}