Mercurial > repos > fubar > jbrowse2
comparison x/static/js/491.0011d1ad.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 |
comparison
equal
deleted
inserted
replaced
124:137e08517410 | 125:49f3d3878413 |
---|---|
1 {"version":3,"file":"static/js/491.0011d1ad.chunk.js","mappings":"6NAcO,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,qFCrD1B,MAAMC,UACXC,EAAAA,YAKRzB,WAAAA,CACE0B,EACAxB,EACAC,GAEAC,MAAMsB,EAAQxB,EAAeC,GAC7B,MAAMjB,GAAIoB,EAAAA,EAAAA,gBAAeoB,EAAQ,YACjCnB,KAAKxB,UAAWF,EAAAA,EAAAA,cAAaK,EAC/B,CAKA,gBAAMyC,GACJ,MAAMC,EAAU,GAGhB,IAAK,MAAOxC,EAASL,KAAawB,KAAKxB,SAAU,CAC/C,IAAI8C,EAGJ,IAAK,MAAMC,KAAW/C,EAElB8C,GACAA,EAAcZ,KAAOa,EAAQzC,IAAI,UACjCwC,EAAcb,OAASc,EAAQzC,IAAI,OAEnCwC,EAAcZ,IAAMa,EAAQzC,IAAI,QAE5BwC,GACFD,EAAQpC,KAAKqC,GAEfA,EAAgB,CACdzC,UACA4B,MAAOc,EAAQzC,IAAI,SACnB4B,IAAKa,EAAQzC,IAAI,SAInBwC,GACFD,EAAQpC,KAAKqC,EAEjB,CAKA,OAFAD,EAAQjC,MAAK,CAACC,EAAGC,IAAMD,EAAER,QAAQ2C,cAAclC,EAAET,WAE1CwC,CACT,CAEAL,aAAAA,GAAuC,E","sources":["../../../plugins/config/src/FromConfigAdapter/FromConfigAdapter.ts","../../../plugins/config/src/FromConfigRegionsAdapter/FromConfigRegionsAdapter.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","import {\n BaseAdapter,\n RegionsAdapter,\n} from '@jbrowse/core/data_adapters/BaseAdapter'\nimport {\n Feature,\n SimpleFeatureSerialized,\n} from '@jbrowse/core/util/simpleFeature'\nimport {\n AnyConfigurationModel,\n readConfObject,\n} from '@jbrowse/core/configuration'\nimport PluginManager from '@jbrowse/core/PluginManager'\nimport { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache'\nimport { makeFeatures } from '../FromConfigAdapter/FromConfigAdapter'\n\n/**\n * Adapter that just returns the features defined in its `features` configuration\n * key, like:\n * `\"features\": [ { \"refName\": \"ctgA\", \"start\":1, \"end\":20 }, ... ]`\n */\nexport default class FromConfigRegionsAdapter\n extends BaseAdapter\n implements RegionsAdapter\n{\n private features: Map<string, Feature[]>\n\n constructor(\n config: AnyConfigurationModel,\n getSubAdapter?: getSubAdapterType,\n pluginManager?: PluginManager,\n ) {\n super(config, getSubAdapter, pluginManager)\n const f = readConfObject(config, 'features') as SimpleFeatureSerialized[]\n this.features = makeFeatures(f)\n }\n\n /**\n * Get refName, start, and end for all features after collapsing any overlaps\n */\n async getRegions() {\n const regions = []\n\n // recall: features are stored in this object sorted by start coordinate\n for (const [refName, features] of this.features) {\n let currentRegion:\n | { refName: string; start: number; end: number }\n | undefined\n for (const feature of features) {\n if (\n currentRegion &&\n currentRegion.end >= feature.get('start') &&\n currentRegion.start <= feature.get('end')\n ) {\n currentRegion.end = feature.get('end')\n } else {\n if (currentRegion) {\n regions.push(currentRegion)\n }\n currentRegion = {\n refName,\n start: feature.get('start'),\n end: feature.get('end'),\n }\n }\n }\n if (currentRegion) {\n regions.push(currentRegion)\n }\n }\n\n // sort the regions by refName\n regions.sort((a, b) => a.refName.localeCompare(b.refName))\n\n return regions\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","FromConfigRegionsAdapter","BaseAdapter","config","getRegions","regions","currentRegion","feature","localeCompare"],"sourceRoot":""} |