view x/static/js/3578.058bdae5.chunk.js @ 125:49f3d3878413 draft default tip

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

"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[3578],{93578:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var s=a(46377),n=a(99834),r=a(66885),i=a(99546),u=a(68584);class c extends s.BaseSequenceAdapter{async getRefNames(e){const{fasta:t}=await this.setup(e);return[...t.keys()]}async getRegions(e){const{fasta:t}=await this.setup(e);return[...t.entries()].map((([e,t])=>({refName:e,start:0,end:t.sequence.length})))}async setupPre(e){const t=this.getConf("fastaLocation"),a=(s=await(0,n.openLocation)(t,this.pluginManager).readFile("utf8"),new Map(s.split(">").filter((e=>/\S/.test(e))).map((e=>{const[t,...a]=e.split("\n"),[s,...n]=t.split(" "),r=a.join("").replace(/\s/g,"");return[s,{description:n.join(" "),sequence:r}]}))));var s;return{fasta:new Map([...a.entries()].map((([e,t])=>[(0,u.readConfObject)(this.config,"rewriteRefNames",{refName:e})||e,t])))}}async getHeader(){const e=this.getConf("metadataLocation");return""===e.uri||"/path/to/fa.metadata.yaml"===e.uri?null:(0,n.openLocation)(e,this.pluginManager).readFile("utf8")}async setup(e){return this.setupP||(this.setupP=this.setupPre(e).catch((e=>{throw this.setupP=void 0,e}))),this.setupP}getFeatures(e,t){const{refName:a,start:s,end:n}=e;return(0,r.ObservableCreate)((async e=>{const{fasta:r}=await this.setup(t),u=r.get(a);u&&e.next(new i.SimpleFeature({id:`${a}-${s}-${n}`,data:{refName:a,start:s,end:n,seq:u.sequence.slice(s,n)}})),e.complete()}))}freeResources(){}}}}]);
//# sourceMappingURL=3578.058bdae5.chunk.js.map