view x/static/js/5998.22bd8296.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 source

"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[5998],{55998:(e,t,a)=>{a.d(t,{convertTrackConfig:()=>o}),a(99834);var r=a(99546),i=a(91468);function o(e,t,a){const o={trackId:(0,r.objectHash)(e),name:e.key||e.label},n=e.metadata&&(e.metadata.description||e.metadata.Description);n&&(o.description=n);const c=e.category||e.metadata?.category;o.category=c?c.split(/\s*\/\s*/):[];const{storeClass:p}=e;if(!e.urlTemplate){if(!p?.endsWith("FromConfig")){const t=e.key||e.label;return console.warn(`Could not import JBrowse1 track "${t}" because it does not have a "urlTemplate" or is not a "FromConfig" track`),(0,i.generateUnsupportedTrackConf)(o.name,t,o.category)}return function(e,t){const a=(e.features||[]).map((e=>{const t=JSON.parse(JSON.stringify(e));return t.refName=e.seq_id,t.uniqueId=`${e.seq_id}:${e.start}-${e.end}:${e.name||""}`,t}));return t.adapter={type:"FromConfigAdapter",features:a},t.type="FeatureTrack",t}(e,o)}const l=e=>new URL(e,`${t}/`).href.replaceAll(/%7B/gi,"{").replaceAll(/%7D/gi,"}"),u=l(e.urlTemplate);if(p){if("JBrowse/Store/SeqFeature/BAM"===p){const t={type:"BamAdapter",bamLocation:{uri:u,locationType:"UriLocation"}};return e.baiUrlTemplate?t.index={location:{uri:l(e.baiUrlTemplate),locationType:"UriLocation"}}:e.csiUrlTemplate?t.index={location:{uri:l(e.csiUrlTemplate),locationType:"UriLocation"},indexType:"CSI"}:t.index={location:{uri:`${u}.bai`,locationType:"UriLocation"}},{...o,type:"AlignmentsTrack",adapter:t}}if("JBrowse/Store/SeqFeature/CRAM"===p){const t={type:"CramAdapter",cramLocation:{uri:u,locationType:"UriLocation"},sequenceAdapter:a};return t.craiLocation=e.craiUrlTemplate?{uri:l(e.craiUrlTemplate),locationType:"UriLocation"}:{uri:`${u}.crai`,locationType:"UriLocation"},{...o,type:"AlignmentsTrack",adapter:t}}if("JBrowse/Store/SeqFeature/NCList"===p)return{...o,type:"FeatureTrack",adapter:{type:"NCListAdapter",rootUrlTemplate:{uri:u,locationType:"UriLocation"}}};if("JBrowse/Store/SeqFeature/BigWig"===p||"JBrowse/Store/BigWig"===p)return e.type?.endsWith("XYPlot")?o.defaultRendering="xyplot":e.type?.endsWith("Density")&&(o.defaultRendering="density"),{...o,type:"QuantitativeTrack",adapter:{type:"BigWigAdapter",bigWigLocation:{uri:u,locationType:"UriLocation"}}};if("JBrowse/Store/SeqFeature/VCFTabix"===p){const t={type:"VcfTabixAdapter",vcfGzLocation:{uri:u,locationType:"UriLocation"}};return e.tbiUrlTemplate?t.index={location:{uri:l(e.tbiUrlTemplate),locationType:"UriLocation"}}:e.csiUrlTemplate?t.index={location:{uri:l(e.csiUrlTemplate),locationType:"UriLocation"},indexType:"CSI"}:t.index={location:{uri:`${u}.tbi`,locationType:"UriLocation"}},{...o,type:"VariantTrack",adapter:t}}if("JBrowse/Store/SeqFeature/VCFTribble"===p)return(0,i.generateUnsupportedTrackConf)(o.name,`VCFTribble (${u})`,o.category);if("JBrowse/Store/SeqFeature/GFF3"===p)return{...o,type:"FeatureTrack",adapter:{type:"Gff3Adapter",gffLocation:{uri:u,locationType:"UriLocation"}}};if("JBrowse/Store/SeqFeature/BigBed"===p)return{...o,type:"FeatureTrack",adapter:{type:"BigBedAdapter",bigBedLocation:{uri:u,locationType:"UriLocation"}}};if("JBrowse/Store/SeqFeature/GFF3Tabix"===p){const t={type:"Gff3TabixAdapter",gffGzLocation:{uri:u,locationType:"UriLocation"}};return e.tbiUrlTemplate?t.index={location:{uri:l(e.tbiUrlTemplate),locationType:"UriLocation"}}:e.csiUrlTemplate?t.index={location:{uri:l(e.csiUrlTemplate),locationType:"UriLocation"},indexType:"CSI"}:t.index={location:{uri:`${u}.tbi`,locationType:"UriLocation"}},{...o,type:"FeatureTrack",adapter:t}}if("JBrowse/Store/SeqFeature/BED"===p)return(0,i.generateUnsupportedTrackConf)(o.name,`BED (${u})`,o.category);if("JBrowse/Store/SeqFeature/BEDTabix"===p){const t={type:"BedTabixAdapter",bedGzLocation:{uri:u,locationType:"UriLocation"}};return e.tbiUrlTemplate?t.index={location:{uri:l(e.tbiUrlTemplate),locationType:"UriLocation"}}:e.csiUrlTemplate?t.index={location:{uri:l(e.csiUrlTemplate),locationType:"UriLocation"},indexType:"CSI"}:t.index={location:{uri:`${u}.tbi`,locationType:"UriLocation"}},{...o,type:"FeatureTrack",adapter:t}}if("JBrowse/Store/SeqFeature/GTF"===p)return{...o,type:"FeatureTrack",adapter:{type:"GtfAdapter",gtfLocation:{uri:u,locationType:"UriLocation"}}};if("JBrowse/Store/SeqFeature/StaticChunked"===p||"JBrowse/Store/Sequence/StaticChunked"===p)return(0,i.generateUnsupportedTrackConf)(o.name,`StaticChunked (${u})`,o.category);if("JBrowse/Store/SeqFeature/UnindexedFasta"===p)return(0,i.generateUnsupportedTrackConf)(o.name,`UnindexedFasta (${u})`,o.category);if("JBrowse/Store/SeqFeature/IndexedFasta"===p){const t={type:"IndexedFastaAdapter",fastaLocation:{uri:u,locationType:"UriLocation"}};return t.faiLocation=e.faiUrlTemplate?{uri:l(e.faiUrlTemplate),locationType:"UriLocation"}:{uri:`${u}.fai`,locationType:"UriLocation"},{...o,type:"SequenceTrack",adapter:t}}if("JBrowse/Store/SeqFeature/BgzipIndexedFasta"===p){const t={type:"BgzipFastaAdapter",fastaLocation:{uri:u,locationType:"UriLocation"}};return t.faiLocation=e.faiUrlTemplate?{uri:l(e.faiUrlTemplate),locationType:"UriLocation"}:{uri:`${u}.fai`,locationType:"UriLocation"},t.gziLocation=e.gziUrlTemplate?{uri:l(e.gziUrlTemplate),locationType:"UriLocation"}:{uri:`${u}.gzi`,locationType:"UriLocation"},{...o,type:"ReferenceSequenceTrack",adapter:t}}if("JBrowse/Store/SeqFeature/TwoBit"===p)return{...o,type:"ReferenceSequenceTrack",adapter:{type:"TwoBitAdapter",twoBitLocation:{uri:u,locationType:"UriLocation"}}}}return o.adapter=(0,i.guessAdapter)({uri:u,locationType:"UriLocation"},void 0,u),o.adapter.type===i.UNSUPPORTED?(0,i.generateUnsupportedTrackConf)(o.name,u,o.category):o.adapter.type===i.UNKNOWN?(0,i.generateUnknownTrackConf)(o.name,u,o.category):(o.type=(0,i.guessTrackType)(o.adapter.type),"QuantitativeTrack"===o.type&&(e.type?.endsWith("XYPlot")?o.defaultRendering="xyplot":e.type?.endsWith("Density")&&(o.defaultRendering="density")),o)}}}]);
//# sourceMappingURL=5998.22bd8296.chunk.js.map