diff options
author | jgart | 2024-07-29 19:29:01 -0500 |
---|---|---|
committer | jgart | 2024-07-31 11:39:27 -0500 |
commit | fc66a23d84935889ccf2c030e860d6ce7ab9bcb7 (patch) | |
tree | 05fdb548b4c486e11db7d81d18b5503dc8c7b897 /gn/packages/mouse-longevity.scm | |
parent | d92c8aef6f0ed8a47c0e20b0a9032b83ce84d0f4 (diff) | |
download | guix-bioinformatics-fc66a23d84935889ccf2c030e860d6ce7ab9bcb7.tar.gz |
gn: Add mouse-longevity-app.
* gn/packages/mouse-longevity.scm (mouse-longevity-app): New variable.
Diffstat (limited to 'gn/packages/mouse-longevity.scm')
-rw-r--r-- | gn/packages/mouse-longevity.scm | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/gn/packages/mouse-longevity.scm b/gn/packages/mouse-longevity.scm new file mode 100644 index 0000000..7b00f4c --- /dev/null +++ b/gn/packages/mouse-longevity.scm @@ -0,0 +1,84 @@ +;;; guix-bioinformatics --- Bioinformatics packages for GNU Guix +;;; Copyright © 2024 jgart <jgart@dismail.de> +;;; +;;; This file is part of guix-bioinformatics. +;;; +;;; genenetwork-machines 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. +;;; +;;; genenetwork-machines 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 genenetwork-machines. If not, see +;;; <https://www.gnu.org/licenses/>. + +(define-module (gn packages mouse-longevity) + #:use-module (guix) + #:use-module (gnu) + #:use-module (gnu services shepherd) + #:use-module (gn services rshiny) + #:use-module (guix git-download) + #:use-module (guix modules) + #:use-module (guix records) + #:use-module (srfi srfi-1) + #:use-module (ice-9 match) + #:use-module (gnu packages cran) + #:use-module (gnu packages statistics) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix build-system trivial) + #:use-module ((gnu packages admin) #:select (shepherd)) + #:use-module ((gnu packages web) #:select (nginx))) + +(define-public mouse-longevity-app + (let ((commit "7f8198195d68341242132911f15971c137797e61") + (revision "0")) + (package + (name "mouse-longevity-app") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Dashbrook/Mouse_Longevity_app/") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1wvda7h737dyrz1zv796666v0rndalfd8gxl3964x6qgcsgprcsf")))) + (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\") +runApp(launch.browser=0, port=3979)~%\n" + Rbin targetdir))) + (chmod app #o555))))) + (propagated-inputs + (list r + r-ggplot2 + r-dplyr + r-plotly + r-shinyjs + r-shiny)) + (home-page "https://github.com/Dashbrook/Mouse_Longevity_app/") + (synopsis "R shiny app to visualize mouse lifespan data") + (description + "This package provides an R shiny app to visualize mouse strain +longevity data.") + (license license:gpl3+)))) |