@jbrowse/plugin-bed 1.4.3 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BedTabixAdapter/BedTabixAdapter.d.ts +3 -1
- package/dist/BigBedAdapter/BigBedAdapter.d.ts +3 -1
- package/dist/plugin-bed.cjs.development.js +77 -33
- package/dist/plugin-bed.cjs.development.js.map +1 -1
- package/dist/plugin-bed.cjs.production.min.js +1 -1
- package/dist/plugin-bed.cjs.production.min.js.map +1 -1
- package/dist/plugin-bed.esm.js +77 -33
- package/dist/plugin-bed.esm.js.map +1 -1
- package/package.json +4 -4
- package/src/BedTabixAdapter/BedTabixAdapter.test.ts +10 -0
- package/src/BedTabixAdapter/BedTabixAdapter.ts +17 -5
- package/src/BedTabixAdapter/configSchema.ts +5 -2
- package/src/BigBedAdapter/BigBedAdapter.test.ts +4 -1
- package/src/BigBedAdapter/BigBedAdapter.ts +11 -7
- package/src/BigBedAdapter/configSchema.ts +1 -1
- package/src/index.ts +55 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-bed.cjs.production.min.js","sources":["../src/BigBedAdapter/configSchema.ts","../src/BedTabixAdapter/configSchema.ts","../src/index.ts","../../../node_modules/regenerator-runtime/runtime.js","../src/util.ts","../src/BigBedAdapter/BigBedAdapter.ts","../src/BedTabixAdapter/BedTabixAdapter.ts"],"sourcesContent":["import { ConfigurationSchema } from '@jbrowse/core/configuration'\n\nexport default ConfigurationSchema(\n 'BigBedAdapter',\n {\n bigBedLocation: {\n type: 'fileLocation',\n defaultValue: { uri: '/path/to/my.bb' },\n },\n },\n { explicitlyTyped: true },\n)\n","import { ConfigurationSchema } from '@jbrowse/core/configuration'\nimport { types } from 'mobx-state-tree'\n\nexport default ConfigurationSchema(\n 'BedTabixAdapter',\n {\n bedGzLocation: {\n type: 'fileLocation',\n defaultValue: { uri: '/path/to/my.bed.gz' },\n },\n\n index: ConfigurationSchema('TabixIndex', {\n indexType: {\n model: types.enumeration('IndexType', ['TBI', 'CSI']),\n type: 'stringEnum',\n defaultValue: 'TBI',\n },\n location: {\n type: 'fileLocation',\n defaultValue: { uri: '/path/to/my.bed.gz.tbi' },\n },\n }),\n\n columnNames: {\n type: 'stringArray',\n description: 'List of column names',\n defaultValue: [],\n },\n\n scoreColumn: {\n type: 'string',\n description: 'The column to use as a \"score\" attribute',\n defaultValue: '',\n },\n\n autoSql: {\n type: 'string',\n description: 'The autoSql definition for the data fields in the file',\n defaultValue: '',\n },\n },\n { explicitlyTyped: true },\n)\n","import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType'\nimport Plugin from '@jbrowse/core/Plugin'\nimport PluginManager from '@jbrowse/core/PluginManager'\nimport { configSchema as bigBedAdapterConfigSchema } from './BigBedAdapter'\nimport { configSchema as bedTabixAdapterConfigSchema } from './BedTabixAdapter'\n\nexport default class BedPlugin extends Plugin {\n name = 'BedPlugin'\n\n install(pluginManager: PluginManager) {\n pluginManager.addAdapterType(\n () =>\n new AdapterType({\n name: 'BigBedAdapter',\n configSchema: bigBedAdapterConfigSchema,\n getAdapterClass: () =>\n import('./BigBedAdapter/BigBedAdapter').then(r => r.default),\n }),\n )\n pluginManager.addAdapterType(\n () =>\n new AdapterType({\n name: 'BedTabixAdapter',\n configSchema: bedTabixAdapterConfigSchema,\n getAdapterClass: () =>\n import('./BedTabixAdapter/BedTabixAdapter').then(r => r.default),\n }),\n )\n }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","import SimpleFeature, { Feature } from '@jbrowse/core/util/simpleFeature'\n\nexport function ucscProcessedTranscript(feature: Feature) {\n const children = feature.children()\n // split the blocks into UTR, CDS, and exons\n const thickStart = feature.get('thickStart')\n const thickEnd = feature.get('thickEnd')\n\n if (!thickStart && !thickEnd) {\n return feature\n }\n\n const blocks: Feature[] = children\n ? children\n .filter(child => child.get('type') === 'block')\n .sort((a, b) => a.get('start') - b.get('start'))\n : []\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const newChildren: Record<string, any> = []\n blocks.forEach(block => {\n const start = block.get('start')\n const end = block.get('end')\n if (thickStart >= end) {\n // left-side UTR\n const prime = feature.get('strand') > 0 ? 'five' : 'three'\n newChildren.push({\n type: `${prime}_prime_UTR`,\n start,\n end,\n })\n } else if (thickStart > start && thickStart < end && thickEnd >= end) {\n // UTR | CDS\n const prime = feature.get('strand') > 0 ? 'five' : 'three'\n newChildren.push(\n {\n type: `${prime}_prime_UTR`,\n start,\n end: thickStart,\n },\n {\n type: 'CDS',\n start: thickStart,\n end,\n },\n )\n } else if (thickStart <= start && thickEnd >= end) {\n // CDS\n newChildren.push({\n type: 'CDS',\n start,\n end,\n })\n } else if (thickStart > start && thickStart < end && thickEnd < end) {\n // UTR | CDS | UTR\n const leftPrime = feature.get('strand') > 0 ? 'five' : 'three'\n const rightPrime = feature.get('strand') > 0 ? 'three' : 'five'\n newChildren.push(\n {\n type: `${leftPrime}_prime_UTR`,\n start,\n end: thickStart,\n },\n {\n type: `CDS`,\n start: thickStart,\n end: thickEnd,\n },\n {\n type: `${rightPrime}_prime_UTR`,\n start: thickEnd,\n end,\n },\n )\n } else if (thickStart <= start && thickEnd > start && thickEnd < end) {\n // CDS | UTR\n const prime = feature.get('strand') > 0 ? 'three' : 'five'\n newChildren.push(\n {\n type: `CDS`,\n start,\n end: thickEnd,\n },\n {\n type: `${prime}_prime_UTR`,\n start: thickEnd,\n end,\n },\n )\n } else if (thickEnd <= start) {\n // right-side UTR\n const prime = feature.get('strand') > 0 ? 'three' : 'five'\n newChildren.push({\n type: `${prime}_prime_UTR`,\n start,\n end,\n })\n }\n })\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const newData: Record<string, any> = {}\n feature.tags().forEach(tag => {\n newData[tag] = feature.get(tag)\n })\n newData.subfeatures = newChildren\n newData.type = 'mRNA'\n newData.uniqueId = feature.id()\n delete newData.chromStarts\n delete newData.chromStart\n delete newData.chromEnd\n delete newData.chrom\n delete newData.blockStarts\n delete newData.blockSizes\n delete newData.blockCount\n delete newData.thickStart\n delete newData.thickEnd\n const newFeature = new SimpleFeature({\n data: newData,\n id: feature.id(),\n })\n return newFeature\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { BigBed } from '@gmod/bbi'\nimport BED from '@gmod/bed'\nimport {\n BaseFeatureDataAdapter,\n BaseOptions,\n} from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { Region, FileLocation } 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/simpleFeature'\nimport { map, mergeAll } from 'rxjs/operators'\nimport { readConfObject } from '@jbrowse/core/configuration'\nimport { Instance } from 'mobx-state-tree'\nimport configSchema from './configSchema'\nimport { ucscProcessedTranscript } from '../util'\n\ninterface BEDFeature {\n chrom: string\n chromStart: number\n chromEnd: number\n [key: string]: any\n}\n\ninterface Parser {\n parseLine: (line: string, opts: { uniqueId: string | number }) => BEDFeature\n}\n\nexport default class BigBedAdapter extends BaseFeatureDataAdapter {\n private bigbed: BigBed\n\n private parser: Promise<Parser>\n\n public constructor(config: Instance<typeof configSchema>) {\n super(config)\n const bigBedLocation = readConfObject(\n config,\n 'bigBedLocation',\n ) as FileLocation\n this.bigbed = new BigBed({\n filehandle: openLocation(bigBedLocation),\n })\n\n this.parser = this.bigbed\n .getHeader()\n .then(({ autoSql }: { autoSql: string }) => new BED({ autoSql }))\n }\n\n public async getRefNames() {\n return Object.keys((await this.bigbed.getHeader()).refsByName)\n }\n\n async getHeader(opts?: BaseOptions) {\n const { version, fileType } = await this.bigbed.getHeader(opts)\n // @ts-ignore\n const { autoSql } = await this.parser\n const { fields, ...rest } = autoSql\n const f = Object.fromEntries(\n // @ts-ignore\n fields.map(({ name, comment }) => [name, comment]),\n )\n return { version, fileType, autoSql: { ...rest }, fields: f }\n }\n\n public async refIdToName(refId: number) {\n return ((await this.bigbed.getHeader()).refsByNumber[refId] || {}).name\n }\n\n public getFeatures(region: Region, opts: BaseOptions = {}) {\n const { refName, start, end } = region\n const { signal } = opts\n return ObservableCreate<Feature>(async observer => {\n try {\n const parser = await this.parser\n const ob = await this.bigbed.getFeatureStream(refName, start, end, {\n signal,\n basesPerSpan: end - start,\n })\n ob.pipe(\n mergeAll(),\n map(\n (r: {\n start: number\n end: number\n rest?: string\n uniqueId?: string\n }) => {\n const data = parser.parseLine(\n `${refName}\\t${r.start}\\t${r.end}\\t${r.rest}`,\n {\n uniqueId: r.uniqueId as string,\n },\n )\n\n const { blockCount, blockSizes, blockStarts, chromStarts } = data\n if (blockCount) {\n const starts = chromStarts || blockStarts || []\n const sizes = blockSizes\n const blocksOffset = r.start\n data.subfeatures = []\n\n for (let b = 0; b < blockCount; b += 1) {\n const bmin = (starts[b] || 0) + blocksOffset\n const bmax = bmin + (sizes[b] || 0)\n data.subfeatures.push({\n uniqueId: `${r.uniqueId}-${b}`,\n start: bmin,\n end: bmax,\n type: 'block',\n })\n }\n }\n if (r.uniqueId === undefined) {\n throw new Error('invalid bbi feature')\n }\n delete data.chromStart\n delete data.chromEnd\n delete data.chrom\n\n const f = new SimpleFeature({\n id: `${this.id}-${r.uniqueId}`,\n data: {\n ...data,\n start: r.start,\n end: r.end,\n refName,\n },\n })\n\n // collection of heuristics for suggesting that this feature\n // should be converted to a gene, CNV bigbed has many gene like\n // features including thickStart and blockCount but no strand\n return f.get('thickStart') &&\n f.get('blockCount') &&\n f.get('strand') !== 0\n ? ucscProcessedTranscript(f)\n : f\n },\n ),\n ).subscribe(observer)\n } catch (e) {\n observer.error(e)\n }\n }, opts.signal)\n }\n\n public freeResources(): void {}\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport BED from '@gmod/bed'\nimport {\n BaseFeatureDataAdapter,\n BaseOptions,\n} from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { FileLocation, Region } 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/simpleFeature'\nimport { TabixIndexedFile } from '@gmod/tabix'\nimport { Instance } from 'mobx-state-tree'\nimport { readConfObject } from '@jbrowse/core/configuration'\nimport { ucscProcessedTranscript } from '../util'\nimport MyConfigSchema from './configSchema'\n\nexport default class BedTabixAdapter extends BaseFeatureDataAdapter {\n private parser: any\n\n protected bed: TabixIndexedFile\n\n protected columnNames: string[]\n\n protected scoreColumn: string\n\n public static capabilities = ['getFeatures', 'getRefNames']\n\n public constructor(config: Instance<typeof MyConfigSchema>) {\n super(config)\n const bedGzLocation = readConfObject(\n config,\n 'bedGzLocation',\n ) as FileLocation\n const index = readConfObject(config, 'index') as {\n indexType?: string\n location: FileLocation\n }\n const autoSql = readConfObject(config, 'autoSql') as string\n const { location, indexType } = index\n\n this.bed = new TabixIndexedFile({\n filehandle: openLocation(bedGzLocation),\n csiFilehandle: indexType === 'CSI' ? openLocation(location) : undefined,\n tbiFilehandle: indexType !== 'CSI' ? openLocation(location) : undefined,\n chunkCacheSize: 50 * 2 ** 20,\n })\n this.columnNames = readConfObject(config, 'columnNames')\n this.scoreColumn = readConfObject(config, 'scoreColumn')\n this.parser = new BED({ autoSql })\n }\n\n public async getRefNames(opts: BaseOptions = {}) {\n return this.bed.getReferenceSequenceNames(opts)\n }\n\n async getHeader() {\n return this.bed.getHeader()\n }\n\n defaultParser(fields: string[], line: string) {\n return Object.fromEntries(line.split('\\t').map((f, i) => [fields[i], f]))\n }\n\n async getNames() {\n if (this.columnNames.length) {\n return this.columnNames\n }\n const header = await this.bed.getHeader()\n const defs = header.split('\\n').filter(f => !!f)\n const defline = defs[defs.length - 1]\n return defline && defline.includes('\\t')\n ? defline\n .slice(1)\n .split('\\t')\n .map(field => field.trim())\n : null\n }\n\n public getFeatures(query: Region, opts: BaseOptions = {}) {\n return ObservableCreate<Feature>(async observer => {\n const meta = await this.bed.getMetadata()\n const { columnNumbers } = meta\n const colRef = columnNumbers.ref - 1\n const colStart = columnNumbers.start - 1\n const colEnd = columnNumbers.end - 1\n // colSame handles special case for tabix where a single column is both\n // the start and end, this is assumed to be covering the base at this\n // position (e.g. tabix -s 1 -b 2 -e 2) begin and end are same\n const colSame = colStart === colEnd ? 1 : 0\n const names = await this.getNames()\n await this.bed.getLines(query.refName, query.start, query.end, {\n lineCallback: (line: string, fileOffset: number) => {\n const l = line.split('\\t')\n const refName = l[colRef]\n const start = +l[colStart]\n\n const end = +l[colEnd] + colSame\n const uniqueId = `${this.id}-${fileOffset}`\n const data = names\n ? this.defaultParser(names, line)\n : this.parser.parseLine(line, { uniqueId })\n\n const { blockCount, blockSizes, blockStarts, chromStarts } = data\n\n if (blockCount) {\n const starts = chromStarts || blockStarts || []\n const sizes = blockSizes\n const blocksOffset = start\n data.subfeatures = []\n\n for (let b = 0; b < blockCount; b += 1) {\n const bmin = (starts[b] || 0) + blocksOffset\n const bmax = bmin + (sizes[b] || 0)\n data.subfeatures.push({\n uniqueId: `${uniqueId}-${b}`,\n start: bmin,\n end: bmax,\n type: 'block',\n })\n }\n }\n\n if (this.scoreColumn) {\n data.score = data[this.scoreColumn]\n }\n delete data.chrom\n delete data.chromStart\n delete data.chromEnd\n const f = new SimpleFeature({\n ...data,\n start,\n end,\n refName,\n uniqueId,\n })\n const r = f.get('thickStart') ? ucscProcessedTranscript(f) : f\n observer.next(r)\n },\n signal: opts.signal,\n })\n observer.complete()\n }, opts.signal)\n }\n\n public freeResources(): void {}\n}\n"],"names":["ConfigurationSchema","bigBedLocation","type","defaultValue","uri","explicitlyTyped","bedGzLocation","index","indexType","model","types","enumeration","location","columnNames","description","scoreColumn","autoSql","BedPlugin","Plugin","pluginManager","addAdapterType","AdapterType","name","configSchema","bigBedAdapterConfigSchema","getAdapterClass","Promise","then","r","bedTabixAdapterConfigSchema","runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","generator","create","Generator","context","Context","_invoke","state","method","arg","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","__await","unwrapped","error","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","constructor","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","iter","toString","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","ucscProcessedTranscript","feature","children","thickStart","get","thickEnd","blocks","filter","child","sort","a","b","newChildren","block","start","end","prime","leftPrime","rightPrime","newData","tags","tag","subfeatures","uniqueId","id","chromStarts","chromStart","chromEnd","chrom","blockStarts","blockSizes","blockCount","SimpleFeature","data","BaseFeatureDataAdapter","config","readConfObject","bigbed","BigBed","filehandle","openLocation","parser","_this","getHeader","BED","refsByName","opts","version","fileType","fields","rest","f","fromEntries","map","comment","refId","refsByNumber","region","refName","signal","ObservableCreate","observer","_this2","getFeatureStream","basesPerSpan","pipe","mergeAll","parseLine","starts","sizes","blocksOffset","bmin","bmax","subscribe","BedTabixAdapter","bed","TabixIndexedFile","csiFilehandle","tbiFilehandle","chunkCacheSize","getReferenceSequenceNames","line","split","defs","defline","includes","field","trim","query","getMetadata","colRef","columnNumbers","ref","colSame","colStart","colEnd","getNames","names","getLines","lineCallback","fileOffset","l","defaultParser","score"],"mappings":"wvGAEA,MAAeA,s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tE,KAAK,CACpBuE,mBAAaA,cAAYZ,GACzBG,MAAOyD,EACPxD,IAAKyD,EACL7O,KAAM,WAKRmO,EAAKtN,cACPyL,EAAKsE,MAAQtE,EAAK6B,EAAKtN,qBAElByL,EAAKL,aACLK,EAAKP,kBACLO,EAAKN,aACNwB,EAAI,IAAInB,SACTC,OACHnB,MAAAA,EACAC,IAAAA,EACA2C,QAAAA,EACAnC,SAAAA,KAEIlK,EAAI8L,EAAE/C,IAAI,cAAgBJ,EAAwBmD,GAAKA,EAC7DU,EAASvH,KAAKjF,IAEhBsM,OAAQb,EAAKa,iBAEfE,EAASrE,6GACRsD,EAAKa,qCAGH,oCAvHsB,CAAC,cAAe"}
|
|
1
|
+
{"version":3,"file":"plugin-bed.cjs.production.min.js","sources":["../src/BigBedAdapter/configSchema.ts","../src/BedTabixAdapter/configSchema.ts","../src/index.ts","../../../node_modules/regenerator-runtime/runtime.js","../src/util.ts","../src/BigBedAdapter/BigBedAdapter.ts","../src/BedTabixAdapter/BedTabixAdapter.ts"],"sourcesContent":["import { ConfigurationSchema } from '@jbrowse/core/configuration'\n\nexport default ConfigurationSchema(\n 'BigBedAdapter',\n {\n bigBedLocation: {\n type: 'fileLocation',\n defaultValue: { uri: '/path/to/my.bb', locationType: 'UriLocation' },\n },\n },\n { explicitlyTyped: true },\n)\n","import { ConfigurationSchema } from '@jbrowse/core/configuration'\nimport { types } from 'mobx-state-tree'\n\nexport default ConfigurationSchema(\n 'BedTabixAdapter',\n {\n bedGzLocation: {\n type: 'fileLocation',\n defaultValue: { uri: '/path/to/my.bed.gz', locationType: 'UriLocation' },\n },\n\n index: ConfigurationSchema('TabixIndex', {\n indexType: {\n model: types.enumeration('IndexType', ['TBI', 'CSI']),\n type: 'stringEnum',\n defaultValue: 'TBI',\n },\n location: {\n type: 'fileLocation',\n defaultValue: {\n uri: '/path/to/my.bed.gz.tbi',\n locationType: 'UriLocation',\n },\n },\n }),\n\n columnNames: {\n type: 'stringArray',\n description: 'List of column names',\n defaultValue: [],\n },\n\n scoreColumn: {\n type: 'string',\n description: 'The column to use as a \"score\" attribute',\n defaultValue: '',\n },\n\n autoSql: {\n type: 'string',\n description: 'The autoSql definition for the data fields in the file',\n defaultValue: '',\n },\n },\n { explicitlyTyped: true },\n)\n","import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType'\nimport Plugin from '@jbrowse/core/Plugin'\nimport PluginManager from '@jbrowse/core/PluginManager'\nimport { configSchema as bigBedAdapterConfigSchema } from './BigBedAdapter'\nimport { configSchema as bedTabixAdapterConfigSchema } from './BedTabixAdapter'\nimport { FileLocation } from '@jbrowse/core/util/types'\nimport {\n makeIndex,\n makeIndexType,\n AdapterGuesser,\n getFileName,\n} from '@jbrowse/core/util/tracks'\n\nexport default class BedPlugin extends Plugin {\n name = 'BedPlugin'\n\n install(pluginManager: PluginManager) {\n pluginManager.addAdapterType(\n () =>\n new AdapterType({\n name: 'BigBedAdapter',\n configSchema: bigBedAdapterConfigSchema,\n getAdapterClass: () =>\n import('./BigBedAdapter/BigBedAdapter').then(r => r.default),\n }),\n )\n pluginManager.addToExtensionPoint(\n 'Core-guessAdapterForLocation',\n (adapterGuesser: AdapterGuesser) => {\n return (\n file: FileLocation,\n index?: FileLocation,\n adapterHint?: string,\n ) => {\n const regexGuess = /\\.(bb|bigbed)$/i\n const adapterName = 'BigBedAdapter'\n const fileName = getFileName(file)\n if (regexGuess.test(fileName) || adapterHint === adapterName) {\n return {\n type: adapterName,\n bigBedLocation: file,\n }\n }\n return adapterGuesser(file, index, adapterHint)\n }\n },\n )\n\n pluginManager.addAdapterType(\n () =>\n new AdapterType({\n name: 'BedTabixAdapter',\n configSchema: bedTabixAdapterConfigSchema,\n getAdapterClass: () =>\n import('./BedTabixAdapter/BedTabixAdapter').then(r => r.default),\n }),\n )\n pluginManager.addToExtensionPoint(\n 'Core-guessAdapterForLocation',\n (adapterGuesser: AdapterGuesser) => {\n return (\n file: FileLocation,\n index?: FileLocation,\n adapterHint?: string,\n ) => {\n const regexGuess = /\\.bed\\.b?gz$/i\n const adapterName = 'BedTabixAdapter'\n const fileName = getFileName(file)\n const indexName = index && getFileName(index)\n if (regexGuess.test(fileName) || adapterHint === adapterName) {\n return {\n type: adapterName,\n bedGzLocation: file,\n index: {\n location: index || makeIndex(file, '.tbi'),\n indexType: makeIndexType(indexName, 'CSI', 'TBI'),\n },\n }\n }\n return adapterGuesser(file, index, adapterHint)\n }\n },\n )\n }\n}\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","import SimpleFeature, { Feature } from '@jbrowse/core/util/simpleFeature'\n\nexport function ucscProcessedTranscript(feature: Feature) {\n const children = feature.children()\n // split the blocks into UTR, CDS, and exons\n const thickStart = feature.get('thickStart')\n const thickEnd = feature.get('thickEnd')\n\n if (!thickStart && !thickEnd) {\n return feature\n }\n\n const blocks: Feature[] = children\n ? children\n .filter(child => child.get('type') === 'block')\n .sort((a, b) => a.get('start') - b.get('start'))\n : []\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const newChildren: Record<string, any> = []\n blocks.forEach(block => {\n const start = block.get('start')\n const end = block.get('end')\n if (thickStart >= end) {\n // left-side UTR\n const prime = feature.get('strand') > 0 ? 'five' : 'three'\n newChildren.push({\n type: `${prime}_prime_UTR`,\n start,\n end,\n })\n } else if (thickStart > start && thickStart < end && thickEnd >= end) {\n // UTR | CDS\n const prime = feature.get('strand') > 0 ? 'five' : 'three'\n newChildren.push(\n {\n type: `${prime}_prime_UTR`,\n start,\n end: thickStart,\n },\n {\n type: 'CDS',\n start: thickStart,\n end,\n },\n )\n } else if (thickStart <= start && thickEnd >= end) {\n // CDS\n newChildren.push({\n type: 'CDS',\n start,\n end,\n })\n } else if (thickStart > start && thickStart < end && thickEnd < end) {\n // UTR | CDS | UTR\n const leftPrime = feature.get('strand') > 0 ? 'five' : 'three'\n const rightPrime = feature.get('strand') > 0 ? 'three' : 'five'\n newChildren.push(\n {\n type: `${leftPrime}_prime_UTR`,\n start,\n end: thickStart,\n },\n {\n type: `CDS`,\n start: thickStart,\n end: thickEnd,\n },\n {\n type: `${rightPrime}_prime_UTR`,\n start: thickEnd,\n end,\n },\n )\n } else if (thickStart <= start && thickEnd > start && thickEnd < end) {\n // CDS | UTR\n const prime = feature.get('strand') > 0 ? 'three' : 'five'\n newChildren.push(\n {\n type: `CDS`,\n start,\n end: thickEnd,\n },\n {\n type: `${prime}_prime_UTR`,\n start: thickEnd,\n end,\n },\n )\n } else if (thickEnd <= start) {\n // right-side UTR\n const prime = feature.get('strand') > 0 ? 'three' : 'five'\n newChildren.push({\n type: `${prime}_prime_UTR`,\n start,\n end,\n })\n }\n })\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const newData: Record<string, any> = {}\n feature.tags().forEach(tag => {\n newData[tag] = feature.get(tag)\n })\n newData.subfeatures = newChildren\n newData.type = 'mRNA'\n newData.uniqueId = feature.id()\n delete newData.chromStarts\n delete newData.chromStart\n delete newData.chromEnd\n delete newData.chrom\n delete newData.blockStarts\n delete newData.blockSizes\n delete newData.blockCount\n delete newData.thickStart\n delete newData.thickEnd\n const newFeature = new SimpleFeature({\n data: newData,\n id: feature.id(),\n })\n return newFeature\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { BigBed } from '@gmod/bbi'\nimport BED from '@gmod/bed'\nimport {\n BaseFeatureDataAdapter,\n BaseOptions,\n} from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { Region, FileLocation } 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/simpleFeature'\nimport { map, mergeAll } from 'rxjs/operators'\nimport { readConfObject } from '@jbrowse/core/configuration'\nimport { Instance } from 'mobx-state-tree'\nimport configSchema from './configSchema'\nimport { ucscProcessedTranscript } from '../util'\nimport PluginManager from '@jbrowse/core/PluginManager'\nimport { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache'\n\ninterface BEDFeature {\n chrom: string\n chromStart: number\n chromEnd: number\n [key: string]: any\n}\n\ninterface Parser {\n parseLine: (line: string, opts: { uniqueId: string | number }) => BEDFeature\n}\n\nexport default class BigBedAdapter extends BaseFeatureDataAdapter {\n private bigbed: BigBed\n\n private parser: Promise<Parser>\n\n public constructor(\n config: Instance<typeof configSchema>,\n getSubAdapter?: getSubAdapterType,\n pluginManager?: PluginManager,\n ) {\n super(config, getSubAdapter, pluginManager)\n const bigBedLocation = readConfObject(\n config,\n 'bigBedLocation',\n ) as FileLocation\n this.bigbed = new BigBed({\n filehandle: openLocation(bigBedLocation, this.pluginManager),\n })\n\n this.parser = this.bigbed\n .getHeader()\n .then(({ autoSql }: { autoSql: string }) => new BED({ autoSql }))\n }\n\n public async getRefNames() {\n return Object.keys((await this.bigbed.getHeader()).refsByName)\n }\n\n async getHeader(opts?: BaseOptions) {\n const { version, fileType } = await this.bigbed.getHeader(opts)\n // @ts-ignore\n const { autoSql } = await this.parser\n const { fields, ...rest } = autoSql\n const f = Object.fromEntries(\n // @ts-ignore\n fields.map(({ name, comment }) => [name, comment]),\n )\n return { version, fileType, autoSql: { ...rest }, fields: f }\n }\n\n public async refIdToName(refId: number) {\n return ((await this.bigbed.getHeader()).refsByNumber[refId] || {}).name\n }\n\n public getFeatures(region: Region, opts: BaseOptions = {}) {\n const { refName, start, end } = region\n const { signal } = opts\n return ObservableCreate<Feature>(async observer => {\n try {\n const parser = await this.parser\n const ob = await this.bigbed.getFeatureStream(refName, start, end, {\n signal,\n basesPerSpan: end - start,\n })\n ob.pipe(\n mergeAll(),\n map(\n (r: {\n start: number\n end: number\n rest?: string\n uniqueId?: string\n }) => {\n const data = parser.parseLine(\n `${refName}\\t${r.start}\\t${r.end}\\t${r.rest}`,\n {\n uniqueId: r.uniqueId as string,\n },\n )\n\n const { blockCount, blockSizes, blockStarts, chromStarts } = data\n if (blockCount) {\n const starts = chromStarts || blockStarts || []\n const sizes = blockSizes\n const blocksOffset = r.start\n data.subfeatures = []\n\n for (let b = 0; b < blockCount; b += 1) {\n const bmin = (starts[b] || 0) + blocksOffset\n const bmax = bmin + (sizes[b] || 0)\n data.subfeatures.push({\n uniqueId: `${r.uniqueId}-${b}`,\n start: bmin,\n end: bmax,\n type: 'block',\n })\n }\n }\n if (r.uniqueId === undefined) {\n throw new Error('invalid bbi feature')\n }\n const { chromStart, chromEnd, chrom, ...rest } = data\n\n const f = new SimpleFeature({\n id: `${this.id}-${r.uniqueId}`,\n data: {\n ...rest,\n start: r.start,\n end: r.end,\n refName,\n },\n })\n\n // collection of heuristics for suggesting that this feature\n // should be converted to a gene, CNV bigbed has many gene like\n // features including thickStart and blockCount but no strand\n return f.get('thickStart') &&\n f.get('blockCount') &&\n f.get('strand') !== 0\n ? ucscProcessedTranscript(f)\n : f\n },\n ),\n ).subscribe(observer)\n } catch (e) {\n observer.error(e)\n }\n }, opts.signal)\n }\n\n public freeResources(): void {}\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport BED from '@gmod/bed'\nimport {\n BaseFeatureDataAdapter,\n BaseOptions,\n} from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { FileLocation, Region } 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/simpleFeature'\nimport { TabixIndexedFile } from '@gmod/tabix'\nimport { Instance } from 'mobx-state-tree'\nimport { readConfObject } from '@jbrowse/core/configuration'\nimport { ucscProcessedTranscript } from '../util'\nimport MyConfigSchema from './configSchema'\nimport PluginManager from '@jbrowse/core/PluginManager'\nimport { getSubAdapterType } from '@jbrowse/core/data_adapters/dataAdapterCache'\n\nexport default class BedTabixAdapter extends BaseFeatureDataAdapter {\n private parser: any\n\n protected bed: TabixIndexedFile\n\n protected columnNames: string[]\n\n protected scoreColumn: string\n\n public static capabilities = ['getFeatures', 'getRefNames']\n\n public constructor(\n config: Instance<typeof MyConfigSchema>,\n getSubAdapter?: getSubAdapterType,\n pluginManager?: PluginManager,\n ) {\n super(config, getSubAdapter, pluginManager)\n const bedGzLocation = readConfObject(\n config,\n 'bedGzLocation',\n ) as FileLocation\n const index = readConfObject(config, 'index') as {\n indexType?: string\n location: FileLocation\n }\n const autoSql = readConfObject(config, 'autoSql') as string\n const { location, indexType } = index\n\n this.bed = new TabixIndexedFile({\n filehandle: openLocation(bedGzLocation, this.pluginManager),\n csiFilehandle:\n indexType === 'CSI'\n ? openLocation(location, this.pluginManager)\n : undefined,\n tbiFilehandle:\n indexType !== 'CSI'\n ? openLocation(location, this.pluginManager)\n : undefined,\n chunkCacheSize: 50 * 2 ** 20,\n })\n this.columnNames = readConfObject(config, 'columnNames')\n this.scoreColumn = readConfObject(config, 'scoreColumn')\n this.parser = new BED({ autoSql })\n }\n\n public async getRefNames(opts: BaseOptions = {}) {\n return this.bed.getReferenceSequenceNames(opts)\n }\n\n async getHeader() {\n return this.bed.getHeader()\n }\n\n defaultParser(fields: string[], line: string) {\n return Object.fromEntries(line.split('\\t').map((f, i) => [fields[i], f]))\n }\n\n async getNames() {\n if (this.columnNames.length) {\n return this.columnNames\n }\n const header = await this.bed.getHeader()\n const defs = header.split('\\n').filter(f => !!f)\n const defline = defs[defs.length - 1]\n return defline && defline.includes('\\t')\n ? defline\n .slice(1)\n .split('\\t')\n .map(field => field.trim())\n : null\n }\n\n public getFeatures(query: Region, opts: BaseOptions = {}) {\n return ObservableCreate<Feature>(async observer => {\n const meta = await this.bed.getMetadata()\n const { columnNumbers } = meta\n const colRef = columnNumbers.ref - 1\n const colStart = columnNumbers.start - 1\n const colEnd = columnNumbers.end - 1\n // colSame handles special case for tabix where a single column is both\n // the start and end, this is assumed to be covering the base at this\n // position (e.g. tabix -s 1 -b 2 -e 2) begin and end are same\n const colSame = colStart === colEnd ? 1 : 0\n const names = await this.getNames()\n await this.bed.getLines(query.refName, query.start, query.end, {\n lineCallback: (line: string, fileOffset: number) => {\n const l = line.split('\\t')\n const refName = l[colRef]\n const start = +l[colStart]\n\n const end = +l[colEnd] + colSame\n const uniqueId = `${this.id}-${fileOffset}`\n const data = names\n ? this.defaultParser(names, line)\n : this.parser.parseLine(line, { uniqueId })\n\n const { blockCount, blockSizes, blockStarts, chromStarts } = data\n\n if (blockCount) {\n const starts = chromStarts || blockStarts || []\n const sizes = blockSizes\n const blocksOffset = start\n data.subfeatures = []\n\n for (let b = 0; b < blockCount; b += 1) {\n const bmin = (starts[b] || 0) + blocksOffset\n const bmax = bmin + (sizes[b] || 0)\n data.subfeatures.push({\n uniqueId: `${uniqueId}-${b}`,\n start: bmin,\n end: bmax,\n type: 'block',\n })\n }\n }\n\n if (this.scoreColumn) {\n data.score = data[this.scoreColumn]\n }\n delete data.chrom\n delete data.chromStart\n delete data.chromEnd\n const f = new SimpleFeature({\n ...data,\n start,\n end,\n refName,\n uniqueId,\n })\n const r = f.get('thickStart') ? ucscProcessedTranscript(f) : f\n observer.next(r)\n },\n signal: opts.signal,\n })\n observer.complete()\n }, opts.signal)\n }\n\n public freeResources(): void {}\n}\n"],"names":["ConfigurationSchema","bigBedLocation","type","defaultValue","uri","locationType","explicitlyTyped","bedGzLocation","index","indexType","model","types","enumeration","location","columnNames","description","scoreColumn","autoSql","BedPlugin","Plugin","pluginManager","addAdapterType","AdapterType","name","configSchema","bigBedAdapterConfigSchema","getAdapterClass","Promise","then","r","addToExtensionPoint","adapterGuesser","file","adapterHint","fileName","getFileName","test","bedTabixAdapterConfigSchema","indexName","makeIndex","makeIndexType","runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","generator","create","Generator","context","Context","_invoke","state","method","arg","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","fn","call","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","__await","unwrapped","error","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","iter","keys","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","globalThis","Function","ucscProcessedTranscript","feature","children","thickStart","get","thickEnd","blocks","filter","child","sort","a","b","newChildren","block","start","end","prime","leftPrime","rightPrime","newData","tags","tag","subfeatures","uniqueId","id","chromStarts","chromStart","chromEnd","chrom","blockStarts","blockSizes","blockCount","SimpleFeature","data","BaseFeatureDataAdapter","config","getSubAdapter","readConfObject","bigbed","BigBed","filehandle","openLocation","_this","parser","getHeader","BED","refsByName","opts","version","fileType","fields","rest","f","fromEntries","map","comment","refId","refsByNumber","region","refName","signal","ObservableCreate","observer","_this2","getFeatureStream","basesPerSpan","pipe","mergeAll","parseLine","starts","sizes","blocksOffset","bmin","bmax","subscribe","BedTabixAdapter","bed","TabixIndexedFile","csiFilehandle","tbiFilehandle","chunkCacheSize","getReferenceSequenceNames","line","split","defs","defline","includes","field","trim","query","getMetadata","colRef","columnNumbers","ref","colSame","colStart","colEnd","getNames","names","getLines","lineCallback","fileOffset","l","defaultParser","score"],"mappings":"y4GAEA,MAAeA,sBACb,gBACA,CACEC,eAAgB,CACdC,KAAM,eACNC,aAAc,CAAEC,IAAK,iBAAkBC,aAAc,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C,0BAAnBC,mBACAnC,EAAKa,IAAIuB,SAASV,EAAM9B,QAAS8B,EAAM3E,MAAO2E,EAAM1E,IAAK,CAC7DqF,aAAc,SAAClB,EAAcmB,OACrBC,EAAIpB,EAAKC,MAAM,MACfxB,EAAU2C,EAAEX,GACZ7E,GAASwF,EAAEP,GAEXhF,GAAOuF,EAAEN,GAAUF,EACnBvE,YAAcwC,EAAKvC,eAAM6E,GACzBpE,EAAOiE,EACTnC,EAAKwC,cAAcL,EAAOhB,GAC1BnB,EAAKpB,OAAOyB,UAAUc,EAAM,CAAE3D,SAAAA,IAE1BQ,EAAqDE,EAArDF,cAEJA,EAAY,KACRsC,EAHqDpC,EAAhBR,aAAgBQ,EAA7BJ,aAGe,GACvCyC,EAJqDrC,EAAzCH,WAKZyC,EAAezD,EACrBmB,EAAKX,YAAc,OAEd,IAAIX,EAAI,EAAGA,EAAIoB,EAAYpB,GAAK,EAAG,KAChC6D,GAAQH,EAAO1D,IAAM,GAAK4D,EAC1BE,EAAOD,GAAQF,EAAM3D,IAAM,GACjCsB,EAAKX,YAAYtE,KAAK,CACpBuE,mBAAaA,cAAYZ,GACzBG,MAAO0D,EACPzD,IAAK0D,EACLzP,KAAM,WAKR+O,EAAKjO,cACPmM,EAAKuE,MAAQvE,EAAK8B,EAAKjO,qBAElBmM,EAAKL,aACLK,EAAKP,kBACLO,EAAKN,aACNyB,EAAI,IAAIpB,SACTC,OACHnB,MAAAA,EACAC,IAAAA,EACA4C,QAAAA,EACApC,SAAAA,KAEI5K,EAAIyM,EAAEhD,IAAI,cAAgBJ,EAAwBoD,GAAKA,EAC7DU,EAASxH,KAAK3F,IAEhBiN,OAAQb,EAAKa,iBAEfE,EAASvE,6GACRwD,EAAKa,qCAGH,oCAjIsB,CAAC,cAAe"}
|
package/dist/plugin-bed.esm.js
CHANGED
|
@@ -2,6 +2,7 @@ import AdapterType from '@jbrowse/core/pluggableElementTypes/AdapterType';
|
|
|
2
2
|
import Plugin from '@jbrowse/core/Plugin';
|
|
3
3
|
import { ConfigurationSchema, readConfObject } from '@jbrowse/core/configuration';
|
|
4
4
|
import { types } from 'mobx-state-tree';
|
|
5
|
+
import { getFileName, makeIndex, makeIndexType } from '@jbrowse/core/util/tracks';
|
|
5
6
|
import { BigBed } from '@gmod/bbi';
|
|
6
7
|
import BED from '@gmod/bed';
|
|
7
8
|
import { BaseFeatureDataAdapter } from '@jbrowse/core/data_adapters/BaseAdapter';
|
|
@@ -213,6 +214,8 @@ function _assertThisInitialized(self) {
|
|
|
213
214
|
function _possibleConstructorReturn(self, call) {
|
|
214
215
|
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
215
216
|
return call;
|
|
217
|
+
} else if (call !== void 0) {
|
|
218
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
|
216
219
|
}
|
|
217
220
|
|
|
218
221
|
return _assertThisInitialized(self);
|
|
@@ -241,7 +244,8 @@ var bigBedAdapterConfigSchema = /*#__PURE__*/ConfigurationSchema('BigBedAdapter'
|
|
|
241
244
|
bigBedLocation: {
|
|
242
245
|
type: 'fileLocation',
|
|
243
246
|
defaultValue: {
|
|
244
|
-
uri: '/path/to/my.bb'
|
|
247
|
+
uri: '/path/to/my.bb',
|
|
248
|
+
locationType: 'UriLocation'
|
|
245
249
|
}
|
|
246
250
|
}
|
|
247
251
|
}, {
|
|
@@ -252,7 +256,8 @@ var bedTabixAdapterConfigSchema = /*#__PURE__*/ConfigurationSchema('BedTabixAdap
|
|
|
252
256
|
bedGzLocation: {
|
|
253
257
|
type: 'fileLocation',
|
|
254
258
|
defaultValue: {
|
|
255
|
-
uri: '/path/to/my.bed.gz'
|
|
259
|
+
uri: '/path/to/my.bed.gz',
|
|
260
|
+
locationType: 'UriLocation'
|
|
256
261
|
}
|
|
257
262
|
},
|
|
258
263
|
index: /*#__PURE__*/ConfigurationSchema('TabixIndex', {
|
|
@@ -264,7 +269,8 @@ var bedTabixAdapterConfigSchema = /*#__PURE__*/ConfigurationSchema('BedTabixAdap
|
|
|
264
269
|
location: {
|
|
265
270
|
type: 'fileLocation',
|
|
266
271
|
defaultValue: {
|
|
267
|
-
uri: '/path/to/my.bed.gz.tbi'
|
|
272
|
+
uri: '/path/to/my.bed.gz.tbi',
|
|
273
|
+
locationType: 'UriLocation'
|
|
268
274
|
}
|
|
269
275
|
}
|
|
270
276
|
}),
|
|
@@ -316,6 +322,22 @@ var BedPlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
316
322
|
}
|
|
317
323
|
});
|
|
318
324
|
});
|
|
325
|
+
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', function (adapterGuesser) {
|
|
326
|
+
return function (file, index, adapterHint) {
|
|
327
|
+
var regexGuess = /\.(bb|bigbed)$/i;
|
|
328
|
+
var adapterName = 'BigBedAdapter';
|
|
329
|
+
var fileName = getFileName(file);
|
|
330
|
+
|
|
331
|
+
if (regexGuess.test(fileName) || adapterHint === adapterName) {
|
|
332
|
+
return {
|
|
333
|
+
type: adapterName,
|
|
334
|
+
bigBedLocation: file
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
return adapterGuesser(file, index, adapterHint);
|
|
339
|
+
};
|
|
340
|
+
});
|
|
319
341
|
pluginManager.addAdapterType(function () {
|
|
320
342
|
return new AdapterType({
|
|
321
343
|
name: 'BedTabixAdapter',
|
|
@@ -327,6 +349,27 @@ var BedPlugin = /*#__PURE__*/function (_Plugin) {
|
|
|
327
349
|
}
|
|
328
350
|
});
|
|
329
351
|
});
|
|
352
|
+
pluginManager.addToExtensionPoint('Core-guessAdapterForLocation', function (adapterGuesser) {
|
|
353
|
+
return function (file, index, adapterHint) {
|
|
354
|
+
var regexGuess = /\.bed\.b?gz$/i;
|
|
355
|
+
var adapterName = 'BedTabixAdapter';
|
|
356
|
+
var fileName = getFileName(file);
|
|
357
|
+
var indexName = index && getFileName(index);
|
|
358
|
+
|
|
359
|
+
if (regexGuess.test(fileName) || adapterHint === adapterName) {
|
|
360
|
+
return {
|
|
361
|
+
type: adapterName,
|
|
362
|
+
bedGzLocation: file,
|
|
363
|
+
index: {
|
|
364
|
+
location: index || makeIndex(file, '.tbi'),
|
|
365
|
+
indexType: makeIndexType(indexName, 'CSI', 'TBI')
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
return adapterGuesser(file, index, adapterHint);
|
|
371
|
+
};
|
|
372
|
+
});
|
|
330
373
|
}
|
|
331
374
|
}]);
|
|
332
375
|
|
|
@@ -430,11 +473,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
430
473
|
|
|
431
474
|
|
|
432
475
|
var IteratorPrototype = {};
|
|
433
|
-
|
|
434
|
-
IteratorPrototype[iteratorSymbol] = function () {
|
|
476
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
|
435
477
|
return this;
|
|
436
|
-
};
|
|
437
|
-
|
|
478
|
+
});
|
|
438
479
|
var getProto = Object.getPrototypeOf;
|
|
439
480
|
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
440
481
|
|
|
@@ -445,8 +486,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
445
486
|
}
|
|
446
487
|
|
|
447
488
|
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
448
|
-
GeneratorFunction.prototype =
|
|
449
|
-
|
|
489
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
|
490
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
|
491
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
|
450
492
|
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
|
|
451
493
|
// Iterator interface in terms of a single ._invoke method.
|
|
452
494
|
|
|
@@ -551,11 +593,9 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
551
593
|
}
|
|
552
594
|
|
|
553
595
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
554
|
-
|
|
555
|
-
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
596
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
|
556
597
|
return this;
|
|
557
|
-
};
|
|
558
|
-
|
|
598
|
+
});
|
|
559
599
|
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
560
600
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
561
601
|
// the final result produced by the iterator.
|
|
@@ -732,13 +772,12 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
732
772
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
733
773
|
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
734
774
|
|
|
735
|
-
Gp
|
|
775
|
+
define(Gp, iteratorSymbol, function () {
|
|
736
776
|
return this;
|
|
737
|
-
};
|
|
738
|
-
|
|
739
|
-
Gp.toString = function () {
|
|
777
|
+
});
|
|
778
|
+
define(Gp, "toString", function () {
|
|
740
779
|
return "[object Generator]";
|
|
741
|
-
};
|
|
780
|
+
});
|
|
742
781
|
|
|
743
782
|
function pushTryEntry(locs) {
|
|
744
783
|
var entry = {
|
|
@@ -1050,14 +1089,19 @@ var runtime_1 = /*#__PURE__*/createCommonjsModule(function (module) {
|
|
|
1050
1089
|
} catch (accidentalStrictMode) {
|
|
1051
1090
|
// This module should not be running in strict mode, so the above
|
|
1052
1091
|
// assignment should always work unless something is misconfigured. Just
|
|
1053
|
-
// in case runtime.js accidentally runs in strict mode,
|
|
1092
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
|
1093
|
+
// we can explicitly access globalThis. In older engines we can escape
|
|
1054
1094
|
// strict mode using a global Function call. This could conceivably fail
|
|
1055
1095
|
// if a Content Security Policy forbids using Function, but in that case
|
|
1056
1096
|
// the proper solution is to fix the accidental strict mode problem. If
|
|
1057
1097
|
// you've misconfigured your bundler to force strict mode and applied a
|
|
1058
1098
|
// CSP to forbid Function, and you're not willing to fix either of those
|
|
1059
1099
|
// problems, please detail your unique predicament in a GitHub issue.
|
|
1060
|
-
|
|
1100
|
+
if (typeof globalThis === "object") {
|
|
1101
|
+
globalThis.regeneratorRuntime = runtime;
|
|
1102
|
+
} else {
|
|
1103
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
1104
|
+
}
|
|
1061
1105
|
}
|
|
1062
1106
|
});
|
|
1063
1107
|
|
|
@@ -1175,22 +1219,23 @@ function ucscProcessedTranscript(feature) {
|
|
|
1175
1219
|
return newFeature;
|
|
1176
1220
|
}
|
|
1177
1221
|
|
|
1178
|
-
var _excluded = ["fields"]
|
|
1222
|
+
var _excluded = ["fields"],
|
|
1223
|
+
_excluded2 = ["chromStart", "chromEnd", "chrom"];
|
|
1179
1224
|
|
|
1180
1225
|
var BigBedAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
1181
1226
|
_inherits(BigBedAdapter, _BaseFeatureDataAdapt);
|
|
1182
1227
|
|
|
1183
1228
|
var _super = /*#__PURE__*/_createSuper(BigBedAdapter);
|
|
1184
1229
|
|
|
1185
|
-
function BigBedAdapter(config) {
|
|
1230
|
+
function BigBedAdapter(config, getSubAdapter, pluginManager) {
|
|
1186
1231
|
var _this;
|
|
1187
1232
|
|
|
1188
1233
|
_classCallCheck(this, BigBedAdapter);
|
|
1189
1234
|
|
|
1190
|
-
_this = _super.call(this, config);
|
|
1235
|
+
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
1191
1236
|
var bigBedLocation = readConfObject(config, 'bigBedLocation');
|
|
1192
1237
|
_this.bigbed = new BigBed({
|
|
1193
|
-
filehandle: openLocation(bigBedLocation)
|
|
1238
|
+
filehandle: openLocation(bigBedLocation, _this.pluginManager)
|
|
1194
1239
|
});
|
|
1195
1240
|
_this.parser = _this.bigbed.getHeader().then(function (_ref) {
|
|
1196
1241
|
var autoSql = _ref.autoSql;
|
|
@@ -1383,12 +1428,11 @@ var BigBedAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
1383
1428
|
throw new Error('invalid bbi feature');
|
|
1384
1429
|
}
|
|
1385
1430
|
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
delete data.chrom;
|
|
1431
|
+
var rest = _objectWithoutProperties(data, _excluded2);
|
|
1432
|
+
|
|
1389
1433
|
var f = new SimpleFeature({
|
|
1390
1434
|
id: "".concat(_this2.id, "-").concat(r.uniqueId),
|
|
1391
|
-
data: _objectSpread2(_objectSpread2({},
|
|
1435
|
+
data: _objectSpread2(_objectSpread2({}, rest), {}, {
|
|
1392
1436
|
start: r.start,
|
|
1393
1437
|
end: r.end,
|
|
1394
1438
|
refName: refName
|
|
@@ -1438,21 +1482,21 @@ var BedTabixAdapter = /*#__PURE__*/function (_BaseFeatureDataAdapt) {
|
|
|
1438
1482
|
|
|
1439
1483
|
var _super = /*#__PURE__*/_createSuper(BedTabixAdapter);
|
|
1440
1484
|
|
|
1441
|
-
function BedTabixAdapter(config) {
|
|
1485
|
+
function BedTabixAdapter(config, getSubAdapter, pluginManager) {
|
|
1442
1486
|
var _this;
|
|
1443
1487
|
|
|
1444
1488
|
_classCallCheck(this, BedTabixAdapter);
|
|
1445
1489
|
|
|
1446
|
-
_this = _super.call(this, config);
|
|
1490
|
+
_this = _super.call(this, config, getSubAdapter, pluginManager);
|
|
1447
1491
|
var bedGzLocation = readConfObject(config, 'bedGzLocation');
|
|
1448
1492
|
var index = readConfObject(config, 'index');
|
|
1449
1493
|
var autoSql = readConfObject(config, 'autoSql');
|
|
1450
1494
|
var location = index.location,
|
|
1451
1495
|
indexType = index.indexType;
|
|
1452
1496
|
_this.bed = new TabixIndexedFile({
|
|
1453
|
-
filehandle: openLocation(bedGzLocation),
|
|
1454
|
-
csiFilehandle: indexType === 'CSI' ? openLocation(location) : undefined,
|
|
1455
|
-
tbiFilehandle: indexType !== 'CSI' ? openLocation(location) : undefined,
|
|
1497
|
+
filehandle: openLocation(bedGzLocation, _this.pluginManager),
|
|
1498
|
+
csiFilehandle: indexType === 'CSI' ? openLocation(location, _this.pluginManager) : undefined,
|
|
1499
|
+
tbiFilehandle: indexType !== 'CSI' ? openLocation(location, _this.pluginManager) : undefined,
|
|
1456
1500
|
chunkCacheSize: 50 * Math.pow(2, 20)
|
|
1457
1501
|
});
|
|
1458
1502
|
_this.columnNames = readConfObject(config, 'columnNames');
|