"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[7608],{97608:(n,e,a)=>{a.d(e,{fetchGenomesFile:()=>c,fetchHubFile:()=>i,fetchTrackDbFile:()=>s,generateTracks:()=>d});var r=a(90872),t=a(59062),o=a(99512);"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/);async function i(n){try{const e=await(0,t.openLocation)(n).readFile("utf8"),{HubFile:r}=await a.e(3638).then(a.bind(a,33638));return new r(e)}catch(e){throw new Error("Not a valid hub.txt file, got error: '".concat(e,"'"))}}async function c(n){const e=await(0,t.openLocation)(n).readFile("utf8"),{GenomesFile:r}=await a.e(3638).then(a.bind(a,33638));return new r(e)}async function s(n){const e=await(0,t.openLocation)(n).readFile("utf8"),{TrackDbFile:r}=await a.e(3638).then(a.bind(a,33638));return new r(e)}function l(n,e){return{uri:new URL(n,e.uri).href,locationType:"UriLocation"}}function p(n,e,a){return l(n||e,a)}function u(n,e){return n?{uri:n,locationType:"LocalPath"}:{uri:e,locationType:"UriLocation"}}function d(n,e,a,t){const o=[];for(const[c,s]of n.entries()){const l=[...s.keys()],p=new Set(["superTrack","compositeTrack","container","view"]);if(l.some((n=>p.has(n))))continue;const u=[];let d=c;do{var i;d=(null===(i=n.get(d))||void 0===i?void 0:i.get("parent"))||"",d&&([d]=d.split(" "),u.push(n.get(d)))}while(d);u.reverse();const b=g(s,u.map((n=>null===n||void 0===n?void 0:n.get("shortLabel"))).filter((n=>!!n)),e,n,t);o.push({...b,trackId:"ucsc-trackhub-".concat((0,r.objectHash)(b)),assemblyNames:[a]})}return o}function g(n,e,a,t,i){var c;let s=n.get("type");const d=n.get("shortLabel")||"",g=n.get("bigDataUrl")||"",b=n.get("bigDataIndex")||"",m=(0,r.isUriLocation)(a);var h;s||(s=null===(h=t.get(n.get("parent")||""))||void 0===h?void 0:h.get("type"));let T=(null===(c=s)||void 0===c?void 0:c.split(" ")[0])||"";"bam"===T&&g.toLowerCase().endsWith("cram")&&(T="cram");const f=m?l(g,a):u(g);switch(T){case"bam":return{type:"AlignmentsTrack",name:n.get("shortLabel"),description:n.get("longLabel"),category:e,adapter:{type:"BamAdapter",bamLocation:f,index:{location:m?p(b,g+".bai",a):u(b,g+".bai")}}};case"bigBarChart":case"bigChain":case"bigInteract":case"bigMaf":case"bigPsl":return{type:"FeatureTrack",name:d,description:n.get("longLabel"),category:e,adapter:{type:"BigBedAdapter",bigBedLocation:f},renderer:{type:"SvgFeatureRenderer"}};case"bigBed":case"bigGenePred":case"bigNarrowPeak":return{type:"FeatureTrack",name:d,description:n.get("longLabel"),category:e,adapter:{type:"BigBedAdapter",bigBedLocation:f}};case"bigWig":return{type:"QuantitativeTrack",name:d,description:n.get("longLabel"),category:e,adapter:{type:"BigWigAdapter",bigWigLocation:f}};case"cram":return{type:"AlignmentsTrack",name:d,description:n.get("longLabel"),category:e,adapter:{type:"CramAdapter",cramLocation:f,craiLocation:m?p(b,g+".crai",a):u(b,g+".crai"),sequenceAdapter:i}};case"peptideMapping":return(0,o.generateUnsupportedTrackConf)(d,T,e);case"vcfTabix":return{type:"VariantTrack",name:d,description:n.get("longLabel"),category:e,adapter:{type:"VcfTabixAdapter",vcfGzLocation:f,index:{location:m?p(b,g+".tbi",a):u(b,g+".tbi")}}};case"hic":return{type:"HicTrack",name:d,description:n.get("longLabel"),category:e,adapter:{type:"HicAdapter",hicLocation:f}};default:return(0,o.generateUnknownTrackConf)(d,T,e)}}}}]);
//# sourceMappingURL=7608.860c3310.chunk.js.map