Repository navigation
v4.7.0 — One Name for Every File
juicebox.js now has one rule for deriving a filename from a URL, uses it everywhere, and exports it to hosts.
One filename rule, exported
filenameFromUrlis the single place juicebox derives a filename (#698). It takes the last path segment, percent-decoded. For a GEO download link (www.ncbi.nlm.nih.gov/geo/download/), whose path ends in/download/, it takes thefile=parameter instead, also decoded. If decoding fails it keeps the raw text. AFilegives its own name.extractNamenow names maps and tracks by it, so a map or track loaded from a GEO download link no longer gets an empty name.- A track the host gives no
filenamegets one from juicebox (#698). It is set before 1D/2D routing and before igv infers the format, so both read a decoded name, or the GEOfile=name. Afilenamethe host supplies is kept, anddata:URLs are skipped. filenameFromUrlis exported on the namespace and declared injs/publicApi.js, so a host need not keep its own copy of the rule. aidenlab/juicebox-web#96 will use it to pair a BAM with its index.
Fixes
- An encoded or GEO download-link
.bedpeis parsed as BEDPE (#698).isBedPEread the raw URL, so such a file was routed as 2D but parsed with the loops layout, which took its colour from the wrong column. It now reads the derived filename.
Docs
- ADR-0003 re-measurement for v4.7.0: nothing undeclared in use in either consumer, for the seventh release running.
For embedders
js/publicApi.js adds one namespace name, filenameFromUrl. Nothing was removed or renamed, and exports and files are unchanged. One behaviour change sits behind unchanged names:
- Track configs with no
filenamegainfilename, and saved sessions may carry it. Neither host setsfilenameon a track config, and Spacewalk loads no juicebox tracks, so neither sees a change beyond routing now reading the decoded name.
Full Changelog: v4.6.0...v4.7.0