Skip to content

typekey/plugin-gtex-expression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plugin-gtex-expression

A reference RNA Browser plugin that renders a GTEx tissue-expression heatmap for the currently active transcript.

Built with @rbrowser/plugin-sdk — useful both as a working panel and as a worked example of how to author plugins against the SDK.

  • X axis — Exon id (Exon mode) or Junction id (Junction mode)
  • Y axis — GTEx tissue
  • Cell value — expression (read count)

The header reads the active transcript from host state (selectedRNA) and the chart auto-fits its container, thinning axis labels based on the available width / height.

What this example demonstrates

  • Reading reactive host state with useSelectedRNA() / useSpecies()
  • Declaring state:read as the only requested permission
  • Bundling a third-party charting library (ECharts) into the plugin
  • A self-contained ESM build the host loads as a remote plugin
  • Packaging via rbrowser-plugin pack into a single distributable .rbp

Data sources

  • https://api.rbrowser.org/api/v1/exon_expression/<build>/<transcriptId>/auto/
  • https://api.rbrowser.org/api/v1/junction_expression/<build>/<transcriptId>/auto/

GTEx data is human-only — the plugin always queries hg38.

Install

Three ways. All three produce the same result: the panel appears in the right sidebar and starts tracking selectedRNA.

A prebuilt .rbp is hosted on the official plugin hub:

https://data.rbrowser.org/plugin-hub/plugin-gtex-expression-0.1.0.rbp

1. Drag-install (recommended)

  1. Open RNA Browser → click the Plugin Store (puzzle icon) on the left sidebar.
  2. Drag plugin-gtex-expression-<version>.rbp onto the panel.
  3. The plugin is verified, stored in IndexedDB, and enabled automatically.

2. Remote-file install (from URL)

  1. Open RNA Browser → Plugin Store → click the gear icon → Install from URL….
  2. Paste the hub URL above (or click the Example button to prefill it):
    https://data.rbrowser.org/plugin-hub/plugin-gtex-expression-0.1.0.rbp
    

3. Local-file install

  1. Download / build a .rbp (see Build below).
  2. Open RNA Browser → Plugin Store → click the gear icon → Install from local file… and pick the .rbp.

Build

This plugin is built with @rbrowser/plugin-sdk (npm) and its companion CLI.

# 1. install deps (React, ECharts, @rbrowser/plugin-sdk)
npm install

# 2. build the ESM bundle  →  dist/index.js
npm run build

# 3. pack into a single .rbp  →  dist/plugin-gtex-expression-<version>.rbp
npm run pack

npm run pack runs vite build then invokes the SDK CLI (installed at node_modules/.bin/rbrowser-plugin):

rbrowser-plugin pack

which reads manifest.json + dist/index.js and writes dist/plugin-gtex-expression-<version>.rbp. Drag that file into the Plugin Store and you're done.

Manual CLI invocation

npx rbrowser-plugin pack \
  --manifest manifest.json \
  --bundle   dist/index.js \
  --out      dist/plugin-gtex-expression-0.1.0.rbp

See the SDK README on npm for the full CLI reference and the host API your plugin can call.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages