Mercurial > repos > fubar > jbrowse2
view x/static/js/2820.3c0e09be.chunk.js.map @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author | fubar |
---|---|
date | Sat, 05 Oct 2024 23:58:05 +0000 |
parents | |
children |
line wrap: on
line source
{"version":3,"file":"static/js/2820.3c0e09be.chunk.js","mappings":"sMACA,MAAMA,EACmB,oBAAhBC,YAA8B,IAAIA,YAAY,aAAUC,ECOlD,MAAMC,UAAqBC,EAAAA,QACxC,cAAMC,CAASC,GACb,MAAMC,GAAMC,EAAAA,EAAAA,cAAaC,KAAKC,QAAQ,iBAAkBD,KAAKE,eACvDC,QAAgBL,EAAIM,SAASP,GAEnC,ODkBG,SAAuBM,GAC5B,IAAIE,EAAQ,GACRC,EAAQ,GACRC,EAAK,EACLC,EAAK,EACLC,EAAK,EACLC,EAAK,EACLC,EAAS,EACTC,EAAK,EACLC,EAAQ,GACRC,EAAI,EACJC,EAAI,EACJC,GAAU,EAEd,MAAMC,EAAU,GACVC,EAAQ,IAAIC,OAAO,mCAEzB,IAAIC,EAAa,EACbC,EAAI,EACR,KAAOD,EAAajB,EAAOmB,QAAQ,CACjC,MAAMC,EAAIpB,EAAOqB,QAAQ,KAAMJ,GAC/B,IAAW,IAAPG,EACF,MAEF,MAAME,EAAItB,EAAOuB,SAASN,EAAYG,GAChCI,GAAQpC,GAASqC,OAAOH,IAAMA,EAAEI,YAAYC,OAGlD,GAFAV,EAAaG,EAAI,EACjBF,IACIM,EAAM,CACR,MAAMI,EAAIb,EAAMc,KAAKL,GACrB,GAAU,OAANI,EAAY,CACd1B,EAAQ0B,EAAE,GACVzB,EAAQyB,EAAE,GACVf,GAAU,EACV,QACF,CACA,IAAKA,EACH,SAEF,MAAMiB,EAAIN,EAAKO,MAAM,KACrB,GAAiB,IAAbD,EAAEX,OAAc,CAClB,MAAMa,GAAMF,EAAE,GACRG,GAAM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AM,GAEhB,KAAO,CACL,MAAMe,GAAKnB,EAAI,EACfzB,GAAK4C,EACL3C,GAAK2C,EAAI,EACLA,EAAI,GACN7C,EAAM8B,KAAKe,GAAK,GAGd7C,EAAMS,OAAS,GAA0C,IAAT,GAA3BT,EAAMA,EAAMS,OAAS,IAC5CT,EAAMA,EAAMS,OAAS,IAAO,GAE5BT,EAAM8B,KAAM,GAEhB,CACF,CACF,CACF,CACA,OAAO1B,CACT,CCvIW0C,EADKC,EAAAA,EAAAA,QAAOzD,SAAgB0D,EAAAA,EAAAA,OAAM1D,GAAUA,EAErD,E","sources":["../../../plugins/comparative-adapters/src/DeltaAdapter/util.ts","../../../plugins/comparative-adapters/src/DeltaAdapter/DeltaAdapter.ts"],"sourcesContent":["import type { Buffer } from 'buffer'\nconst decoder =\n typeof TextDecoder !== 'undefined' ? new TextDecoder('utf8') : undefined\n\n/* paf2delta from paftools.js in the minimap2 repository, license reproduced below\n *\n * The MIT License\n *\n * Copyright (c) 2018- Dana-Farber Cancer Institute\n * 2017-2018 Broad Institute, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nexport function paf_delta2paf(buffer: Buffer) {\n let rname = ''\n let qname = ''\n let qs = 0\n let qe = 0\n let rs = 0\n let re = 0\n let strand = 0\n let NM = 0\n let cigar = [] as number[]\n let x = 0\n let y = 0\n let seen_gt = false\n\n const records = []\n const regex = new RegExp(/^>(\\S+)\\s+(\\S+)\\s+(\\d+)\\s+(\\d+)/)\n\n let blockStart = 0\n let i = 0\n while (blockStart < buffer.length) {\n const n = buffer.indexOf('\\n', blockStart)\n if (n === -1) {\n break\n }\n const b = buffer.subarray(blockStart, n)\n const line = (decoder?.decode(b) || b.toString()).trim()\n blockStart = n + 1\n i++\n if (line) {\n const m = regex.exec(line)\n if (m !== null) {\n rname = m[1]!\n qname = m[2]!\n seen_gt = true\n continue\n }\n if (!seen_gt) {\n continue\n }\n const t = line.split(' ')\n if (t.length === 7) {\n const t0 = +t[0]!\n const t1 = +t[1]!\n const t2 = +t[2]!\n const t3 = +t[3]!\n const t4 = +t[4]!\n strand = (t0 < t1 && t2 < t3) || (t0 > t1 && t2 > t3) ? 1 : -1\n rs = +(t0 < t1 ? t0 : t1) - 1\n re = +(t1 > t0 ? t1 : t0)\n qs = +(t2 < t3 ? t2 : t3) - 1\n qe = +(t3 > t2 ? t3 : t2)\n x = y = 0\n NM = t4\n cigar = []\n } else if (t.length === 1) {\n const d = +t[0]!\n if (d === 0) {\n let blen = 0\n const cigar_str = []\n\n if (re - rs - x !== qe - qs - y) {\n throw new Error(`inconsistent alignment on line ${i}`)\n }\n cigar.push((re - rs - x) << 4)\n for (const entry of cigar) {\n const rlen = entry >> 4\n blen += rlen\n cigar_str.push(rlen + 'MID'.charAt(cigar[i]! & 0xf))\n }\n\n records.push({\n qname,\n qstart: qs,\n qend: qe,\n tname: rname,\n tstart: rs,\n tend: re,\n strand,\n extra: {\n numMatches: blen - NM,\n blockLen: blen,\n mappingQual: 0,\n NM,\n cg: cigar_str.join(''),\n },\n })\n } else if (d > 0) {\n const l = d - 1\n x += l + 1\n y += l\n if (l > 0) {\n cigar.push(l << 4)\n }\n\n if (cigar.length > 0 && (cigar[cigar.length - 1]! & 0xf) === 2) {\n cigar[cigar.length - 1]! += 1 << 4\n } else {\n cigar.push((1 << 4) | 2)\n } // deletion\n } else {\n const l = -d - 1\n x += l\n y += l + 1\n if (l > 0) {\n cigar.push(l << 4)\n }\n\n if (cigar.length > 0 && (cigar[cigar.length - 1]! & 0xf) === 1) {\n cigar[cigar.length - 1]! += 1 << 4\n } else {\n cigar.push((1 << 4) | 1)\n } // insertion\n }\n }\n }\n }\n return records\n}\n","import { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { openLocation } from '@jbrowse/core/util/io'\nimport { unzip } from '@gmod/bgzf-filehandle'\nimport { isGzip } from '@jbrowse/core/util'\nimport type { Buffer } from 'buffer'\n// locals\nimport PAFAdapter from '../PAFAdapter/PAFAdapter'\nimport { paf_delta2paf } from './util'\n\nexport default class DeltaAdapter extends PAFAdapter {\n async setupPre(opts?: BaseOptions) {\n const loc = openLocation(this.getConf('deltaLocation'), this.pluginManager)\n const buffer = (await loc.readFile(opts)) as Buffer\n const buf = isGzip(buffer) ? await unzip(buffer) : buffer\n return paf_delta2paf(buf)\n }\n}\n"],"names":["decoder","TextDecoder","undefined","DeltaAdapter","PAFAdapter","setupPre","opts","loc","openLocation","this","getConf","pluginManager","buffer","readFile","rname","qname","qs","qe","rs","re","strand","NM","cigar","x","y","seen_gt","records","regex","RegExp","blockStart","i","length","n","indexOf","b","subarray","line","decode","toString","trim","m","exec","t","split","t0","t1","t2","t3","d","blen","cigar_str","Error","push","entry","rlen","charAt","qstart","qend","tname","tstart","tend","extra","numMatches","blockLen","mappingQual","cg","join","l","paf_delta2paf","isGzip","unzip"],"sourceRoot":""}