1"use strict";(self.webpackChunkcov_spectrum_website=self.webpackChunkcov_spectrum_website||[]).push([[8370],{8370:(e,t,s)=>{s.r(t),s.d(t,{default:()=>o});var n=s(579),r=s(5043),l=s(9062),i=s(6496);const a=(0,l.m)()({dialogContent:{width:"80em"},textAreaFont:{fontFamily:"Courier New"},error:{color:"red",fontSize:"0.8em"}});const o=(0,l.o)((function(e){let{model:t,handleClose:s}=e;const{classes:o}=a(),{activeFilters:c}=t,[d,h]=(0,r.useState)(c.join("\n")),[u,x]=(0,r.useState)();return(0,r.useEffect)((()=>{try{d.split("\n").map((e=>e.trim())).filter((e=>!!e)).map((e=>{!function(e){i.j.stringToJexlExpression(e)}(e.trim())})),x(void 0)}catch(e){console.error(e),x(e)}}),[d]),(0,n.jsxs)(l.a.Dialog,{maxWidth:"xl",open:!0,onClose:s,title:"Add track filters",children:[(0,n.jsxs)(l.D,{children:[(0,n.jsxs)("div",{children:["Add filters, in jexl format, one per line, starting with the string jexl:. Examples:"," ",(0,n.jsxs)("ul",{children:[(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{children:"jexl:get(feature,'name')=='BRCA1'"})," - show only feature where the name attribute is BRCA1"]}),(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{children:"jexl:get(feature,'type')=='gene'"})," - show only gene type features in a GFF that has many other feature types"]}),(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{children:"jexl:get(feature,'score') > 400"})," - show only features that have a score greater than 400"]}),(0,n.jsxs)("li",{children:[(0,n.jsx)("code",{children:"jexl:get(feature,'end') - get(feature,'start') < 1000000"})," ","- show only features with length less than 1Mbp"]})]})]}),u?(0,n.jsx)("p",{className:o.error,children:`${u}`}):null,(0,n.jsx)(l.c,{variant:"outlined",multiline:!0,minRows:5,maxRows:10,className:o.dialogContent,fullWidth:!0,value:d,onChange:e=>{h(e.target.value)},slotProps:{input:{classes:{input:o.textAreaFont}}}})]}),(0,n.jsxs)(l.d,{children:[(0,n.jsx)(l.B,{variant:"contained",color:"primary",type:"submit",autoFocus:!0,disabled:!!u,onClick:()=>{t.setJexlFilters(d.split("\n")),s()},children:"Submit"}),(0,n.jsx)(l.B,{variant:"contained",color:"secondary",onClick:()=>{s()},children:"Cancel"})]})]})}))},6496:(e,t,s)=>{s.d(t,{j:()=>n});var n=(0,s(9062).y)()}}]); 2//# sourceMappingURL=8370.6e8f53e2.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.