From 1a6522f3a5a7d0990e50fe5dd91f286f62e083e7 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 4 Apr 2024 05:49:19 -0500 Subject: javascript-d3panels: add variable and add to genenetwork2 --- gn/packages/genenetwork.scm | 23 +++++++++++++++++++---- gn/packages/javascript.scm | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm index f7337c4..e3ec17f 100644 --- a/gn/packages/genenetwork.scm +++ b/gn/packages/genenetwork.scm @@ -220,6 +220,7 @@ javascript-cytoscape-qtip javascript-d3-tip javascript-d3js + javascript-d3panels javascript-datatables javascript-datatables-buttons javascript-datatables-buttons-bootstrap @@ -373,7 +374,7 @@ (lambda _ (begin (mkdir (string-append #$output "scripts")) - (for-each (lambda (fn) + (for-each (lambda (fn) (install-file fn (string-append #$output "/scripts"))) '("scripts/rqtl_wrapper.R" @@ -387,16 +388,30 @@ (branch "prod")))))) (define-public genenetwork2-stable - (let ((commit "42b37bba21530aab104bd2fbbddb27ce7cd7de7c") + (let ((commit "fd3de3dd7e0fac465bde193bd78085bd3434e885") (revision "1")) (package (inherit genenetwork2) (name "genenetwork2-stable") - (version (string-append "stable-" (git-version "3.11" revision commit))) + (version (string-append "stable-" (git-version "3.12" revision commit))) (source (git-checkout (url "https://github.com/genenetwork/genenetwork2") - (branch "prod")))))) + (branch "prod"))) + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'update-font-paths + (lambda* (#:key inputs outputs #:allow-other-keys) + (for-each (lambda (fn) + (substitute* (string-append "gn2/" fn) + (("\\./gn2/wqflask/static/fonts/") + (string-append (site-packages inputs outputs) "/gn2/wqflask/static/fonts/")))) + '("utility/Plot.py" + "wqflask/marker_regression/display_mapping_results.py")))) + )))))) (define-public gn-uploader (let ((commit "60fde66e02dba842b20fa126ff3b2ed9ec2638e6") diff --git a/gn/packages/javascript.scm b/gn/packages/javascript.scm index 2d1668b..f92ada9 100644 --- a/gn/packages/javascript.scm +++ b/gn/packages/javascript.scm @@ -433,6 +433,7 @@ tables with minimal effort.") (description "Scroller is a virtual rendering plug-in for DataTables which allows large datasets to be drawn on screen very quickly. Virtual rendering means is that only the visible portion of the table is drawn, while the scrolling container gives the visual impression that the whole table is visible, allowing excellent browser performance.") (license license:expat))) + (define-public javascript-xterm (package (name "javascript-xterm") @@ -805,6 +806,41 @@ without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation.") (license license:bsd-3))) +(define-public javascript-d3panels + (package + (name "javascript-d3panels") + (version "1.8.4") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/kbroman/d3panels.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1pmv24x4k0iy2mbibwwk8f85c6mljyqj2qwn03sq3pg93r16a0b5")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder + (begin + (use-modules (guix build utils)) + (let* ((out (assoc-ref %outputs "out")) + (targetdir (string-append out "/share/genenetwork2/javascript/d3panels")) + (source (assoc-ref %build-inputs "source"))) + (install-file (string-append source "/d3panels.js") targetdir) + (install-file (string-append source "/d3panels.min.js") targetdir) + (install-file (string-append source "/d3panels.css") targetdir) + (install-file (string-append source "/d3panels.min.css") targetdir) + (install-file (string-append source "/README.md") targetdir) + (install-file (string-append source "/NEWS.md") targetdir) + (install-file (string-append source "/LICENSE.md") targetdir) + )))) + (home-page "https://kbroman.org/d3panels") + (synopsis "d3panels for QTL mapping") + (description "This is a set of D3-based graphic panels, to be combined into larger multi-panel charts. They were developed for the R/qtlcharts package.") + (license license:expat))) + (define-public javascript-jquery (package (inherit web-jquery) -- cgit v1.2.3