NEWS.md
@jbrowse/react-linear-genome-view2), driven through the shared framework-agnostic @jbrowse/embedded-linear-genome-view controller.JBrowseR("hg38", location = "BRCA1") loads a whole hosted genome — assembly, reference-name aliases, cytobands, gene search — in one line.assembly(), track(), tracks(), text_index(), theme(), json_config(), view(), linear_view(), synteny_view(), dotplot_view() and synteny_track() each returned a list literal, and each had to grow whenever JBrowse gained a type. Write the list the config guide documents instead — a view type, adapter or display JBrowse adds now needs no new R function. One trap the builders had been hiding: a length-1 vector serializes to a JSON scalar, so fields JBrowse reads as arrays need list() — assemblyNames = list("hg38"), not "hg38".theme() also stops the package masking ggplot2::theme(), which any Shiny app that plots was hitting.JBrowseRApp() renders the full JBrowse 2 app — any number of views of any type — from a views list of list(type = , init = ) specs, the same vocabulary JBrowse Web serializes into its ?session=spec-… URLs, so comparative genomics (linear synteny, dotplots) is reachable from R. It loads a separate widget bundle, so the single-view JBrowseR() stays lean.JBrowseRApp() gained Shiny bindings — JBrowseRAppOutput() and renderJBrowseRApp() — so the multi-view app is usable in a Shiny app at all. It could not share JBrowseROutput(): htmlwidgets dispatches on the output element’s class, so the app rendered into one loaded the single-view bundle and failed to build.JBrowseRApp() takes session =, and a running app reports whatever the user built — navigation, open tracks, added or rearranged views — as input[[paste0(outputId, "_session")]] in that same shape. So “save this layout” is storing that value and reopening it is handing it back; a restored session takes precedence over views, which still describes what File → New session returns to. The read-back rides a coarse signal (which views exist, what each has open, where each is looking), so it settles after a gesture instead of pushing a snapshot per frame. See the save_session example app.input[[paste0(outputId, "_location")]] to the visible region, so a Shiny server can recompute for what the user is looking at — the selected feature was previously the only signal out. It settles after the gesture rather than firing per frame. See the interactive peak calling example app.input[[paste0(outputId, "_selected_feature")]], namespaced per output, so several browsers on one page no longer overwrite each other’s selection and the value is reachable from inside a Shiny module. The global input$selectedFeature still fires.track_data_frame() survives the cull, because a data frame is the one thing config JSON cannot express. It carries every column beyond chrom/start/end/name onto each feature (previously only score and additional), so any column you computed shows in the feature details.tracks entries accept a bare data-file URL or a list(uri = , index = ) spec as well as a full config. Track type, adapter and index sibling are inferred by JBrowse core at display time, using the same format plugins the “Add track” flow uses, so any format a bundled plugin recognizes works (.bam/.cram, .vcf, .gff/.gff3/.gtf/.bed plain or bgzipped, .bb/.bigWig, .hic, …) rather than a fixed R-side list. Entries missing assemblyNames are backfilled with the assembly’s name by the view.assembly also accepts a bare sequence-file URL (".../genome.fa.gz", or a .2bit); the view builds the assembly from it, deriving the name from the file.config = takes the path, URL or JSON text of a config.json directly, as well as a list, so reading the file is no longer a separate step.serve_data() and its hand-rolled HTTP server. Serve local files with any static server that supports CORS and range requests (e.g. npx http-server --cors); see the “Hosting data” vignette. This drops the httpuv, mime, cli, and stringr dependencies, leaving htmlwidgets as the package’s only import.track_alignments(), track_variant(), track_wiggle(), track_feature(), default_session()) and the view= first argument ("View"/"JsonView"/"ViewHg19"/"ViewHg38") are removed.track_wiggle().This release consists of updates to the JS side of the package:
There are no changes to the R interface.
track_data_frame() track type. This makes it possible to create JB2 tracks directly from R data frames without any files.input$selectedFeature recorded what feature was clicked on. Check out the new example app bookmark_app.R for a demo!