JBrowse 2 Documentation

repository·main·Indexed 42 days ago

https://github.com/gmod/jbrowse-components

A pluggable, open-source genome browser designed as a web app, desktop application, or embeddable React components. Supports linear, circular, dotplot, synteny, and spreadsheet views. Features include GPU rendering with Slang shaders, MobX-State-Tree (MST) for state management, and a SharedBudget mechanism for managing parsed-chunk cache across data adapters like @gmod/bam, @gmod/tabix, and @gmod/cram.

Tokens
863.1K
Snippets
1.9K
Records
3.2K
Agent score
55%

What's inside JBrowse 2

  1. Overview of the Mouse strain pangenome demo

    main

    This demo provides a mouse strain pangenome built using minigraph on the GRCm39 (mm39) reference backbone. It includes 19 sequence sets: the UCSC mm39 reference and 18 inbred/wild-derived strain assemblies.

    To allow JBrowse 2 to query specific loci without downloading the entire graph, the dataset includes tabix-indexed BED projections of the graph. The graph is constructed per-chromosome and then concatenated into a single rGFA file using a unique segment-id space.

  2. Introduction to JBrowse 2

    main

    JBrowse 2 is a pluggable, open-source genome browser designed to run on the web, as a desktop application, or embedded within your own application.

    Core Data Model

    Data in JBrowse 2 is organized into two primary layers:

    1. Assemblies: Reference genomes that provide the coordinate system.
    2. Tracks: Data layers (such as alignments, variants, or coverage) that are layered on top of assemblies.
  3. Overview of JBrowse 2 capabilities

    main
    JBrowse 2 is a pluggable, GPU-accelerated, fully client-side genome browser. It can be deployed as a web app on static hosting (e.g., S3, GitHub Pages), as a cross-platform desktop application, or embedded into other environments like React apps, R (Shiny/R Markdown), or Python (Jupyter/Colab/VS Code).
  4. Overview of JBrowse 2 User Guides

    main

    The JBrowse 2 user guide provides comprehensive documentation for driving the application once it is running. It is organized into several functional areas:

    General Usage

    Covers basic interaction, bookmarking, connections, Hub URLs, and the plugin store.

    Track Types

    Detailed guides for various data tracks, including:

    • Alignments: alignments_track
    • Quantitative/Density: gc_content_track, quantitative_track, multiquantitative_track
    • Features/Genes: gene_track, multirow_feature_track
    • Variants/Genomics: variant_track, multivariant_track, gwas_track, maf_track
    • Structural/Other: hic_track, sequence_track

    Views

    Guides for different visualization modes:

    • Circular View
    • Dotplot View
    • Graph Genome View
    • Linear Synteny View
    • Spreadsheet View
    • SV Inspector View

    Sequence Tools & Analysis

    Instructions for using tools like BLAT, consensus sequence generation, and sequence searching, as well as analysis workflows like clustering and structural variation (SV) visualization.

    Specialized Tutorials

    JBrowse 2 offers deep-dive tutorials for specific domains:

    • Synteny & Comparative Genomics: Multiway synteny, orthologs, and selection pressure.
    • Pangenomes: Graph reading and preparation (e.g., Cactus, HPRC).
    • Structural Variation: Population CNV and SV callset review.
    • Cancer Genomics: TCGA cohort analysis and fusion detection.
    • Population Genomics: Linkage disequilibrium (LD), local ancestry, and QTL analysis.
    • Epigenomics & Single Cell: Methylation, scATAC-seq, and scRNA-seq pseudobulk.
    • Transcriptomics & Proteins: RNA-seq and protein structures.

    If you are new to JBrowse, it is recommended to start with the JBrowse Web Quickstart or JBrowse Desktop Quickstart.

  5. Key improvements in v3.4.0

    main

    The v3.4.0 release includes several notable enhancements:

    • Improved Gene Name Searching: Integrated the uFuzzy library to provide more relevant results by prioritizing text search hits.
    • Large File Support: Added support for parsing non-indexed BED files larger than 512MB.
    • Feature Enhancements:
      • Added mouseover metadata for fields in the base feature widget.
      • Added padding to the genomic window of search result hits.
      • Synthesizes displayId automatically if not provided in the display configuration.
      • Support for cytoband BED files starting with #.
    • Bug Fixes:
      • Fixed methylation/modifications rendering crashes (affecting v3.2.0-v3.3.0).
      • Fixed UCSC chain parsing for files with header lines.
      • Fixed theme augmentation for primary/secondary colors.
  6. New features in JBrowse 2 v2.2.1

    main

    Version 2.2.1 introduced several enhancements to the user interface and track capabilities:

    • GC Content Display: The reference sequence track can now be displayed as a "GC content" track.
    • Synteny Track Integration: SyntenyTracks can be viewed as a plain track within a regular linear genome view, and users can create synteny views directly from these tracks.
    • Add Track Workflow: A new workflow allows users to paste JSON track configurations to add tracks quickly.
    • View Management: Added the ability to minimize/collapse tracks and views, and to reorder views within the view stack.
    • Authentication: Added an authentication plugin for embedded components.
  7. Use the jbrowse-plugin-arg for Ancestral Recombination Graphs

    main

    The jbrowse-plugin-arg is an out-of-tree plugin for JBrowse 2 that renders Ancestral Recombination Graphs (ARGs) as a display. It reads tskit tree sequences in the browser and visualizes local trees along the genome, where the x-axis represents genomic position and the y-axis represents node time.

    Note that this plugin is not bundled in JBrowse Web and must be added as an external plugin.

  8. Manage JBrowse 2 embedded demos

    main

    The embedded_demos directory contains release tooling for standalone starter repositories. These repositories demonstrate how to use @jbrowse/react-app2, @jbrowse/react-linear-genome-view2, and @jbrowse/react-circular-genome-view2 with various bundlers. These demos are the primary reference for developers looking to embed JBrowse 2 components into their own projects.

    Adding or removing a demo

    To add or remove a demo from the release cycle, modify demos.sh. This file is the single source of truth; it contains one line per repository, specifying the configuration to install and the target directory expected by the bundler. Ensure that demos.sh remains in sync with the table in website/docs/embedded_components.md to avoid deploying unreachable demos.

  9. Use the LinearManhattanDisplay for GWAS plots

    main

    The LinearManhattanDisplay is a GWAS Manhattan-plot display provided by the gwas plugin. It draws -log10 p-values as a scored scatter along the genome. When a user clicks a point, a feature widget is displayed.

    This model is part of the @jbrowse/mobx-state-tree API and is configured via a specific configuration schema. For detailed configuration options, refer to the linearmanhattandisplay config schema page.

  10. What is MultiWaySyntenyDisplay?

    main

    The MultiWaySyntenyDisplay is a component provided by the linear-comparative-view plugin. It draws a multi-genome ortholog track (such as an MCScanBlocksAdapter) as multiple lanes within a single linear genome view.

    Key behaviors:

    • Lane Layout: The top lane represents the view's own assembly at genomic coordinates. Every subsequent lane is laid out in its own local coordinate frame fitted to the viewport (non-anchored).
    • Visual Connections: Ribbons connect gene placements between adjacent lanes. These ribbons utilize the pairwise synteny display's GPU passes.
    • Rendering: It uses Canvas2D for rendering and supports SVG export, ensuring consistency between the two.
  11. Overview of Pluggable Elements in JBrowse 2

    main

    A plugin can extend JBrowse 2 by registering ten distinct element types. These elements are created by the plugin manager in a specific order, meaning elements in later phases can depend on those registered in earlier phases.

    Registration Phases

    PhaseElement typeRegistered with
    1Adapter typespluginManager.addAdapterType()
    2Text search adapter typespluginManager.addTextSearchAdapterType()
    3Display typespluginManager.addDisplayType()
    4Track typespluginManager.addTrackType()
    5Connection typespluginManager.addConnectionType()
    6View typespluginManager.addViewType()
    7Widget typespluginManager.addWidgetType()
    8RPC method typespluginManager.addRpcMethod()
    9Internet account typespluginManager.addInternetAccountType()
    10Add track workflow typespluginManager.addAddTrackWorkflowType()

    Plugin Lifecycle

    • install method: Used to add these elements to the host application. This runs before any elements are built.
    • configure method: Typically used to set up mobx autoruns that react to application state.
    • Loading: Plugins are loaded as ESM modules (or UMD bundles for legacy). Only one version of a specific plugin can be loaded on a single page.