annotate x/static/js/6833.c77c5928.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
125
49f3d3878413 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
fubar
parents:
diff changeset
1 {"version":3,"file":"static/js/6833.c77c5928.chunk.js","mappings":"yNAcO,SAASA,EAAaC,GAC3B,MAAMC,EAAW,IAAIC,IACrB,IAAK,MAAMC,KAASH,EAAO,CACzB,MAAMI,EAAI,IAAIC,EAAAA,EAAcF,GACtBG,EAAUF,EAAEG,IAAI,WACtB,IAAIC,EAASP,EAASM,IAAID,GACrBE,IACHA,EAAS,GACTP,EAASQ,IAAIH,EAASE,IAGxBA,EAAOE,KAAKN,EACd,CAGA,IAAK,MAAMO,KAAeV,EAASW,SACjCD,EAAYE,MAAK,CAACC,EAAGC,IAAMD,EAAEP,IAAI,SAAWQ,EAAER,IAAI,WAGpD,OAAON,CACT,CAEe,MAAMe,UAA0BC,EAAAA,uBAG7CC,WAAAA,CACEC,EACAC,EACAC,GAEAC,MAAMH,EAAMC,EAAeC,GAC3B,MAAME,GAAQC,EAAAA,EAAAA,gBAAeL,EAAM,YACnCM,KAAKxB,SAAWF,EAAawB,EAC/B,CAEA,iBAAMG,GACJ,MAAO,IAAID,KAAKxB,SAAS0B,OAC3B,CAEA,uBAAMC,GACJ,MAAO,IAAIH,KAAKxB,SAASW,UAAUiB,KAAIC,IAAgB,CACrDxB,QAASwB,EAAa,GAAIvB,IAAI,WAC9BwB,QAASD,EAAa,GAAIvB,IAAI,cAElC,CAEAyB,WAAAA,CAAYC,GACV,MAAM,QAAE3B,EAAO,MAAE4B,EAAK,IAAEC,GAAQF,EAEhC,OAAOG,EAAAA,EAAAA,mBAA0BC,UAC/B,MAAMpC,EAAWwB,KAAKxB,SAASM,IAAID,IAAY,GAC/C,IAAK,MAAMF,KAAKH,EACVG,EAAEG,IAAI,OAAS2B,GAAS9B,EAAEG,IAAI,SAAW4B,GAC3CG,EAASC,KAAKnC,GAGlBkC,EAASE,UAAU,GAEvB,CAEAC,aAAAA,GAAuC,E","sources":["../../../plugins/config/src/FromConfigAdapter/FromConfigAdapter.ts"],"sourcesContent":["import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter'\nimport SimpleFeature, {\n Feature,\n SimpleFeatureSerialized,\n} from '@jbrowse/core/util/simpleFeature'\nimport { ObservableCreate } from '@jbrowse/core/util/rxjs'\nimport { NoAssemblyRegion } from '@jbrowse/core/util/types'\nimport {\n AnyConfigurationModel,\n readConfObject,\n} from '@jbrowse/core/configuration'\nimport PluginManager from '@jbrowse/core/PluginManager'\nimport { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache'\n\nexport function makeFeatures(fdata: SimpleFeatureSerialized[]) {\n const features = new Map<string, Feature[]>()\n for (const entry of fdata) {\n const f = new SimpleFeature(entry)\n const refName = f.get('refName') as string\n let bucket = features.get(refName)\n if (!bucket) {\n bucket = []\n features.set(refName, bucket)\n }\n\n bucket.push(f)\n }\n\n // sort the features on each reference sequence by start coordinate\n for (const refFeatures of features.values()) {\n refFeatures.sort((a, b) => a.get('start') - b.get('start'))\n }\n\n return features\n}\n\nexport default class FromConfigAdapter extends BaseFeatureDataAdapter {\n protected features: Map<string, Feature[]>\n\n constructor(\n conf: AnyConfigurationModel,\n getSubAdapter?: getSubAdapterType,\n pluginManager?: PluginManager,\n ) {\n super(conf, getSubAdapter, pluginManager)\n const feats = readConfObject(conf, 'features') as SimpleFeatureSerialized[]\n this.features = makeFeatures(feats)\n }\n\n async getRefNames() {\n return [...this.features.keys()]\n }\n\n async getRefNameAliases() {\n return [...this.features.values()].map(featureArray => ({\n refName: featureArray[0]!.get('refName'),\n aliases: featureArray[0]!.get('aliases'),\n }))\n }\n\n getFeatures(region: NoAssemblyRegion) {\n const { refName, start, end } = region\n\n return ObservableCreate<Feature>(async observer => {\n const features = this.features.get(refName) || []\n for (const f of features) {\n if (f.get('end') > start && f.get('start') < end) {\n observer.next(f)\n }\n }\n observer.complete()\n })\n }\n\n freeResources(/* { region } */): void {}\n}\n"],"names":["makeFeatures","fdata","features","Map","entry","f","SimpleFeature","refName","get","bucket","set","push","refFeatures","values","sort","a","b","FromConfigAdapter","BaseFeatureDataAdapter","constructor","conf","getSubAdapter","pluginManager","super","feats","readConfObject","this","getRefNames","keys","getRefNameAliases","map","featureArray","aliases","getFeatures","region","start","end","ObservableCreate","async","observer","next","complete","freeResources"],"sourceRoot":""}