diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm
index 00ec739..5b9deff 100644
--- a/gn/packages/bioinformatics.scm
+++ b/gn/packages/bioinformatics.scm
@@ -2737,6 +2737,186 @@ multiple sequence alignment.")
license:zlib ; deps/sonLib/externalTools/cutest
license:boost1.0)))) ; catch.hpp
+;; vg-gn: uses bundled vcflib (1.0.7) instead of external vcflib (1.0.12)
+;; because vg needs vcflib API (canonicalize, getMaxReferencePos) that was
+;; removed in 1.0.12. Also fixes cstdint in bundled WFA2-lib for GCC 13+.
+(define-public vg-gn
+ (package
+ (inherit vg)
+ (name "vg-gn")
+ (arguments
+ (list
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "Makefile"
+ ;; PKG_CONFIG_DEPS - no vcflib or fastahack (use bundled)
+ (("cairo libzstd")
+ "cairo htslib libzstd libdw libelf protobuf raptor2 sdsl-lite tabixpp fastahack libdeflate")
+
+ (("-Wl,-B.*") "\n")
+
+ (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libtabixpp\\.a") "$(LIB_DIR)/libtabixpp.a")
+ ((" \\$\\(LIB_DIR\\)/libtabixpp\\.a")
+ (string-append " " (search-input-file inputs "/lib/libtabixpp.so")))
+ (("\\$\\(LIB_DIR\\)/pkgconfig/tabixpp\\.pc")
+ (string-append " " (search-input-file inputs "/lib/pkgconfig/tabixpp.pc")))
+
+ (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libhts\\.a") "$(LIB_DIR)/libhts.a")
+ ((" \\$\\(LIB_DIR\\)/libhts\\.a")
+ (string-append " " (search-input-file inputs "/lib/libhts.so")))
+ (("\\$\\(LIB_DIR\\)/pkgconfig/htslib\\.pc")
+ (string-append " " (search-input-file inputs "/lib/pkgconfig/htslib.pc")))
+
+ (("\\$\\(CWD\\)/\\$\\(LIB_DIR\\)/libdeflate\\.a") "$(LIB_DIR)/libdeflate.a")
+ ((" \\$\\(LIB_DIR\\)/libdeflate\\.a")
+ (string-append " " (search-input-file inputs "/lib/libdeflate.so")))
+
+ ;; Keep bundled vcflib - don't replace libvcflib.a or vcf2tsv
+
+ ((" \\$\\(FASTAHACK_DIR\\)/fastahack")
+ (string-append " " (search-input-file inputs "/bin/fastahack")))
+ (("\\+= \\$\\(OBJ_DIR\\)/Fasta\\.o")
+ (string-append "+= " (search-input-file inputs "/lib/libfastahack.so")))
+
+ ((" \\$\\(LIB_DIR\\)/libsnappy.a")
+ (string-append " " (search-input-file inputs "/lib/libsnappy.so")))
+
+ (("-ldwfl -ldw -ldwelf -lelf -lebl") "-ldw -lelf")
+ ((" \\$\\(LIB_DIR\\)/libelf.a")
+ (string-append " " (search-input-file inputs "/lib/libelf.so")))
+ ((" \\$\\(LIB_DIR\\)/libdw.a")
+ (string-append " " (search-input-file inputs "/lib/libdw.so")))
+
+ ((" \\$\\(LIB_DIR\\)/%divsufsort.a")
+ (string-append " " (dirname
+ (search-input-file inputs "/lib/libdivsufsort.so"))
+ "%divsufsort.so"))
+ ((" \\$\\(LIB_DIR\\)/libdivsufsort.a")
+ (string-append " " (search-input-file inputs "/lib/libdivsufsort.so")))
+ ((" \\$\\(LIB_DIR\\)/%divsufsort64.a")
+ (string-append " " (dirname
+ (search-input-file inputs "/lib/libdivsufsort64.so"))
+ "%divsufsort64.so"))
+ ((" \\$\\(LIB_DIR\\)/libdivsufsort64.a")
+ (string-append " " (search-input-file inputs "/lib/libdivsufsort64.so")))
+
+ ((" \\$\\(LIB_DIR\\)/libjemalloc.a")
+ (string-append " " (search-input-file inputs "/lib/libjemalloc.a")))
+
+ ((" \\$\\(INC_DIR\\)/sparsehash")
+ (string-append " " (search-input-directory inputs "/include/sparsehash")))
+
+ ((" \\$\\(INC_DIR\\)/raptor2")
+ (string-append " " (search-input-directory inputs "/include/raptor2")))
+ ((" \\$\\(LIB_DIR\\)/libraptor2.a")
+ (string-append " " (search-input-file inputs "/lib/libraptor2.so")))
+ ((" \\$\\(BIN_DIR\\)/rapper")
+ (string-append " " (search-input-file inputs "/bin/rapper"))))
+ (mkdir "deps/libbdsg/bdsg/obj")
+ (mkdir "deps/libbdsg/lib")
+ (substitute* "deps/libbdsg/Makefile"
+ (("\\[ ! -e \\$\\(OBJ_DIR\\) \\][^\n]*") "")
+ (("\\[ ! -e \\$\\(LIB_DIR\\) \\][^\n]*") ""))))
+ (add-after 'unpack 'fix-bundled-vcflib
+ (lambda _
+ ;; Fix GCC 13+ cstdint issue in bundled WFA2-lib
+ (substitute* "deps/vcflib/contrib/WFA2-lib/bindings/cpp/WFAligner.hpp"
+ (("#include <string>" m)
+ (string-append m "\n#include <cstdint>")))
+ (substitute* (find-files "deps/vcflib/contrib/WFA2-lib" "\\.(h|c)$")
+ (("#include <stdlib.h>" m)
+ (string-append m "\n#include <stdint.h>")))
+ ;; Disable pybind11 python bindings in bundled vcflib
+ (substitute* "deps/vcflib/CMakeLists.txt"
+ ((".*pyvcflib.*") ""))))
+ (add-after 'unpack 'link-with-some-shared-libraries
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* '("deps/mmmultimap/CMakeLists.txt"
+ "deps/xg/CMakeLists.txt"
+ "deps/xg/deps/mmmulti/CMakeLists.txt")
+ (("\".*libsdsl\\.a\"") "\"-lsdsl\"")
+ (("\".*libdivsufsort\\.a\"") "\"-ldivsufsort\"")
+ (("\".*libdivsufsort64\\.a\"") "\"-ldivsufsort64\"")
+ (("\\$\\{sdsl-lite_INCLUDE\\}")
+ (search-input-directory inputs "/include/sdsl"))
+ (("\\$\\{sdsl-lite-divsufsort_INCLUDE\\}")
+ (dirname
+ (search-input-file inputs "/include/divsufsort.h"))))))
+ (add-after 'unpack 'dont-build-shared-vgio
+ (lambda _
+ (substitute* "deps/libvgio/CMakeLists.txt"
+ (("TARGETS vgio vgio_static") "TARGETS vgio_static"))))
+ (add-after 'unpack 'adjust-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bash-tap (assoc-ref inputs "bash-tap")))
+ (substitute* (find-files "test/t")
+ (("BASH_TAP_ROOT.*")
+ (string-append "BASH_TAP_ROOT=" bash-tap "/bin\n"))
+ ((".*bash-tap-bootstrap")
+ (string-append ". " bash-tap "/bin/bash-tap-bootstrap")))
+ (substitute* "test/t/02_vg_construct.t"
+ (("../deps/fastahack/fastahack") (which "fastahack"))
+ (("../bin/vcf2tsv") "bin/vcf2tsv"))
+ (substitute* "test/t/02_vg_construct.t"
+ ((".*self-inconsistent.*") "is $(true) \"\" \"\"\n"))
+ (substitute* "test/t/07_vg_map.t"
+ (("identity\\) 1 \"") "identity) 1.0 \""))
+ (substitute* '("test/t/07_vg_map.t"
+ "test/t/33_vg_mpmap.t")
+ ((".*node id.*") "is $(true) \"\" \"\"\n"))
+ (substitute* "test/t/48_vg_convert.t"
+ (("true \"vg.*") "true \"true\"\n"))
+ (substitute* "test/t/50_vg_giraffe.t"
+ ((".*A long read can.*") "is $(true) \"\" \"\"\n")
+ ((".*A long read has.*") "is $(true) \"\" \"\"\n")
+ ((".*Long read minimizer.*") "is $(true) \"\" \"\"\n"))
+ (substitute* "Makefile"
+ ((".*test-docs.*") "")))))
+ (add-after 'build 'build-manpages
+ (lambda* (#:key make-flags #:allow-other-keys)
+ (substitute* "doc/vgmanmd.py"
+ (("'vg'") "'./bin/vg'"))
+ (apply invoke "make" "man" make-flags)))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "bin/vg" (string-append out "/bin"))
+ (install-file "lib/libhandlegraph.so" (string-append out "/lib"))
+ (for-each
+ (lambda (file)
+ (install-file file (string-append out "/share/man/man1")))
+ (find-files "doc/man" "\\.1$"))))))
+ #:tests? #f))
+ (inputs
+ (list boost
+ cairo
+ curl
+ elfutils
+ fastahack
+ htslib
+ jansson
+ jemalloc
+ libdeflate
+ libdivsufsort
+ ncurses
+ openmpi
+ protobuf
+ raptor2
+ sdsl-lite
+ smithwaterman
+ snappy
+ sparsehash
+ tabixpp
+ ;; No external vcflib -- use bundled vcflib 1.0.7
+ zlib
+ (list zstd "lib")))))
+
(define-public wfmash-0.14
(package
(inherit wfmash)
@@ -2850,7 +3030,7 @@ multiple sequence alignment.")
"smoothxg"
"time"
"vcfbub"
- "vg"
+ "vg-gn"
"wfmash"))))))
(list (string-append out "/bin/pggb")
(string-append out "/bin/partition-before-pggb")
@@ -2885,7 +3065,7 @@ multiple sequence alignment.")
smoothxg
time
vcfbub
- vg
+ vg-gn
wfmash-0.14))
(home-page "https://doi.org/10.1101/2023.04.05.535718")
(synopsis "PanGenome Graph Builder")
diff --git a/gn/packages/r-shiny.scm b/gn/packages/r-shiny.scm
index c2e61a6..1ac73b6 100644
--- a/gn/packages/r-shiny.scm
+++ b/gn/packages/r-shiny.scm
@@ -1,12 +1,16 @@
(define-module (gn packages r-shiny)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix gexp)
#:use-module (guix download)
+ #:use-module (guix git-download)
+ #:use-module (guix utils)
#:use-module (guix build-system r)
+ #:use-module (guix build-system trivial)
#:use-module (guix packages)
- #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages bioconductor)
#:use-module (gnu packages cran)
- #:use-module (gnu packages javascript))
+ #:use-module (gnu packages javascript)
+ #:use-module (gnu packages statistics))
(define-public r-shiny-gn
(deprecated-package "r-shiny-gn" r-shiny))
@@ -59,3 +63,301 @@ inspection and report generation tools.")
"This package provides mappings from Entrez gene identifiers to various
annotations for the genome of the rat.")
(license license:artistic2.0)))
+
+(define-public r-shinytoastr
+ (package
+ (name "r-shinytoastr")
+ (version "2.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "shinytoastr" version))
+ (sha256
+ (base32 "1zcf4ya9anlq6n97iq0b86ybcqbbd2h66vrr41m80zvlkav3z46z"))))
+ (properties `((upstream-name . "shinytoastr")))
+ (build-system r-build-system)
+ (propagated-inputs (list r-shiny))
+ (home-page "https://github.com/gaborcsardi/shinytoastr")
+ (synopsis "Notifications from Shiny")
+ (description "Browser notifications in Shiny apps, using toastr.")
+ (license license:expat)))
+
+(define-public r-spscomps
+ (package
+ (name "r-spscomps")
+ (version "0.3.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "spsComps" version))
+ (sha256
+ (base32 "1l69yigdabwwsixk364jvmc1c5nc8d4djc77cf0jlzshhdsjbqx8"))))
+ (properties `((upstream-name . "spsComps")))
+ (build-system r-build-system)
+ (propagated-inputs (list r-assertthat
+ r-crayon
+ r-glue
+ r-htmltools
+ r-magrittr
+ r-r6
+ r-shiny
+ r-shinyace
+ r-shinytoastr
+ r-stringr))
+ (home-page "https://github.com/lz100/spsComps")
+ (synopsis "systemPipeShiny UI and Server Components")
+ (description
+ "UI and server components from the systemPipeShiny framework for use
+in Shiny applications.")
+ (license license:gpl3+)))
+
+(define-public r-scatterd3
+ (package
+ (name "r-scatterd3")
+ (version "1.0.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "scatterD3" version))
+ (sha256
+ (base32 "187jq1y5va5npsmpkfyi6mhgynq956590q4z8v1ibadsrcldw34m"))))
+ (properties `((upstream-name . "scatterD3")))
+ (build-system r-build-system)
+ (propagated-inputs (list r-digest r-ellipse r-htmlwidgets))
+ (native-inputs (list r-knitr))
+ (home-page "https://juba.github.io/scatterD3/")
+ (synopsis "D3 JavaScript Scatterplot from R")
+ (description
+ "Creates D3 JavaScript scatterplots from R with interactive features:
+panning, zooming, tooltips, etc.")
+ (license license:gpl3+)))
+
+(define-public r-shinywidgets
+ (package
+ (name "r-shinywidgets")
+ (version "0.9.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "shinyWidgets" version))
+ (sha256
+ (base32 "118yqylidnlc1ixwang4bvhyy3hjmsimkcv1cz73s8wsj45hmyzb"))))
+ (properties `((upstream-name . "shinyWidgets")))
+ (build-system r-build-system)
+ (arguments (list #:tests? #f))
+ (propagated-inputs (list r-bslib
+ r-htmltools
+ r-jsonlite
+ r-rlang
+ r-sass
+ r-shiny))
+ (home-page "https://github.com/dreamRs/shinyWidgets")
+ (synopsis "Custom Inputs Widgets for Shiny")
+ (description
+ "Collection of custom input controls and user interface components for
+Shiny applications.")
+ (license license:gpl3)))
+
+(define-public jumpshiny
+ (let ((commit "3489f3265a2eca45c9b6d251013b313bf55f975d")
+ (revision "1"))
+ (package
+ (name "jumpshiny")
+ (version (git-version "0.0.0" revision commit))
+ (source (local-file "/fast/pjotr/tmp/claude/factory/jumpshiny"
+ "jumpshiny-checkout"
+ #:recursive? #t
+ #:select? (git-predicate
+ "/fast/pjotr/tmp/claude/factory/jumpshiny")))
+ (build-system trivial-build-system)
+ (arguments
+ (list #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (targetdir (string-append #$output "/share/" #$name))
+ (app (string-append #$output "/bin/" #$name))
+ (Rbin (search-input-file %build-inputs "/bin/Rscript")))
+ (copy-recursively source targetdir)
+ (mkdir-p (string-append #$output "/bin"))
+ (call-with-output-file app
+ (lambda (port)
+ (format port
+ "#!~a
+library(shiny)
+setwd(\"~a\")
+options(shiny.maxRequestSize = 60*1024^2)
+runApp(launch.browser=0, port=3978)~%\n"
+ Rbin targetdir)))
+ (chmod app #o555)))))
+ (propagated-inputs
+ (list r
+ ;; Core shiny
+ r-shiny
+ r-shinycssloaders
+ r-shinybs
+ r-shinyjs
+ r-shinythemes
+ r-shinydashboard
+ r-shinywidgets
+ r-fresh
+ ;; Data processing
+ r-dplyr
+ r-tidyr
+ r-tidyverse
+ r-data-table
+ r-plyr
+ r-readxl
+ r-writexl
+ r-devtools
+ r-pacman
+ ;; Visualization
+ r-ggplot2
+ r-plotly
+ r-heatmaply
+ r-gplots
+ r-scatterd3
+ r-rcolorbrewer
+ r-pheatmap
+ r-complexheatmap
+ r-circlize
+ ;; Stats and bioinformatics
+ r-limma
+ r-cluster
+ r-clusterprofiler
+ r-enrichplot
+ r-wgcna
+ r-annotate
+ r-org-hs-eg-db
+ r-org-mm-eg-db
+ r-org-rn-eg-db
+ r-igraph
+ r-visnetwork
+ ;; Utilities
+ r-dt
+ r-markdown
+ r-bookdown
+ r-scales
+ r-curl
+ r-glue
+ r-spscomps
+ r-ggnewscale
+ r-stringr
+ r-zoo
+ r-officer
+ r-r-utils
+ r-mass
+ r-knitr
+ r-rmarkdown))
+ (home-page "https://git.genenetwork.org/jumpshiny/")
+ (synopsis "JUMPshiny - proteomics data analysis Shiny app")
+ (description
+ "JUMPshiny is an R Shiny application for proteomics data analysis,
+including data import, batch normalization, differential expression,
+enrichment analysis, and network analysis with WGCNA.")
+ (license license:gpl3+))))
+
+(define-public r-efatools
+ (package
+ (name "r-efatools")
+ (version "0.6.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (cran-uri "EFAtools" version))
+ (sha256
+ (base32 "0x2c1a1fwa79pdam2day57rpcyxf195a4kqsnwzr2xh6x1fjrnad"))))
+ (properties `((upstream-name . "EFAtools")))
+ (build-system r-build-system)
+ (arguments (list #:tests? #f))
+ (propagated-inputs (list r-checkmate
+ r-cli
+ r-crayon
+ r-dplyr
+ r-future
+ r-future-apply
+ r-ggplot2
+ r-gparotation
+ r-lavaan
+ r-magrittr
+ r-progress
+ r-progressr
+ r-psych
+ r-rcpp
+ r-rcpparmadillo
+ r-rlang
+ r-stringr
+ r-tibble
+ r-tidyr
+ r-viridislite))
+ (native-inputs (list r-knitr))
+ (home-page "https://github.com/mdsteiner/EFAtools")
+ (synopsis "Fast and flexible exploratory factor analysis tools")
+ (description
+ "Functions to perform exploratory factor analysis (EFA) procedures and
+compare their solutions.")
+ (license license:gpl3)))
+
+(define-public jumpsem-web
+ (let ((commit "a134ab0b10f3d2393ca19870e154ab8bafd45757")
+ (revision "1"))
+ (package
+ (name "jumpsem-web")
+ (version (git-version "0.0.0" revision commit))
+ (source (local-file "/fast/pjotr/tmp/claude/factory/jumpsem_web"
+ "jumpsem-web-checkout"
+ #:recursive? #t))
+ (build-system trivial-build-system)
+ (arguments
+ (list #:modules '((guix build utils))
+ #:builder
+ #~(begin
+ (use-modules (guix build utils))
+ (let* ((source (assoc-ref %build-inputs "source"))
+ (targetdir (string-append #$output "/share/" #$name))
+ (app (string-append #$output "/bin/" #$name))
+ (Rbin (search-input-file %build-inputs "/bin/Rscript")))
+ (copy-recursively source targetdir)
+ (mkdir-p (string-append #$output "/bin"))
+ (call-with-output-file app
+ (lambda (port)
+ (format port
+ "#!~a
+library(shiny)
+setwd(\"~a\")
+options(shiny.maxRequestSize = 500*1024^2)
+runApp(launch.browser=0, port=3979)~%\n"
+ Rbin targetdir)))
+ (chmod app #o555)))))
+ (propagated-inputs
+ (list r
+ r-shiny
+ r-shinycssloaders
+ r-shinybs
+ r-shinyjs
+ r-shinywidgets
+ r-shinydashboard
+ r-dplyr
+ r-tidyr
+ r-tidyverse
+ r-data-table
+ r-devtools
+ r-pacman
+ r-ggplot2
+ r-plotly
+ r-heatmaply
+ r-gplots
+ r-rcolorbrewer
+ r-scales
+ r-markdown
+ r-dt
+ r-lavaan
+ r-efatools
+ r-rcpparmadillo))
+ (home-page "https://git.genenetwork.org/jumpsem_web/")
+ (synopsis "JUMPsem - structural equation modeling web app")
+ (description
+ "JUMPsem is an R Shiny application for kinase activity inference
+using structural equation modeling on post-translational modification data.")
+ (license license:gpl3+))))
|