Every browser on this page is a live, interactive JBrowse 2 — pan, zoom, and click features directly in the page. This article is part of the website only (it is not a package vignette), so it can embed the full widget; the Introduction uses screenshots to stay within CRAN’s size limits.
Name a genome hub and you get the assembly, reference-name aliases,
cytobands, and gene-name search for free. Here
location = "BRCA1" resolves through the hub’s search
index.
No hub needed for your own genome: pass a sequence-file URL straight
to assembly. The view builds the assembly from it (naming
it after the file), and a bare data-file URL in tracks is
inferred into a track — here an alignments track from a BAM.
Turn a data frame of features into a track with
track_data_frame() — no files, no web server. A
score column makes it quantitative.
peaks <- data.frame(
chrom = "17",
start = seq(43000000, 43120000, by = 12000),
end = seq(43000000, 43120000, by = 12000) + 4000,
name = paste0("peak", seq_len(11)),
score = round(runif(11, 5, 100))
)
JBrowseR(
"hg38",
tracks = list(track_data_frame(peaks, "R_peaks")),
location = "17:43,000,000..43,125,000"
)A track isn’t only features and coverage — a display can plot data.
Point a GWASTrack
at genome-wide summary statistics and give it a LinearManhattanDisplay,
and the same linear view becomes a Manhattan plot: the
displays block picks the plot; no special widget needed.
The adapter’s uri shorthand finds the .tbi
index next to the data, and JBrowse fills in displayId, so
the config stays short.
JBrowseR(
"hg19",
tracks = list(list(
type = "GWASTrack",
trackId = "gwas_track",
name = "GWAS",
adapter = list(
type = "GWASAdapter",
scoreColumn = "neg_log_pvalue",
uri = "https://jbrowse.org/genomes/hg19/gwas/summary_stats.txt.gz"
),
displays = list(list(type = "LinearManhattanDisplay", height = 250))
)),
location = "2"
)For comparative genomics — synteny and dotplots across two assemblies
— see the comparing genomes article, which
uses JBrowseRApp().