Mercurial > repos > fubar > jbrowse2
diff x/static/js/8435.484d30f8.chunk.js @ 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 diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/x/static/js/8435.484d30f8.chunk.js Sat Oct 05 23:58:05 2024 +0000 @@ -0,0 +1,2 @@ +"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8435],{48435:(n,e,a)=>{a.d(e,{doConnect:()=>L});class t{constructor(n=[],e){this.data={};const{checkIndent:a=!0,skipValidation:t=!1}=null!=e?e:{};let r,i,o;r="string"==typeof n?n.trimEnd().split(/\r?\n/):n||[];for(const n of r){if(""===n)throw new Error("Invalid stanza, contained blank lines");if(n.trim().startsWith("#"))continue;if(n.trimEnd().endsWith("\\")){const e=n.trimEnd().slice(0,-1);o?o+=e.trimStart():o=e;continue}let e=n;if(o&&(e=o+e.trimStart(),o=void 0),null!=i?i:a){const n=e.match(/^([ \t]+)/);if(void 0===i)n?[,i]=n:i="";else if(""===i&&null!==n||i&&n&&i!==n[1])throw new Error("Inconsistent indentation of stanza")}else i="";const t=e.trim(),r=t.indexOf(" ");if(-1===r){if(!this.nameKey)throw new Error("First line in a stanza must have both a key and a value");if(this.data[t])continue;this.data[t]="";continue}const s=t.slice(0,r),c=t.slice(r+1);if(this.data[s]&&c!==this.data[s])throw new Error(`Got duplicate key with a different value in stanza: "${s}" key has both ${this.data[s]} and ${c}`);this.nameKey||(this.nameKey=s,this.name=t.slice(r+1)),this.data[s]=c}t||this.validate()}validate(){}}class r{constructor(n=[],e){this.data={};const{checkIndent:a=!0,skipValidation:r=!1}=null!=e?e:{};let i;i="string"==typeof n?n.trimEnd().split(/(?:[\t ]*\r?\n){2,}/):n||[];for(const n of i){if(""===n)throw new Error("Invalid stanza, was empty");if(n.trim().startsWith("#")&&n.trimEnd().split(/\r?\n/).map((n=>n.trim())).every((n=>n.startsWith("#"))))continue;const e=new t(n,{checkIndent:a});if(this.nameKey){if(e.nameKey!==this.nameKey)throw new Error(`The first line in each stanza must have the same key. Saw both ${this.nameKey} and ${e.nameKey}`)}else this.nameKey=e.nameKey;if(!e.name)throw new Error(`No stanza name: ${e.name}`);if(this.data[e.name])throw new Error(`Got duplicate stanza name: ${e.name}`);this.data[e.name]=e}r||this.validate()}validate(){}}function i(n,e,a=""){const t=[];for(const a of e)n.data[a]||t.push(a);if(t.length>0)throw new Error(`${a} is missing required entr${1===t.length?"y":"ies"}: ${t.join(", ")}`)}class o extends r{constructor(n,e){super(n,{...e,checkIndent:!1})}validate(){var n;if("track"!==this.nameKey)throw new Error(`trackDb has "${this.nameKey}" instead of "track" as the first line in each track`);for(const[e,a]of Object.entries(this.data)){const t=Object.keys(a.data);i(a,["track","shortLabel"],`Track ${e}`);const r=new Set(["superTrack","compositeTrack","container","view"]);if(!t.some((n=>r.has(n)))){if(!t.includes("bigDataUrl"))throw new Error(`Track ${e} is missing required key "bigDataUrl"`);if(!t.includes("type")&&!Object.keys(this.settings(e)).includes("type"))throw new Error(`Neither track ${e} nor any of its parent tracks have the required key "type"`)}let o=e;do{o=null===(n=this.data[o])||void 0===n?void 0:n.parent,o&&([o]=o.split(" "))}while(o);const s=this.data[e];s&&(this.data[e]=s)}}settings(n){var e;if(!this.data[n])throw new Error(`Track ${n} does not exist`);const a=[n];let t=n;do{t=null===(e=this.data[t])||void 0===e?void 0:e.parent,t&&a.push(t)}while(t);const r={};a.reverse();for(const n of a){const e=this.data[n];if(e)for(const[n,a]of Object.entries(e))r[n]=a}return r}}class s extends r{validate(n=["genome","trackDb"]){if("genome"!==this.nameKey)throw new Error('Genomes file must begin with a line like "genome <genome_name>"');for(const[e,a]of Object.entries(this.data))i(a,n,`genome ${e}`)}}class c extends t{validate(){i(this,["hub","shortLabel","longLabel","genomesFile","email"],"Hub file")}}class l{constructor(n){const[e,a,...r]=n.trimEnd().split(/(?:[\t ]*\r?\n){2,}/);this.hubData=new t(e),this.validateHub(),this.genome=new t(a),this.validateGenomeSection(),this.tracks=new o(r.join("\n\n"),{skipValidation:!1})}validateHub(){if("hub"!==this.hubData.nameKey)throw new Error('Hub file must begin with a line like "hub <hub_name>"');i(this.hubData,["hub","shortLabel","longLabel","email","descriptionUrl"])}validateGenomeSection(){if("genome"!==this.genome.nameKey)throw new Error('Genomes file must begin with a line like "genome <genome_name>"')}}var d=a(99546),h=a(99834),m=a(91468);async function u(n){const e=await(0,h.openLocation)(n).readFile("utf8");return new o(e)}function p(n,e){return{uri:new URL(n,new URL(e.uri,e.baseUri)).href,locationType:"UriLocation"}}function b(n,e,a){return p(n||e,a)}function f(n,e){return n?{uri:n,locationType:"LocalPath"}:{uri:e,locationType:"UriLocation"}}function g({trackDb:n,trackDbLoc:e,assemblyName:a,sequenceAdapter:t}){return Object.entries(n.data).map((([r,i])=>{const o=Object.keys(i),s=new Set(["superTrack","compositeTrack","container","view"]);if(o.some((n=>s.has(n))))return;const c=[];let l=r;do{l=n.data[l]?.data.parent||"",l&&(l=l.split(" ")[0],c.push(n.data[l]))}while(l);c.reverse();const h=function({track:n,categories:e,trackDbLoc:a,trackDb:t,sequenceAdapter:r}){const i=n.data.type||t.data[n.data.parent||""]?.data.type||"",o=n.data.shortLabel||"",s=n.data.bigDataUrl||"",c=n.data.bigDataIndex||"",l=(0,d.isUriLocation)(a);let h=i.split(" ")[0]||"";"bam"===h&&s.toLowerCase().endsWith("cram")&&(h="cram");const u=l?p(s,a):f(s);switch(h){case"bam":return{type:"AlignmentsTrack",name:n.data.longLabel,description:n.data.longLabel,category:e,adapter:{type:"BamAdapter",bamLocation:u,index:{location:l?b(c,`${s}.bai`,a):f(c,`${s}.bai`)}}};case"cram":return{type:"AlignmentsTrack",name:o,description:n.data.longLabel,category:e,adapter:{type:"CramAdapter",cramLocation:u,craiLocation:l?b(c,`${s}.crai`,a):f(c,`${s}.crai`),sequenceAdapter:r}};case"bigBarChart":case"bigBed":case"bigGenePred":case"bigChain":case"bigInteract":case"bigMaf":case"bigNarrowPeak":case"bigPsl":return{type:"FeatureTrack",name:o,description:n.data.longLabel,category:e,adapter:{type:"BigBedAdapter",bigBedLocation:u}};case"bigWig":return{type:"QuantitativeTrack",name:o,description:n.data.longLabel,category:e,adapter:{type:"BigWigAdapter",bigWigLocation:u}};case"vcfTabix":return{type:"VariantTrack",name:o,description:n.data.longLabel,category:e,adapter:{type:"VcfTabixAdapter",vcfGzLocation:u,index:{location:l?b(c,`${s}.tbi`,a):f(c,`${s}.tbi`)}}};case"hic":return{type:"HicTrack",name:o,description:n.data.longLabel,category:e,adapter:{type:"HicAdapter",hicLocation:u}};default:return(0,m.generateUnknownTrackConf)(o,h,e)}}({track:i,categories:c.map((n=>n?.data.shortLabel)).filter((n=>!!n)),trackDbLoc:e,trackDb:n,sequenceAdapter:t});return{...h,trackId:`ucsc-trackhub-${(0,d.objectHash)(h)}`,assemblyNames:[a]}})).filter(d.notEmpty)}"ailMel1\nallMis1\nanoCar1\nanoCar2\nanoGam1\nanoGam3\napiMel1\napiMel2\naplCal1\naptMan1\naquChr2\nbalAcu1\nbisBis1\nbosTau2\nbosTau3\nbosTau4\nbosTau6\nbosTau7\nbosTau8\nbraFlo1\ncaeJap1\ncaePb1\ncaePb2\ncaeRem2\ncaeRem3\ncalJac1\ncalJac3\ncalMil1\ncanFam1\ncanFam3\ncavPor3\ncb3\nce10\nce11\nce2\nce4\nce6\ncerSim1\nchlSab2\nchoHof1\nchrPic1\nci1\nci2\nci3\ncriGri1\ncriGriChoV1\ndanRer10\ndanRer11\ndanRer3\ndanRer4\ndanRer5\ndanRer6\ndanRer7\ndasNov3\ndipOrd1\ndm1\ndm2\ndm3\ndm6\ndp2\ndp3\ndroAna1\ndroAna2\ndroEre1\ndroGri1\ndroMoj1\ndroMoj2\ndroPer1\ndroSec1\ndroSim1\ndroVir1\ndroVir2\ndroYak1\ndroYak2\neboVir3\nechTel1\nechTel2\nequCab1\nequCab2\neriEur1\neriEur2\nfelCat3\nfelCat4\nfelCat5\nfelCat8\nfr1\nfr2\nfr3\ngadMor1\ngalGal2\ngalGal3\ngalGal4\ngalGal5\ngalGal6\ngalVar1\ngasAcu1\ngeoFor1\ngorGor3\ngorGor4\ngorGor5\nhetGla1\nhetGla2\nhg16\nhg18\nhg19\nhg38\nlatCha1\nloxAfr3\nmacEug2\nmacFas5\nmanPen1\nmelGal1\nmelGal5\nmelUnd1\nmicMur1\nmicMur2\nmm10\nmm7\nmm8\nmm9\nmonDom2\nmonDom4\nmonDom5\nmusFur1\nmyoLuc2\nnanPar1\nnasLar1\nnomLeu1\nnomLeu2\nnomLeu3\nochPri2\nochPri3\noreNil2\nornAna1\nornAna2\noryCun2\noryLat2\notoGar3\noviAri1\noviAri3\noviAri4\npanPan1\npanPan2\npanTro1\npanTro2\npanTro3\npanTro4\npanTro5\npanTro6\npapAnu2\npapHam1\npetMar1\npetMar2\nponAbe2\nponAbe3\npriPac1\nproCap1\npteVam1\nrheMac2\nrheMac3\nrheMac8\nrhiRox1\nrn4\nrn5\nrn6\nsacCer1\nsacCer2\nsacCer3\nsaiBol1\nsarHar1\nsorAra1\nsorAra2\nspeTri2\nstrPur1\nstrPur2\nsusScr11\nsusScr2\nsusScr3\ntaeGut1\ntaeGut2\ntarSyr1\ntarSyr2\ntetNig1\ntetNig2\nthaSir1\ntriMan1\ntupBel1\nturTru2\nventer1\nvicPac1\nvicPac2\nxenLae2\nxenTro1\nxenTro2\nxenTro3\nxenTro7\nxenTro9".split(/\r?\n/);var y=a(68584),w=a(32761);function k(n,e){return new URL(n,e).href}async function L(n){const e=(0,d.getSession)(n),a=[];try{const t=(0,y.getConf)(n,"hubTxtLocation"),r=await(0,h.openLocation)(t).readFile("utf8"),i=k(t.uri,t.baseUri),{assemblyManager:o}=e;if(r.includes("useOneFile on")){const a=new l(r),{genome:s,tracks:c}=a,d=s.name;o.get(d)||e.addSessionAssembly({name:d,sequence:{type:"ReferenceSequenceTrack",trackId:`${d}-${(0,w.Ak)()}`,adapter:{type:"TwoBitAdapter",twoBitLocation:{uri:k(s.data.twoBitPath,i)},chromSizesLocation:{uri:k(s.data.chromSizes,i)}}}});const h=o.get(d),m=g({trackDb:c,trackDbLoc:t,assemblyName:d,sequenceAdapter:(0,y.getConf)(h,["sequence","adapter"])});n.addTrackConfs(m)}else{const i=new c(r).data.genomesFile;if(!i)throw new Error("genomesFile not found on hub");const l=k(t.uri,t.baseUri),d=l?{uri:k(i,l),locationType:"UriLocation"}:{localPath:i,locationType:"LocalPathLocation"},m=await async function(n){const e=await(0,h.openLocation)(n).readFile("utf8");return new s(e)}(d),p={};for(const[e,t]of Object.entries(m.data)){const r=(0,y.getConf)(n,"assemblyNames");if(r.length>0&&!r.includes(e))continue;const s=o.get(e);if(!s){a.push(e);continue}const c=t.data.trackDb;if(!c)throw new Error("genomesFile not found on hub");const d=new URL(i,l),h=l?{uri:new URL(c,d).href,locationType:"UriLocation"}:{localPath:c,locationType:"LocalPathLocation"},m=g({trackDb:await u(h),trackDbLoc:h,assemblyName:e,sequenceAdapter:(0,y.getConf)(s,["sequence","adapter"])});n.addTrackConfs(m),p[e]=m.length}const b=Object.entries(p),f=b.length?`Loaded data from these assemblies: ${b.map((([n,e])=>`${n} (${e} tracks)`)).join(", ")}`:"",w=a.length?`Skipped data from these assemblies: ${a.join(", ")}`:"";e.notify([f,w].filter((n=>!!n)).join(". "),"success")}}catch(a){console.error(a),e.notifyError(`${(0,y.getConf)(n,"name")}: "${a}"`,a),e.breakConnection?.(n.configuration)}}}}]); +//# sourceMappingURL=8435.484d30f8.chunk.js.map \ No newline at end of file