chromosomix 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/THIRD-PARTY-NOTICES.txt +2 -2
- package/dist/assets/{ConnectCard-Dxqttpl6.js → ConnectCard-CNwlR_yV.js} +1 -1
- package/dist/assets/{Tour-Bc2ltrKR.js → Tour-Dn4L7jES.js} +1 -1
- package/dist/assets/analysis.worker-2Jx8_NWN.js +8 -0
- package/dist/assets/{annotations.worker-B-6-la1Q.js → annotations.worker-Bd03nKdJ.js} +26 -26
- package/dist/assets/{index-VoOi0yM1.js → index-BZqg8J4S.js} +32 -32
- package/dist/assets/{reader.worker-Zet76cxB.js → reader.worker-DKXrm0nO.js} +1 -1
- package/dist/assets/{three-B_ANgE46.js → three-BZagS2ne.js} +1 -1
- package/dist/assets/{tutorial-BOLFVhL8.js → tutorial-DOptkiKU.js} +1 -1
- package/dist/assets/{workspace-DxOEjrSc.js → workspace-ZYKuBclx.js} +11 -13
- package/dist/index.html +1 -1
- package/dist-cli/THIRD-PARTY-NOTICES.txt +2 -2
- package/dist-cli/chromosomix.mjs +862 -406
- package/package.json +1 -1
- package/dist/assets/analysis.worker-D6DADpOm.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as Se,F as qe,L as Te,G as xe,H as Ae}from"./index-VoOi0yM1.js";const m="4DNESC23ZYOF",A="4dn",r="chr15",oe="4DNFIKI77KEM",re="4DNFI3OPG4RB",ae="4DNFI4GZZC7Z",v={start:3e7,end:6e7},S={start:381e5,end:50025e3},$e=15e6,$=5e3,q=4,d={rows:45662501,cols:48312501},E=47215001,Ee=25e3,Oe="1",De="analysis:compartment-e1",Ne="analysis:insulation-w",O="analysis:insulation:insulation-domains";function f(e){return e instanceof HTMLElement&&e.getClientRects().length>0}function i(e,n=document){for(const c of n.querySelectorAll(e))if(f(c))return c;return null}function l(e){return(e?.textContent??"").replace(/\s+/g," ").trim()}function p(){return i(".analysis-drawer:not(.collapsed)")}function se(e){for(const n of document.querySelectorAll(".analysis-row"))if(f(n)&&l(n.querySelector(".analysis-row-title"))===e)return n;return null}function y(e){const n=e.charAt(0).toUpperCase()+e.slice(1);return i(`.panel-${e} .panel-tab`)??i(`.head-panels button[aria-label="${n} panel"]`)}function ie(e){return i(`.panel-${e}:not(.collapsed) .panel-column-body`)??y(e)}function Ie(e){for(const n of document.querySelectorAll(".panel-analysis section.analysis-card"))if(f(n)&&l(n.querySelector(".card-head")).startsWith(e))return n;return null}function le(){return i('select.res-pick, [role="radiogroup"][aria-label="resolution"]')}function ge(){for(const e of document.querySelectorAll(".controls-card"))if(f(e)&&l(e.querySelector(".controls-title"))==="Map")return e;return null}function ce(e){for(const n of ge()?.querySelectorAll("label.field")??[])if(l(n.querySelector(".field-label"))===e)return n.querySelector("select, input");return null}function Ce(){for(const e of ge()?.querySelectorAll("button")??[])if(l(e)==="O/E")return e;return null}function _(e){for(const n of p()?.querySelectorAll(".param-field")??[]){if(l(n.querySelector(".field-label"))!==e)continue;const c=n.querySelector('input[type="number"]')??n.querySelector('input:not([type="range"])');return c instanceof HTMLInputElement?c:null}return null}function Me(e,n){e!==null&&(e.value=n,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})))}function H(){for(const e of document.querySelectorAll("section.annotation-card"))if(f(e)&&l(e.querySelector(".card-head, .card-title, h3")).startsWith("Manual annotations"))return e;return null}function D(e){for(const n of H()?.querySelectorAll(".manual-form")??[])if(l(n.querySelector(".manual-form-title"))===e)return n;return null}function ue(e){for(const n of e?.querySelectorAll("button")??[])if(l(n)==="add")return n;return null}function N(){for(const e of document.querySelectorAll(".controls-card"))if(f(e)&&l(e.querySelector(".controls-title"))==="Export")return e.querySelector(".export-row");return null}function Re(e){for(const n of p()?.querySelectorAll("label.param-field")??[]){if(l(n.querySelector(".field-label"))!==e)continue;const c=n.querySelector("select");return c instanceof HTMLSelectElement?c:null}return null}function Le(){const e=Re("phase by gene density");e===null||e.value===""||(e.value="",e.dispatchEvent(new Event("change",{bubbles:!0})))}function de(e){for(const n of p()?.querySelectorAll(".analysis-figure")??[])if(l(n.querySelector(".analysis-figure-head")).startsWith(e))return n;return null}function he(){for(const e of document.querySelectorAll(".store-drawer .portal-group"))if(f(e)&&l(e.querySelector(".portal-group-key"))===m)return e;return null}function I(){const e=i(".store-drawer .portal-search");return e instanceof HTMLInputElement?e:null}function pe(){const e=p()?.querySelector(".param-sequences");return e==null?null:[...e.querySelectorAll("label.param-check")].filter(n=>n.querySelector("input")?.checked===!0).map(n=>l(n.querySelector("span")))}function Pe(e){for(const n of p()?.querySelectorAll(".param-sequences label.param-check")??[])if(l(n.querySelector("span"))===e)return n;return null}function Fe(e){if(e===void 0)return null;for(const n of p()?.querySelectorAll("label.param-check")??[])if(l(n.querySelector("span"))===e.label)return n;return null}function me(){return p()?.querySelector(".analysis-run > button")??null}function C(e,n){return e!==null&&e.length===n.length&&e.every((c,M)=>c===n[M])}function z(e){return Array.isArray(e)?e.filter(n=>typeof n=="string"):null}function Be(e){return e===null||e.view!=="region"||e.region===void 0?null:e.region.split(":")[0]}function Ue(e){if(e===null||e.view!=="region"||e.region===void 0)return null;const n=/^([^:]+):([\d,]+)-([\d,]+)$/.exec(e.region);return n===null?null:{contig:n[1],start:Number(n[2].replace(/,/g,"")),end:Number(n[3].replace(/,/g,""))}}function fe(e){return i(`.content .tviewport .tr .td[title="${e}"]`)}function be(e){const n=i(".content input.input-region");n instanceof HTMLInputElement&&(n.value=e,n.dispatchEvent(new Event("input",{bubbles:!0})),n.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",bubbles:!0})))}function s(e){return e.toLocaleString("en-US")}function _e(e){const n=()=>e.view()?.uri.includes(oe)===!0||e.file()?.includes(oe)===!0,c=()=>Be(e.view())===r,M=t=>e.runs(t).some(o=>C(z(o.provenance.params.sequences),[r])),Z=t=>e.tracks()?.entries.find(o=>o.source.kind==="remote"&&o.source.url.includes(t)),ke=()=>e.tracks()?.byId(De),G=()=>e.tracks()?.entries.filter(t=>t.id.startsWith(Ne))??[],R=()=>{const t=G()[0];return t===void 0?null:i(`.ann-row[data-id="${t.id}"]`)},K=()=>R()?.querySelector(".ann-more")?.getAttribute("aria-expanded")==="true",Y=t=>e.saved().some(o=>o.toLowerCase().endsWith(t)),w=(t,o)=>t.contig===r&&Math.abs(t.bp-o)<=Ee,ye=()=>(e.marks()??[]).some(t=>t.kind==="arrowhead"&&(w(t.a,d.rows)&&w(t.b,d.cols)||w(t.a,d.cols)&&w(t.b,d.rows))),we=()=>(e.marks()??[]).some(t=>t.kind==="line"&&t.axis!=="horizontal"&&w(t.at,E)),T=()=>i(`.ann-row[data-id="${O}"]`),x=()=>T()?.querySelector(".ann-more")?.getAttribute("aria-expanded")==="true",L=()=>{const t=e.tracks()?.byId(O);return t!==void 0&&qe(t)==="lane"},V=()=>{const t=e.tracks()?.laneFor(O,Te)?.placement;return t===void 0?null:{bottom:t.bottom,left:t.left}},j=t=>{for(const o of T()?.querySelectorAll(".ann-place")??[])if(f(o)&&new RegExp(`\\b${t} edge\\b`).test(o.title))return o;return null},b=()=>i(".content .panel-grid"),P=t=>()=>t()??y("aesthetics"),Q=t=>()=>{const o=i(".content .heatmap-canvas");if(o===null)return null;const a=e.square({contig:r,...t});return a===null?o:{within:o,box:{left:a.left,top:a.top,right:a.right,bottom:a.bottom}}},X=Se()?"⇧ Shift and ⌥ Option":"Shift and Alt";let F=!1;const ve=()=>{if(F||fe(r)!==null)return;const t=i(".content .tviewport"),o=e.sequences()?.indexOf(r)??-1;if(t===null||o<0)return;F=!0;const a=t.querySelector(".tr")?.offsetHeight??28;t.scrollTop=Math.max(0,o*a-t.clientHeight/2),t.dispatchEvent(new Event("scroll"))},J=(t,o)=>({id:t,chapter:o,title:"Open the Analysis panel",text:"Analyses run here, in this page, on the map on screen.",target:()=>y("analysis"),done:()=>e.panelOpen("analysis"),needs:{holds:n,back:"open-set"}}),ee=(t,o,a,u,h)=>({id:t,chapter:o,title:u,text:h,action:"choose",target:P(()=>ce("score")),done:()=>e.score()===a,needs:{holds:n,back:"open-set"}}),te=(t,o,a,u,h={})=>{const W=`analysis-${o}`,g=()=>e.task()===o;return[J(W,t),...h.tour?.(W)??[],{id:o,chapter:t,title:`Choose ${a}`,text:u.choose,target:()=>se(a),done:g,needs:{holds:()=>e.panelOpen("analysis"),back:W},missing:"Not in the list — empty the box over it if a word is typed there."},{id:`${o}-none`,chapter:t,title:"Untick every sequence",text:u.none,prepare:h.setup,target:()=>p()?.querySelector('button[title="Untick every sequence"]')??null,done:()=>{const k=pe();return k!==null&&(k.length===0||C(k,[r]))},needs:{holds:g,back:o}},{id:`${o}-sequence`,chapter:t,title:`Tick ${r}`,text:u.tick,target:()=>Pe(r),done:()=>C(pe(),[r]),needs:{holds:g,back:o}},...h.form?.(g)??[],{id:`${o}-run`,chapter:t,title:"Run it",text:u.run,prepare:h.setup,target:me,done:()=>h.ran===void 0?M(o):e.runs(o).some(k=>C(z(k.provenance.params.sequences),[r])&&h.ran(k.provenance.params)),needs:{holds:()=>g()||e.running(o),back:o}},...h.after?.(g)??[],{id:`${o}-close`,chapter:t,title:"Back to the map",text:"The result is a track as well as a figure. Close the drawer to see it beside the map.",target:()=>p()?.querySelector(".analysis-drawer-head .btn-close")??null,done:()=>e.task()===null}]},ne=()=>{const t=G();return[Z(ae),Z(re),ke(),...t.length===0?[void 0]:t]},B=()=>ne().map(t=>Fe(t)),U=(t,o,a,u)=>({id:t,chapter:"Compartments",title:o,text:a,target:()=>Ie(o),needs:{holds:()=>e.panelOpen("analysis"),back:u}});return[{id:"welcome",chapter:"Welcome",title:"A first session, on real data",text:`Open a Hi-C map from the 4D Nucleome project, find its compartments, domains and a loop on ${r}, save what you made, and set it against 4DN’s own — in the real app, one step at a time.`,hero:!0,agenda:!0,next:"let’s go"},{id:"stores",chapter:"The 4DN store",title:"Open the data stores",text:"Stores are catalogues of published data, read from where they are kept. Press this button to open the drawer that holds them.",target:()=>i('.head-files button[aria-label="stores"]'),done:()=>e.store()!==null},{id:"store",chapter:"The 4DN store",title:"Switch to 4DN",text:"It opens on the lab’s own store, RSG. Press 4DN to switch to the 4D Nucleome project’s.",target:()=>i(`.store-drawer .store-tile[data-store="${A}"]`),done:()=>e.store()===A,needs:{holds:()=>e.store()!==null,back:"stores"}},{id:"search",chapter:"The 4DN store",title:"Find an experiment",text:["Type ",{name:m,copy:!0}," in the search box: Hi-C on K562 cells, about 190 million contacts."],action:"type",target:I,focus:!0,done:()=>I()?.value.toUpperCase().includes(m)===!0&&he()!==null,mistake:()=>{const t=(I()?.value??"").trim().toUpperCase();return t===""||m.startsWith(t)||t.includes(m)?null:t},needs:{holds:()=>e.store()===A,back:"store"},assist:{label:"type it for me",title:`Put ${m} in the search box`,run:()=>{const t=I();t!==null&&(t.value=m,t.dispatchEvent(new Event("input",{bubbles:!0})))}}},{id:"open-set",chapter:"The 4DN store",title:"Open it with its tracks",text:"One press opens the contact map with the tracks 4DN computed from it — compartments, insulation and boundaries — without downloading its 1.9 GB.",target:()=>he()?.querySelector(".portal-session")??null,done:n,needs:{holds:()=>e.store()===A||n(),back:"store"},missing:`Not on screen — type ${m} in the store’s search box again.`},{id:"look-general",chapter:"The map",title:"The General panel",text:"What the file is: its bin size and contacts under File, its sequences under Sequences, and anything else it carries under Metadata.",target:()=>ie("general")},{id:"resolution-250",chapter:"The map",title:"Pick 250 kb",text:"A map is stored at several resolutions, the size of one bin. 250 kb is coarse enough to show a whole chromosome’s compartments.",action:"choose",target:le,done:()=>e.binsize()===25e4,needs:{holds:n,back:"open-set"},missing:"Waiting for the map to open."},{id:"chromosome",chapter:"The map",title:`Open ${r}`,text:`Press ${r} in the table to open its map.`,prepare:()=>{F=!1},target:()=>(ve(),fe(r)),done:c,needs:{holds:n,back:"open-set"},missing:`Not on screen — scroll the table to ${r}.`},{id:"look-map",chapter:"The map",title:"The contact map",text:`Each pixel is how often two stretches of ${r} touch; 4DN’s tracks are drawn under it. Scroll to zoom into the picture at this resolution, drag to move around, and double-click to fit it back.`,target:b},{id:"look-aesthetics",chapter:"The map",title:"The Aesthetics panel",text:"How the picture is drawn: the Map card sets its score, smoothing and colours, the Tracks card its tracks, and Export saves it as a figure.",target:()=>ie("aesthetics")},ee("score-correlation","Compartments",xe,"Draw it as a correlation","In the Map card, set score to correlation."),{id:"look-correlation",chapter:"Compartments",title:"The plaid",text:"Red where two stretches share a compartment, blue where they do not. Compartments sums this pattern up as one track, E1, positive in one compartment and negative in the other.",target:b},...te("Compartments","compartments","Compartments",{choose:"It splits a chromosome into A and B compartments from the map’s plaid.",none:"It runs on every sequence of the file to begin with. Press none…",tick:`…then tick ${r}, the chromosome on screen.`,run:"Press run. It takes a few seconds."},{tour:t=>[U("tasks-2d","2D tasks","These read the contact map: its decay with distance, insulation, compartments, loops and more.",t),U("tasks-3d","3D tasks","These build a model of the chromosome’s shape from the map, or set one against it.",t),U("tasks-1d","1D tasks","These read tracks rather than the map: peaks, profiles over features, correlations between tracks.",t)],setup:Le,after:t=>[{id:"look-saddle",chapter:"Compartments",title:"The saddle",text:"Bins sorted by E1, low to high: bright corners on the diagonal mean like touches like, A with A and B with B. The numbers under it say how much.",target:()=>de("Saddle"),needs:{holds:t,back:"compartments"}}]}),{id:"look-compartments",chapter:"Compartments",title:"Your compartments",text:"E1 and its A and B calls are drawn left of the map. Compare them with 4DN’s compartment track under it.",target:b},ee("score-balanced","Zooming in",Ae,"Back to contacts","Domains are about how often stretches touch, not how alike they are: set score back to balanced."),{id:"zoom",chapter:"Zooming in",title:"Zoom along the diagonal",text:`Hold ${X}, then drag across the lit square, from one corner to the other: that stretch opens.`,action:"drag",target:Q(v),done:()=>{const t=e.view();return c()&&t?.region?.includes(":")===!0&&t.region2===void 0},needs:{holds:c,back:"chromosome"},assist:{label:"zoom for me",title:`Open ${r}:${s(v.start)}-${s(v.end)}`,run:()=>be(`${r}:${s(v.start)}-${s(v.end)}`)}},{id:"resolution-5",chapter:"Zooming in",title:"Switch to 5 kb",text:"At 5 kb the domains along the diagonal come into view, and the loops at their corners.",action:"choose",target:le,done:()=>e.binsize()===$,needs:{holds:n,back:"open-set"}},{id:"zoom-domains",chapter:"Zooming in",title:"Closer, on a few domains",text:`Once more: hold ${X} and drag across the lit square.`,action:"drag",target:Q(S),done:()=>{const t=Ue(e.view());return t!==null&&t.contig===r&&t.end-t.start<=$e&&e.binsize()===$},needs:{holds:()=>c()&&e.binsize()===$,back:"resolution-5"},missing:"Not in view — press zoom for me, or go back a step.",assist:{label:"zoom for me",title:`Open ${r}:${s(S.start)}-${s(S.end)}`,run:()=>be(`${r}:${s(S.start)}-${s(S.end)}`)}},{id:"look-domains",chapter:"Zooming in",title:"Domains",text:"Each dark square along the diagonal is a domain, or TAD: a stretch that touches itself more than its neighbours. Most sit inside bigger ones — the big square from 45.7 to 48.3 Mb holds two.",target:b},{id:"oe-on",chapter:"Zooming in",title:"Turn on O/E",text:"O/E divides each pixel by what its distance predicts, so what is left is structure rather than distance.",target:P(Ce),done:()=>e.view()?.oe===!0,needs:{holds:n,back:"open-set"}},{id:"smooth",chapter:"Zooming in",title:"Smooth it",text:"At 5 kb most pixels hold a handful of contacts. Set smooth to 3 × 3, which averages each pixel with the eight around it.",action:"choose",target:P(()=>ce("smooth")),done:()=>e.view()?.smooth===Oe,needs:{holds:n,back:"open-set"}},{id:"look-oe",chapter:"Zooming in",title:"Domains and compartments",text:"Red is more contact than the distance predicts, blue less: the domains are red squares, and the checkerboard behind them is A and B again.",target:b},...te("Insulation","insulation","Diamond insulation",{choose:"It scores how much contact crosses each bin; its dips are the boundaries between domains.",none:"Again, press none…",tick:`…then tick ${r}.`,run:"Press run. Four windows over a whole chromosome at 5 kb take a little while."},{form:t=>[{id:"insulation-scales",chapter:"Insulation",title:"Four scales",text:`Set scales to ${q}. The window is 10 bins, 50 kb here, and each scale doubles it: 50, 100, 200 and 400 kb, one insulation track each.`,action:"type",target:()=>_("scales"),focus:!0,done:()=>Number(_("scales")?.value)===q,needs:{holds:t,back:"insulation"},assist:{label:"set it for me",title:`Set scales to ${q}`,run:()=>Me(_("scales"),String(q))}}],ran:t=>t.scales===q&&e.binsize()===$}),{id:"look-insulation",chapter:"Insulation",title:"Your insulation, at four scales",text:"Four scores are drawn left of the map, one per window, with the boundaries and the domains between them. The scales are the TAD hierarchy: the 50 kb window dips at the edge of every small domain, the 400 kb one only at the borders of the big ones. A border every window finds is high in the hierarchy; one only the narrow windows see is a subTAD’s, nested inside a bigger domain.",target:b},{id:"annotations",chapter:"Marks",title:"Open the Annotations panel",text:"Every track has a row here, the ones you computed among them, and so do the marks you draw.",target:()=>y("annotations"),done:()=>e.panelOpen("annotations"),needs:{holds:n,back:"open-set"}},{id:"mark-loop",chapter:"Marks",title:"Mark the loop",text:["The big domain has a dot at its corner: a loop, its two borders held together. In Manual annotations, under Arrowheads, type ",{name:`${r}:${s(d.rows)}`,copy:!0}," in rows and ",{name:`${r}:${s(d.cols)}`,copy:!0}," in columns, then press add."],target:()=>D("Arrowheads")??H(),done:ye,needs:{holds:()=>e.panelOpen("annotations"),back:"annotations"},missing:"Not on screen — scroll the Annotations panel to Manual annotations.",assist:{label:"mark it for me",title:`An arrowhead at ${r}:${s(d.rows)} × ${r}:${s(d.cols)}`,run:()=>{const t=D("Arrowheads"),[o,a]=[...t?.querySelectorAll("input")??[]];o===void 0||a===void 0||(o.value=`${r}:${s(d.rows)}`,a.value=`${r}:${s(d.cols)}`,ue(t)?.click())}}},{id:"mark-border",chapter:"Marks",title:"Mark the weak border",text:["Inside that domain one border is weak: the 400 kb window barely dips there, 4DN calls it Weak, and it splits the domain into two subTADs. Under Lines, keep vertical, type ",{name:`${r}:${s(E)}`,copy:!0}," and press add."],target:()=>D("Lines")??H(),done:we,needs:{holds:()=>e.panelOpen("annotations"),back:"annotations"},missing:"Not on screen — scroll the Annotations panel to Manual annotations.",assist:{label:"mark it for me",title:`A vertical line at ${r}:${s(E)}`,run:()=>{const t=D("Lines"),o=t?.querySelector("select"),a=t?.querySelector("input");o==null||a===null||a===void 0||(o.value="vertical",a.value=`${r}:${s(E)}`,ue(t)?.click())}}},{id:"look-marks",chapter:"Marks",title:"A loop and a subTAD border",text:"The arrowhead points at the loop closing the big domain, and the line marks the border inside it. Find the same place on your four insulation tracks, left of the map: a deep dip at 50 kb, barely one at 400 kb — that is the hierarchy, read off one bin.",target:b},{id:"insulation-row",chapter:"Tracks",title:"Unfold your insulation’s settings",text:"A computed track is a track like any other: press the arrow on your first insulation row.",target:()=>R()?.querySelector(".ann-more")??null,done:K,needs:{holds:()=>e.panelOpen("annotations"),back:"annotations"},missing:"No insulation row — run Diamond insulation again."},{id:"insulation-bigwig",chapter:"Tracks",title:"Save it as a bigWig",text:"Press bigWig to save the score as a file IGV, deepTools and pyBigWig open — written here, in this page, with nothing uploaded.",target:()=>{for(const t of R()?.querySelectorAll(".ann-exports button")??[])if(l(t)==="bigWig")return t;return null},done:()=>Y(".bw"),needs:{holds:()=>e.panelOpen("annotations")&&K(),back:"insulation-row"}},{id:"domains",chapter:"Tracks",title:"Unfold the domains’ settings",text:"Press the arrow on the Insulation domains row.",target:()=>T()?.querySelector(".ann-more")??null,done:x,needs:{holds:()=>e.panelOpen("annotations"),back:"annotations"},missing:"No Insulation domains row — run Diamond insulation with its domains on."},{id:"domains-display",chapter:"Tracks",title:"Draw the domains as a 1D track",text:"Domains are outlined on the map. Choose 1D track to draw them as a lane beside it instead.",action:"choose",target:()=>T()?.querySelector(`select[data-display="${O}"]`)??null,done:L,needs:{holds:x,back:"domains"}},{id:"domains-bottom",chapter:"Tracks",title:"Put it under the map",text:"Press the bottom edge to draw the lane under the map…",target:()=>j("bottom"),done:()=>V()?.bottom===!0,needs:{holds:()=>x()&&L(),back:"domains-display"}},{id:"domains-left",chapter:"Tracks",title:"Take it off the side",text:"…and the left edge to take it off the left.",target:()=>j("left"),done:()=>{const t=V();return t!==null&&t.bottom&&!t.left},needs:{holds:()=>x()&&L(),back:"domains-display"}},{id:"export-format",chapter:"The figure",title:"Choose PDF",text:"The Export card at the top of the Aesthetics panel saves what is on screen — the map, your marks and every track — as a figure. Choose PDF (vector): lines and text stay sharp at any size.",action:"choose",target:()=>N()?.querySelector("select.select-format")??y("aesthetics"),done:()=>N()?.querySelector("select.select-format")?.value==="pdf",needs:{holds:n,back:"open-set"}},{id:"export-save",chapter:"The figure",title:"Save the figure",text:"Press the download button beside it.",target:()=>N()?.querySelector(".export-acts button")??y("aesthetics"),done:()=>Y(".pdf"),needs:{holds:()=>N()?.querySelector("select.select-format")?.value==="pdf",back:"export-format"}},J("analysis-trackcorr","Track correlation"),{id:"trackcorr",chapter:"Track correlation",title:"Choose Track correlation",text:"It measures how closely every pair of loaded tracks agrees.",target:()=>se("Track correlation"),done:()=>e.task()==="trackcorr",needs:{holds:()=>e.panelOpen("analysis"),back:"analysis-trackcorr"},missing:"Not in the list — empty the box over it if a word is typed there."},{id:"tick-tracks",chapter:"Track correlation",title:"Tick every track",text:[{name:ae}," and ",{name:re},", 4DN’s insulation and E1, your E1, and your insulation at all four scales."],target:()=>B().map(t=>t?.closest(".param-field")??null).find(t=>t!==null)??null,done:()=>B().every(t=>t?.querySelector("input")?.checked===!0),needs:{holds:()=>e.task()==="trackcorr",back:"trackcorr"},missing:"Not in the list — a track did not load, or was closed.",assist:{label:"tick them for me",title:"Tick every track in the list",run:()=>{for(const t of B()){const o=t?.querySelector("input");o!=null&&!o.checked&&o.click()}}}},{id:"trackcorr-run",chapter:"Track correlation",title:"Run it",text:`Every pair is compared over the windows all of them have values in, which is ${r}.`,target:me,done:()=>{const t=ne();return t.some(o=>o===void 0)?!1:e.runs("trackcorr").some(o=>{const a=new Set(z(o.provenance.params.tracks)??[]);return t.every(u=>u!==void 0&&a.has(u.id))})},needs:{holds:()=>e.task()==="trackcorr"||e.running("trackcorr"),back:"trackcorr"}},{id:"look-trackcorr",chapter:"Track correlation",title:"Yours against 4DN’s",text:"Each square compares two tracks: red where they rise and fall together, blue where one rises as the other falls. Find yours against 4DN’s — an unphased E1 can match upside down, at −1 — and your four scales against each other: neighbouring windows agree most, the hierarchy again.",target:()=>de("Track correlation")},{id:"console",chapter:"The console",title:"Every step is a command",text:"Open the console: each file you opened and each run you made is a line you can paste into a terminal to do it again.",target:()=>i('.head-actions button[aria-label="console"]')??i('button[aria-label="console"]'),done:()=>e.consoleOpen()},{id:"finish",chapter:"Done",title:"That’s the tour",text:`You opened a map from 4DN, called compartments and domains at four scales on ${r}, marked a loop and a subTAD border, saved a track and a figure, and set it all against 4DN’s own. The tutorial is on the landing page and in About whenever you want it again.`,hero:!0}]}export{r as TUTORIAL_SEQUENCE,m as TUTORIAL_SET,A as TUTORIAL_STORE,_e as tutorialSteps};
|
|
1
|
+
import{E as Se,F as qe,L as Te,G as xe,H as Ae}from"./index-BZqg8J4S.js";const m="4DNESC23ZYOF",A="4dn",r="chr15",oe="4DNFIKI77KEM",re="4DNFI3OPG4RB",ae="4DNFI4GZZC7Z",v={start:3e7,end:6e7},S={start:381e5,end:50025e3},$e=15e6,$=5e3,q=4,d={rows:45662501,cols:48312501},E=47215001,Ee=25e3,Oe="1",De="analysis:compartment-e1",Ne="analysis:insulation-w",O="analysis:insulation:insulation-domains";function f(e){return e instanceof HTMLElement&&e.getClientRects().length>0}function i(e,n=document){for(const c of n.querySelectorAll(e))if(f(c))return c;return null}function l(e){return(e?.textContent??"").replace(/\s+/g," ").trim()}function p(){return i(".analysis-drawer:not(.collapsed)")}function se(e){for(const n of document.querySelectorAll(".analysis-row"))if(f(n)&&l(n.querySelector(".analysis-row-title"))===e)return n;return null}function y(e){const n=e.charAt(0).toUpperCase()+e.slice(1);return i(`.panel-${e} .panel-tab`)??i(`.head-panels button[aria-label="${n} panel"]`)}function ie(e){return i(`.panel-${e}:not(.collapsed) .panel-column-body`)??y(e)}function Ie(e){for(const n of document.querySelectorAll(".panel-analysis section.analysis-card"))if(f(n)&&l(n.querySelector(".card-head")).startsWith(e))return n;return null}function le(){return i('select.res-pick, [role="radiogroup"][aria-label="resolution"]')}function ge(){for(const e of document.querySelectorAll(".controls-card"))if(f(e)&&l(e.querySelector(".controls-title"))==="Map")return e;return null}function ce(e){for(const n of ge()?.querySelectorAll("label.field")??[])if(l(n.querySelector(".field-label"))===e)return n.querySelector("select, input");return null}function Ce(){for(const e of ge()?.querySelectorAll("button")??[])if(l(e)==="O/E")return e;return null}function _(e){for(const n of p()?.querySelectorAll(".param-field")??[]){if(l(n.querySelector(".field-label"))!==e)continue;const c=n.querySelector('input[type="number"]')??n.querySelector('input:not([type="range"])');return c instanceof HTMLInputElement?c:null}return null}function Me(e,n){e!==null&&(e.value=n,e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0})))}function H(){for(const e of document.querySelectorAll("section.annotation-card"))if(f(e)&&l(e.querySelector(".card-head, .card-title, h3")).startsWith("Manual annotations"))return e;return null}function D(e){for(const n of H()?.querySelectorAll(".manual-form")??[])if(l(n.querySelector(".manual-form-title"))===e)return n;return null}function ue(e){for(const n of e?.querySelectorAll("button")??[])if(l(n)==="add")return n;return null}function N(){for(const e of document.querySelectorAll(".controls-card"))if(f(e)&&l(e.querySelector(".controls-title"))==="Export")return e.querySelector(".export-row");return null}function Re(e){for(const n of p()?.querySelectorAll("label.param-field")??[]){if(l(n.querySelector(".field-label"))!==e)continue;const c=n.querySelector("select");return c instanceof HTMLSelectElement?c:null}return null}function Le(){const e=Re("phase by gene density");e===null||e.value===""||(e.value="",e.dispatchEvent(new Event("change",{bubbles:!0})))}function de(e){for(const n of p()?.querySelectorAll(".analysis-figure")??[])if(l(n.querySelector(".analysis-figure-head")).startsWith(e))return n;return null}function he(){for(const e of document.querySelectorAll(".store-drawer .portal-group"))if(f(e)&&l(e.querySelector(".portal-group-key"))===m)return e;return null}function I(){const e=i(".store-drawer .portal-search");return e instanceof HTMLInputElement?e:null}function pe(){const e=p()?.querySelector(".param-sequences");return e==null?null:[...e.querySelectorAll("label.param-check")].filter(n=>n.querySelector("input")?.checked===!0).map(n=>l(n.querySelector("span")))}function Pe(e){for(const n of p()?.querySelectorAll(".param-sequences label.param-check")??[])if(l(n.querySelector("span"))===e)return n;return null}function Fe(e){if(e===void 0)return null;for(const n of p()?.querySelectorAll("label.param-check")??[])if(l(n.querySelector("span"))===e.label)return n;return null}function me(){return p()?.querySelector(".analysis-run > button")??null}function C(e,n){return e!==null&&e.length===n.length&&e.every((c,M)=>c===n[M])}function z(e){return Array.isArray(e)?e.filter(n=>typeof n=="string"):null}function Be(e){return e===null||e.view!=="region"||e.region===void 0?null:e.region.split(":")[0]}function Ue(e){if(e===null||e.view!=="region"||e.region===void 0)return null;const n=/^([^:]+):([\d,]+)-([\d,]+)$/.exec(e.region);return n===null?null:{contig:n[1],start:Number(n[2].replace(/,/g,"")),end:Number(n[3].replace(/,/g,""))}}function fe(e){return i(`.content .tviewport .tr .td[title="${e}"]`)}function be(e){const n=i(".content input.input-region");n instanceof HTMLInputElement&&(n.value=e,n.dispatchEvent(new Event("input",{bubbles:!0})),n.dispatchEvent(new KeyboardEvent("keydown",{key:"Enter",bubbles:!0})))}function s(e){return e.toLocaleString("en-US")}function _e(e){const n=()=>e.view()?.uri.includes(oe)===!0||e.file()?.includes(oe)===!0,c=()=>Be(e.view())===r,M=t=>e.runs(t).some(o=>C(z(o.provenance.params.sequences),[r])),Z=t=>e.tracks()?.entries.find(o=>o.source.kind==="remote"&&o.source.url.includes(t)),ke=()=>e.tracks()?.byId(De),G=()=>e.tracks()?.entries.filter(t=>t.id.startsWith(Ne))??[],R=()=>{const t=G()[0];return t===void 0?null:i(`.ann-row[data-id="${t.id}"]`)},K=()=>R()?.querySelector(".ann-more")?.getAttribute("aria-expanded")==="true",Y=t=>e.saved().some(o=>o.toLowerCase().endsWith(t)),w=(t,o)=>t.contig===r&&Math.abs(t.bp-o)<=Ee,ye=()=>(e.marks()??[]).some(t=>t.kind==="arrowhead"&&(w(t.a,d.rows)&&w(t.b,d.cols)||w(t.a,d.cols)&&w(t.b,d.rows))),we=()=>(e.marks()??[]).some(t=>t.kind==="line"&&t.axis!=="horizontal"&&w(t.at,E)),T=()=>i(`.ann-row[data-id="${O}"]`),x=()=>T()?.querySelector(".ann-more")?.getAttribute("aria-expanded")==="true",L=()=>{const t=e.tracks()?.byId(O);return t!==void 0&&qe(t)==="lane"},V=()=>{const t=e.tracks()?.laneFor(O,Te)?.placement;return t===void 0?null:{bottom:t.bottom,left:t.left}},j=t=>{for(const o of T()?.querySelectorAll(".ann-place")??[])if(f(o)&&new RegExp(`\\b${t} edge\\b`).test(o.title))return o;return null},b=()=>i(".content .panel-grid"),P=t=>()=>t()??y("aesthetics"),Q=t=>()=>{const o=i(".content .heatmap-canvas");if(o===null)return null;const a=e.square({contig:r,...t});return a===null?o:{within:o,box:{left:a.left,top:a.top,right:a.right,bottom:a.bottom}}},X=Se()?"⇧ Shift and ⌥ Option":"Shift and Alt";let F=!1;const ve=()=>{if(F||fe(r)!==null)return;const t=i(".content .tviewport"),o=e.sequences()?.indexOf(r)??-1;if(t===null||o<0)return;F=!0;const a=t.querySelector(".tr")?.offsetHeight??28;t.scrollTop=Math.max(0,o*a-t.clientHeight/2),t.dispatchEvent(new Event("scroll"))},J=(t,o)=>({id:t,chapter:o,title:"Open the Analysis panel",text:"Analyses run here, in this page, on the map on screen.",target:()=>y("analysis"),done:()=>e.panelOpen("analysis"),needs:{holds:n,back:"open-set"}}),ee=(t,o,a,u,h)=>({id:t,chapter:o,title:u,text:h,action:"choose",target:P(()=>ce("score")),done:()=>e.score()===a,needs:{holds:n,back:"open-set"}}),te=(t,o,a,u,h={})=>{const W=`analysis-${o}`,g=()=>e.task()===o;return[J(W,t),...h.tour?.(W)??[],{id:o,chapter:t,title:`Choose ${a}`,text:u.choose,target:()=>se(a),done:g,needs:{holds:()=>e.panelOpen("analysis"),back:W},missing:"Not in the list — empty the box over it if a word is typed there."},{id:`${o}-none`,chapter:t,title:"Untick every sequence",text:u.none,prepare:h.setup,target:()=>p()?.querySelector('button[title="Untick every sequence"]')??null,done:()=>{const k=pe();return k!==null&&(k.length===0||C(k,[r]))},needs:{holds:g,back:o}},{id:`${o}-sequence`,chapter:t,title:`Tick ${r}`,text:u.tick,target:()=>Pe(r),done:()=>C(pe(),[r]),needs:{holds:g,back:o}},...h.form?.(g)??[],{id:`${o}-run`,chapter:t,title:"Run it",text:u.run,prepare:h.setup,target:me,done:()=>h.ran===void 0?M(o):e.runs(o).some(k=>C(z(k.provenance.params.sequences),[r])&&h.ran(k.provenance.params)),needs:{holds:()=>g()||e.running(o),back:o}},...h.after?.(g)??[],{id:`${o}-close`,chapter:t,title:"Back to the map",text:"The result is a track as well as a figure. Close the drawer to see it beside the map.",target:()=>p()?.querySelector(".analysis-drawer-head .btn-close")??null,done:()=>e.task()===null}]},ne=()=>{const t=G();return[Z(ae),Z(re),ke(),...t.length===0?[void 0]:t]},B=()=>ne().map(t=>Fe(t)),U=(t,o,a,u)=>({id:t,chapter:"Compartments",title:o,text:a,target:()=>Ie(o),needs:{holds:()=>e.panelOpen("analysis"),back:u}});return[{id:"welcome",chapter:"Welcome",title:"A first session, on real data",text:`Open a Hi-C map from the 4D Nucleome project, find its compartments, domains and a loop on ${r}, save what you made, and set it against 4DN’s own — in the real app, one step at a time.`,hero:!0,agenda:!0,next:"let’s go"},{id:"stores",chapter:"The 4DN store",title:"Open the data stores",text:"Stores are catalogues of published data, read from where they are kept. Press this button to open the drawer that holds them.",target:()=>i('.head-files button[aria-label="stores"]'),done:()=>e.store()!==null},{id:"store",chapter:"The 4DN store",title:"Switch to 4DN",text:"It opens on the lab’s own store, RSG. Press 4DN to switch to the 4D Nucleome project’s.",target:()=>i(`.store-drawer .store-tile[data-store="${A}"]`),done:()=>e.store()===A,needs:{holds:()=>e.store()!==null,back:"stores"}},{id:"search",chapter:"The 4DN store",title:"Find an experiment",text:["Type ",{name:m,copy:!0}," in the search box: Hi-C on K562 cells, about 190 million contacts."],action:"type",target:I,focus:!0,done:()=>I()?.value.toUpperCase().includes(m)===!0&&he()!==null,mistake:()=>{const t=(I()?.value??"").trim().toUpperCase();return t===""||m.startsWith(t)||t.includes(m)?null:t},needs:{holds:()=>e.store()===A,back:"store"},assist:{label:"type it for me",title:`Put ${m} in the search box`,run:()=>{const t=I();t!==null&&(t.value=m,t.dispatchEvent(new Event("input",{bubbles:!0})))}}},{id:"open-set",chapter:"The 4DN store",title:"Open it with its tracks",text:"One press opens the contact map with the tracks 4DN computed from it — compartments, insulation and boundaries — without downloading its 1.9 GB.",target:()=>he()?.querySelector(".portal-session")??null,done:n,needs:{holds:()=>e.store()===A||n(),back:"store"},missing:`Not on screen — type ${m} in the store’s search box again.`},{id:"look-general",chapter:"The map",title:"The General panel",text:"What the file is: its bin size and contacts under File, its sequences under Sequences, and anything else it carries under Metadata.",target:()=>ie("general")},{id:"resolution-250",chapter:"The map",title:"Pick 250 kb",text:"A map is stored at several resolutions, the size of one bin. 250 kb is coarse enough to show a whole chromosome’s compartments.",action:"choose",target:le,done:()=>e.binsize()===25e4,needs:{holds:n,back:"open-set"},missing:"Waiting for the map to open."},{id:"chromosome",chapter:"The map",title:`Open ${r}`,text:`Press ${r} in the table to open its map.`,prepare:()=>{F=!1},target:()=>(ve(),fe(r)),done:c,needs:{holds:n,back:"open-set"},missing:`Not on screen — scroll the table to ${r}.`},{id:"look-map",chapter:"The map",title:"The contact map",text:`Each pixel is how often two stretches of ${r} touch; 4DN’s tracks are drawn under it. Scroll to zoom into the picture at this resolution, drag to move around, and double-click to fit it back.`,target:b},{id:"look-aesthetics",chapter:"The map",title:"The Aesthetics panel",text:"How the picture is drawn: the Map card sets its score, smoothing and colours, the Tracks card its tracks, and Export saves it as a figure.",target:()=>ie("aesthetics")},ee("score-correlation","Compartments",xe,"Draw it as a correlation","In the Map card, set score to correlation."),{id:"look-correlation",chapter:"Compartments",title:"The plaid",text:"Red where two stretches share a compartment, blue where they do not. Compartments sums this pattern up as one track, E1, positive in one compartment and negative in the other.",target:b},...te("Compartments","compartments","Compartments",{choose:"It splits a chromosome into A and B compartments from the map’s plaid.",none:"It runs on every sequence of the file to begin with. Press none…",tick:`…then tick ${r}, the chromosome on screen.`,run:"Press run. It takes a few seconds."},{tour:t=>[U("tasks-2d","2D tasks","These read the contact map: its decay with distance, insulation, compartments, loops and more.",t),U("tasks-3d","3D tasks","These build a model of the chromosome’s shape from the map, or set one against it.",t),U("tasks-1d","1D tasks","These read tracks rather than the map: peaks, profiles over features, correlations between tracks.",t)],setup:Le,after:t=>[{id:"look-saddle",chapter:"Compartments",title:"The saddle",text:"Bins sorted by E1, low to high: bright corners on the diagonal mean like touches like, A with A and B with B. The numbers under it say how much.",target:()=>de("Saddle"),needs:{holds:t,back:"compartments"}}]}),{id:"look-compartments",chapter:"Compartments",title:"Your compartments",text:"E1 and its A and B calls are drawn left of the map. Compare them with 4DN’s compartment track under it.",target:b},ee("score-balanced","Zooming in",Ae,"Back to contacts","Domains are about how often stretches touch, not how alike they are: set score back to balanced."),{id:"zoom",chapter:"Zooming in",title:"Zoom along the diagonal",text:`Hold ${X}, then drag across the lit square, from one corner to the other: that stretch opens.`,action:"drag",target:Q(v),done:()=>{const t=e.view();return c()&&t?.region?.includes(":")===!0&&t.region2===void 0},needs:{holds:c,back:"chromosome"},assist:{label:"zoom for me",title:`Open ${r}:${s(v.start)}-${s(v.end)}`,run:()=>be(`${r}:${s(v.start)}-${s(v.end)}`)}},{id:"resolution-5",chapter:"Zooming in",title:"Switch to 5 kb",text:"At 5 kb the domains along the diagonal come into view, and the loops at their corners.",action:"choose",target:le,done:()=>e.binsize()===$,needs:{holds:n,back:"open-set"}},{id:"zoom-domains",chapter:"Zooming in",title:"Closer, on a few domains",text:`Once more: hold ${X} and drag across the lit square.`,action:"drag",target:Q(S),done:()=>{const t=Ue(e.view());return t!==null&&t.contig===r&&t.end-t.start<=$e&&e.binsize()===$},needs:{holds:()=>c()&&e.binsize()===$,back:"resolution-5"},missing:"Not in view — press zoom for me, or go back a step.",assist:{label:"zoom for me",title:`Open ${r}:${s(S.start)}-${s(S.end)}`,run:()=>be(`${r}:${s(S.start)}-${s(S.end)}`)}},{id:"look-domains",chapter:"Zooming in",title:"Domains",text:"Each dark square along the diagonal is a domain, or TAD: a stretch that touches itself more than its neighbours. Most sit inside bigger ones — the big square from 45.7 to 48.3 Mb holds two.",target:b},{id:"oe-on",chapter:"Zooming in",title:"Turn on O/E",text:"O/E divides each pixel by what its distance predicts, so what is left is structure rather than distance.",target:P(Ce),done:()=>e.view()?.oe===!0,needs:{holds:n,back:"open-set"}},{id:"smooth",chapter:"Zooming in",title:"Smooth it",text:"At 5 kb most pixels hold a handful of contacts. Set smooth to 3 × 3, which averages each pixel with the eight around it.",action:"choose",target:P(()=>ce("smooth")),done:()=>e.view()?.smooth===Oe,needs:{holds:n,back:"open-set"}},{id:"look-oe",chapter:"Zooming in",title:"Domains and compartments",text:"Red is more contact than the distance predicts, blue less: the domains are red squares, and the checkerboard behind them is A and B again.",target:b},...te("Insulation","insulation","Diamond insulation",{choose:"It scores how much contact crosses each bin; its dips are the boundaries between domains.",none:"Again, press none…",tick:`…then tick ${r}.`,run:"Press run. Four windows over a whole chromosome at 5 kb take a little while."},{form:t=>[{id:"insulation-scales",chapter:"Insulation",title:"Four scales",text:`Set scales to ${q}. The window is 10 bins, 50 kb here, and each scale doubles it: 50, 100, 200 and 400 kb, one insulation track each.`,action:"type",target:()=>_("scales"),focus:!0,done:()=>Number(_("scales")?.value)===q,needs:{holds:t,back:"insulation"},assist:{label:"set it for me",title:`Set scales to ${q}`,run:()=>Me(_("scales"),String(q))}}],ran:t=>t.scales===q&&e.binsize()===$}),{id:"look-insulation",chapter:"Insulation",title:"Your insulation, at four scales",text:"Four scores are drawn left of the map, one per window, with the boundaries and the domains between them. The scales are the TAD hierarchy: the 50 kb window dips at the edge of every small domain, the 400 kb one only at the borders of the big ones. A border every window finds is high in the hierarchy; one only the narrow windows see is a subTAD’s, nested inside a bigger domain.",target:b},{id:"annotations",chapter:"Marks",title:"Open the Annotations panel",text:"Every track has a row here, the ones you computed among them, and so do the marks you draw.",target:()=>y("annotations"),done:()=>e.panelOpen("annotations"),needs:{holds:n,back:"open-set"}},{id:"mark-loop",chapter:"Marks",title:"Mark the loop",text:["The big domain has a dot at its corner: a loop, its two borders held together. In Manual annotations, under Arrowheads, type ",{name:`${r}:${s(d.rows)}`,copy:!0}," in rows and ",{name:`${r}:${s(d.cols)}`,copy:!0}," in columns, then press add."],target:()=>D("Arrowheads")??H(),done:ye,needs:{holds:()=>e.panelOpen("annotations"),back:"annotations"},missing:"Not on screen — scroll the Annotations panel to Manual annotations.",assist:{label:"mark it for me",title:`An arrowhead at ${r}:${s(d.rows)} × ${r}:${s(d.cols)}`,run:()=>{const t=D("Arrowheads"),[o,a]=[...t?.querySelectorAll("input")??[]];o===void 0||a===void 0||(o.value=`${r}:${s(d.rows)}`,a.value=`${r}:${s(d.cols)}`,ue(t)?.click())}}},{id:"mark-border",chapter:"Marks",title:"Mark the weak border",text:["Inside that domain one border is weak: the 400 kb window barely dips there, 4DN calls it Weak, and it splits the domain into two subTADs. Under Lines, keep vertical, type ",{name:`${r}:${s(E)}`,copy:!0}," and press add."],target:()=>D("Lines")??H(),done:we,needs:{holds:()=>e.panelOpen("annotations"),back:"annotations"},missing:"Not on screen — scroll the Annotations panel to Manual annotations.",assist:{label:"mark it for me",title:`A vertical line at ${r}:${s(E)}`,run:()=>{const t=D("Lines"),o=t?.querySelector("select"),a=t?.querySelector("input");o==null||a===null||a===void 0||(o.value="vertical",a.value=`${r}:${s(E)}`,ue(t)?.click())}}},{id:"look-marks",chapter:"Marks",title:"A loop and a subTAD border",text:"The arrowhead points at the loop closing the big domain, and the line marks the border inside it. Find the same place on your four insulation tracks, left of the map: a deep dip at 50 kb, barely one at 400 kb — that is the hierarchy, read off one bin.",target:b},{id:"insulation-row",chapter:"Tracks",title:"Unfold your insulation’s settings",text:"A computed track is a track like any other: press the arrow on your first insulation row.",target:()=>R()?.querySelector(".ann-more")??null,done:K,needs:{holds:()=>e.panelOpen("annotations"),back:"annotations"},missing:"No insulation row — run Diamond insulation again."},{id:"insulation-bigwig",chapter:"Tracks",title:"Save it as a bigWig",text:"Press bigWig to save the score as a file IGV, deepTools and pyBigWig open — written here, in this page, with nothing uploaded.",target:()=>{for(const t of R()?.querySelectorAll(".ann-exports button")??[])if(l(t)==="bigWig")return t;return null},done:()=>Y(".bw"),needs:{holds:()=>e.panelOpen("annotations")&&K(),back:"insulation-row"}},{id:"domains",chapter:"Tracks",title:"Unfold the domains’ settings",text:"Press the arrow on the Insulation domains row.",target:()=>T()?.querySelector(".ann-more")??null,done:x,needs:{holds:()=>e.panelOpen("annotations"),back:"annotations"},missing:"No Insulation domains row — run Diamond insulation with its domains on."},{id:"domains-display",chapter:"Tracks",title:"Draw the domains as a 1D track",text:"Domains are outlined on the map. Choose 1D track to draw them as a lane beside it instead.",action:"choose",target:()=>T()?.querySelector(`select[data-display="${O}"]`)??null,done:L,needs:{holds:x,back:"domains"}},{id:"domains-bottom",chapter:"Tracks",title:"Put it under the map",text:"Press the bottom edge to draw the lane under the map…",target:()=>j("bottom"),done:()=>V()?.bottom===!0,needs:{holds:()=>x()&&L(),back:"domains-display"}},{id:"domains-left",chapter:"Tracks",title:"Take it off the side",text:"…and the left edge to take it off the left.",target:()=>j("left"),done:()=>{const t=V();return t!==null&&t.bottom&&!t.left},needs:{holds:()=>x()&&L(),back:"domains-display"}},{id:"export-format",chapter:"The figure",title:"Choose PDF",text:"The Export card at the top of the Aesthetics panel saves what is on screen — the map, your marks and every track — as a figure. Choose PDF (vector): lines and text stay sharp at any size.",action:"choose",target:()=>N()?.querySelector("select.select-format")??y("aesthetics"),done:()=>N()?.querySelector("select.select-format")?.value==="pdf",needs:{holds:n,back:"open-set"}},{id:"export-save",chapter:"The figure",title:"Save the figure",text:"Press the download button beside it.",target:()=>N()?.querySelector(".export-acts button")??y("aesthetics"),done:()=>Y(".pdf"),needs:{holds:()=>N()?.querySelector("select.select-format")?.value==="pdf",back:"export-format"}},J("analysis-trackcorr","Track correlation"),{id:"trackcorr",chapter:"Track correlation",title:"Choose Track correlation",text:"It measures how closely every pair of loaded tracks agrees.",target:()=>se("Track correlation"),done:()=>e.task()==="trackcorr",needs:{holds:()=>e.panelOpen("analysis"),back:"analysis-trackcorr"},missing:"Not in the list — empty the box over it if a word is typed there."},{id:"tick-tracks",chapter:"Track correlation",title:"Tick every track",text:[{name:ae}," and ",{name:re},", 4DN’s insulation and E1, your E1, and your insulation at all four scales."],target:()=>B().map(t=>t?.closest(".param-field")??null).find(t=>t!==null)??null,done:()=>B().every(t=>t?.querySelector("input")?.checked===!0),needs:{holds:()=>e.task()==="trackcorr",back:"trackcorr"},missing:"Not in the list — a track did not load, or was closed.",assist:{label:"tick them for me",title:"Tick every track in the list",run:()=>{for(const t of B()){const o=t?.querySelector("input");o!=null&&!o.checked&&o.click()}}}},{id:"trackcorr-run",chapter:"Track correlation",title:"Run it",text:`Every pair is compared over the windows all of them have values in, which is ${r}.`,target:me,done:()=>{const t=ne();return t.some(o=>o===void 0)?!1:e.runs("trackcorr").some(o=>{const a=new Set(z(o.provenance.params.tracks)??[]);return t.every(u=>u!==void 0&&a.has(u.id))})},needs:{holds:()=>e.task()==="trackcorr"||e.running("trackcorr"),back:"trackcorr"}},{id:"look-trackcorr",chapter:"Track correlation",title:"Yours against 4DN’s",text:"Each square compares two tracks: red where they rise and fall together, blue where one rises as the other falls. Find yours against 4DN’s — an unphased E1 can match upside down, at −1 — and your four scales against each other: neighbouring windows agree most, the hierarchy again.",target:()=>de("Track correlation")},{id:"console",chapter:"The console",title:"Every step is a command",text:"Open the console: each file you opened and each run you made is a line you can paste into a terminal to do it again.",target:()=>i('.head-actions button[aria-label="console"]')??i('button[aria-label="console"]'),done:()=>e.consoleOpen()},{id:"finish",chapter:"Done",title:"That’s the tour",text:`You opened a map from 4DN, called compartments and domains at four scales on ${r}, marked a loop and a subTAD border, saved a track and a figure, and set it all against 4DN’s own. The tutorial is on the landing page and in About whenever you want it again.`,hero:!0}]}export{r as TUTORIAL_SEQUENCE,m as TUTORIAL_SET,A as TUTORIAL_STORE,_e as tutorialSteps};
|