Skip to content

v4.7.0 — One Name for Every File

Choose a tag to compare

@turner turner released this 29 Sep 15:28
· 142 commits to master since this release
fbdd1b4

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

  • filenameFromUrl is 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 the file= parameter instead, also decoded. If decoding fails it keeps the raw text. A File gives its own name. extractName now 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 filename gets 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 GEO file= name. A filename the host supplies is kept, and data: URLs are skipped.
  • filenameFromUrl is exported on the namespace and declared in js/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 .bedpe is parsed as BEDPE (#698). isBedPE read 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

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 filename gain filename, and saved sessions may carry it. Neither host sets filename on 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