JBrowseR() shows a single linear view. For anything
comparative — synteny, dotplots, breakpoint-split —
JBrowseRApp() drives the full JBrowse 2 app, and a
views list describes what to open. Each entry is a
list(type, init) spec, the same vocabulary JBrowse Web
serializes into its ?session=spec-…
URLs — a plain list, with no R builder in the way. The fields each
init accepts come from the view’s state-model docs — see
LinearSyntenyView
— and the PAF track is a PAFAdapter.
The browser below is live — drag either genome to pan; the ribbon between them follows.
Two volvox assemblies (one carries a deletion) are tied
together by a PAF track and shown as a linear synteny view. Each
assembly is a list(name=, uri=) that core expands; the PAF
track spans both and so names them in order.
base <- "https://jbrowse.org/code/jb2/main/test_data/volvox/"
JBrowseRApp(
assemblies = list(
list(name = "volvox", uri = paste0(base, "volvox.2bit")),
list(name = "volvox_del", uri = paste0(base, "volvox_del.fa"))
),
tracks = list(
list(
type = "SyntenyTrack",
trackId = "volvox_del_paf",
name = "volvox_del.paf",
assemblyNames = list("volvox", "volvox_del"),
adapter = list(
type = "PAFAdapter",
targetAssembly = "volvox",
queryAssembly = "volvox_del",
uri = paste0(base, "volvox_del.paf")
)
)
),
views = list(list(
type = "LinearSyntenyView",
init = list(
views = list(list(assembly = "volvox"), list(assembly = "volvox_del")),
tracks = list("volvox_del_paf")
)
))
)The same assemblies and PAF render as a dotplot with one field
different — "DotplotView" in place of
"LinearSyntenyView":
JBrowseRApp(
assemblies = list(
list(name = "volvox", uri = paste0(base, "volvox.2bit")),
list(name = "volvox_del", uri = paste0(base, "volvox_del.fa"))
),
tracks = list(
list(
type = "SyntenyTrack",
trackId = "volvox_del_paf",
name = "volvox_del.paf",
assemblyNames = list("volvox", "volvox_del"),
adapter = list(
type = "PAFAdapter",
targetAssembly = "volvox",
queryAssembly = "volvox_del",
uri = paste0(base, "volvox_del.paf")
)
)
),
views = list(list(
type = "DotplotView",
init = list(
views = list(list(assembly = "volvox"), list(assembly = "volvox_del")),
tracks = list("volvox_del_paf")
)
))
)