diff options
| author | pjotrp <pjotr.public01@thebird.nl> | 2026-10-28 10:24:16 +0000 |
|---|---|---|
| committer | pjotrp <pjotr.public01@thebird.nl> | 2026-10-28 10:24:16 +0000 |
| commit | 847d712f9fbe21b3362dbbe31bcfdb179fae390d (patch) | |
| tree | 678c4eeb993cd954665fa690c6c79d76c9a66a6c | |
| parent | c7c74cd189a3fac8b3b329c17eb6a04c8c0c4c0f (diff) | |
| download | guix-bioinformatics-847d712f9fbe21b3362dbbe31bcfdb179fae390d.tar.gz | |
jbrowse: Add jbrowse-web 4.3.0.
JBrowse 2's web UI is a single-page app distributed as a prebuilt zip on each GitHub release -- the artifact `jbrowse create' unpacks into a user's install. Packaging it from source would mean vendoring ~1700 npm packages for one webpack run of the pnpm monorepo (packages/, plugins/, products/), and node-build-system has no pnpm support, so this packages the released artifact instead: index.html, the static/ bundles and the volvox demo data under share/jbrowse-web. The app is configured at deployment time by placing a config.json next to index.html; test_data/config.json is a remote-hg19 demo, while test_data/volvox/config.json is fully offline.
| -rw-r--r-- | gn/packages/jbrowse.scm | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/gn/packages/jbrowse.scm b/gn/packages/jbrowse.scm new file mode 100644 index 0000000..d66350d --- /dev/null +++ b/gn/packages/jbrowse.scm @@ -0,0 +1,74 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2026 GeneNetwork team +;;; +;;; This file is part of guix-bioinformatics. +;;; +;;; guix-bioinformatics is free software: you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation, either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; guix-bioinformatics is distributed in the hope that it will be +;;; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +;;; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with guix-bioinformatics. If not, see +;;; <https://www.gnu.org/licenses/>. + +(define-module (gn packages jbrowse) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix download) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix build-system trivial) + #:use-module (gnu packages compression)) + +;; JBrowse 2's web UI is a single-page app that is normally distributed +;; as a prebuilt zip attached to a GitHub release (this is exactly the +;; artifact `jbrowse create' downloads and unpacks into a user's +;; install). Building it from the pnpm monorepo would mean vendoring +;; ~1700 npm packages for one webpack run, so we package the released +;; artifact instead; it is version-stamped (share/jbrowse-web/version.txt) +;; and the app is configured at deployment time by dropping a config.json +;; next to index.html. +;; +;; The zip carries test_data/ (only the volvox demo) so that +;; test_data/config.json can serve as a working config out of the box. +(define-public jbrowse-web + (package + (name "jbrowse-web") + (version "4.3.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/GMOD/jbrowse-components/releases/download/v" + version "/jbrowse-web-v" version ".zip")) + (file-name (string-append name "-" version ".zip")) + (sha256 + (base32 "00k7sxbdvyay27rmcv7ahilxcr8hgj2nsp7qrfhqiq1f20bj9m59")))) + (build-system trivial-build-system) + (inputs + (list unzip)) + (arguments + (list + #:modules '((guix build utils)) + #:builder + #~(begin + (use-modules (guix build utils)) + (let ((app (string-append #$output "/share/jbrowse-web"))) + (mkdir-p app) + (invoke (string-append #$(this-package-input "unzip") "/bin/unzip") + "-q" #$source "-d" app))))) + (home-page "https://jbrowse.org/jb2/") + (synopsis "Web-based genome browser, prebuilt single-page app") + (description + "JBrowse 2 is a genome browser that runs in a web browser. This package +ships the prebuilt @file{jbrowse-web} application (the zip published with the +upstream GitHub release): @file{index.html}, the @file{static/} bundles and the +volvox demo data under @file{test_data/}. Serve @file{share/jbrowse-web} with +any web server and place a @file{config.json} next to @file{index.html} to +describe the genomes and tracks to show.") + (license license:asl2.0))) |
