diff options
author | pjotrp | 2019-12-22 01:03:56 -0600 |
---|---|---|
committer | pjotrp | 2019-12-22 01:03:56 -0600 |
commit | 301d23ba0ec3d5b27cf35eb97cf92b6cb1e2f6d9 (patch) | |
tree | d2d3c65a8af6c03a279be63a4196c08a4e90c5b9 /gn | |
parent | 4ab5fa7dbe1eb3312dbba68bd0f7ec7a97befb91 (diff) | |
parent | d0866cff48b0685e302441d879648333e181b267 (diff) | |
download | guix-bioinformatics-301d23ba0ec3d5b27cf35eb97cf92b6cb1e2f6d9.tar.gz |
Merge branch 'master' of gitlab.com:genenetwork/guix-bioinformatics
Diffstat (limited to 'gn')
-rw-r--r-- | gn/packages/bioinformatics.scm | 61 | ||||
-rw-r--r-- | gn/packages/bnw.scm | 84 | ||||
-rw-r--r-- | gn/services/bnw-container.scm | 18 | ||||
-rw-r--r-- | gn/services/gitea-dump.service | 2 | ||||
-rw-r--r-- | gn/services/gitea-nocontainer.service | 2 |
5 files changed, 121 insertions, 46 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index 4f133f8..4b8e16b 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -857,6 +857,67 @@ grants require a calculation of the applications power to detect the effect of interest, and this app can provide values and figures for applicants to use.") (license license:gpl3)))) +(define-public singlecellrshiny + (let ((commit "8061dcb477ba355de77d3e4fd3a15cf3267b56af") + (revision "1")) + (package + (name "singlecellrshiny") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/syousefi/singleCellRshiny.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1pd8a9jx6ijjggsifvq66madx31h29rah5pmz4kdzfzb4fskpqz1")))) + (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/" ,name)) + (app (string-append out "/bin/" ,name)) + (Rbin (string-append (assoc-ref %build-inputs "r-min") + "/bin/Rscript")) + (source (assoc-ref %build-inputs "source"))) + (copy-recursively source targetdir) + (substitute* (string-append targetdir "/global.R") + (("800-H1-H20-RNA-Seq-SingleCell-Retina-OMRF-03-29-19_FPKM_v2_SiamakPlay.csv") + "shinyRappToyDataset_SiamakPlay.csv") + ;; Comment out the two unreferenced files for now + (("^rgc.*") "") + ;(("CellTypes_RGC_Master_08Dec2018.csv") "") + ;(("RobTop1001.csv") "") + ) + (mkdir-p (string-append out "/bin")) + (call-with-output-file app + (lambda (port) + (format port +"#!~a +library(shiny) +setwd(\"~a\") +runApp(launch.browser=0, port=4208)~%\n" + Rbin targetdir))) + (chmod app #o555) + #t)))) + (native-inputs `(("source" ,source))) + (inputs + `(("r-min" ,r-minimal))) + (propagated-inputs + `(("r" ,r) + ("r-dt" ,r-dt) + ("r-seurat" ,r-seurat) + ("r-shiny" ,r-shiny))) + (home-page "http://rn6err.opar.io/") + (synopsis "RNA sequencing data analysis") + (description + "This is the R-Shiny programs to run some basic single cell RNA sequencing +(scRNA-seq) data analysis.") + (license license:gpl3)))) + (define-public seqwish (package (name "seqwish") diff --git a/gn/packages/bnw.scm b/gn/packages/bnw.scm index bdb6ac5..f7e95e3 100644 --- a/gn/packages/bnw.scm +++ b/gn/packages/bnw.scm @@ -14,7 +14,7 @@ (define-public bnw (let ((commit "eb6b002b924694808384f1a8d7c6d1121806ae04") - (revision "3")) + (revision "4")) (package (name "bnw") (version (git-version "1.22" revision commit)) ; June 28, 2019 @@ -41,6 +41,9 @@ (("http://bnw.genenetwork.org/BNW_1.22") "http://bnw-test.genenetwork.org")) (substitute* "sourcecodes/header_batchsearch.inc" (("my_style.css") "my_new_style.css")) + (substitute* (find-files "." "\\.php") + (("HTTP_POST_VARS") "_POST") + (("HTTP_POST_FILES") "_FILES")) #t)) (add-after 'patch-source-shebangs 'patch-more-shebangs (lambda* (#:key inputs #:allow-other-keys) @@ -70,48 +73,51 @@ (find-files "." ".*")) (substitute* '("sourcecodes/examplefilecopy.sh" "sourcecodes/filecopy.sh") - (("rm") (which "rm")) - (("cp") (which "cp"))) + (("^rm") (which "rm")) + (("\\ cp") (string-append " " (which "cp")))) + (substitute* (find-files "sourcecodes" "(^run|py$)") + (("/home/jziebart/python/Python-2.7.15/python") (which "python2"))) (substitute* (append (find-files "sourcecodes" ".php") (find-files "sourcecodes/run_scripts" ".*")) (("/usr/bin/dot") (string-append graphviz "/bin/dot"))) - (substitute* "sourcecodes/build.sh" + (substitute* '("sourcecodes/build.sh" + "downloads/BNW/src/build.sh") (("./localscore/libRmath.so") (string-append rmath "/lib/libRmath.so"))) - (substitute* "sourcecodes/layout_cyto.php" - (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.7.1/cytoscape.min.js") - (string-append cyto js-path "cytoscape/cytoscape.min.js")) - (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape/2.7.29/cytoscape.min.js") - (string-append cyto2 js-path "cytoscape/cytoscape.min.js")) - (("http://spades.bioinf.spbau.ru/~alla/graph_viewer/js/cytoscape-dagre.js") - (string-append cs-dagre js-path "cytoscape-dagre/cytoscape-dagre.js")) - (("https://unpkg.com/dagre@0.7.4/dist/dagre.js") - (string-append dagre js-path "dagre/dagre.js")) - (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape-panzoom/2.5.3/cytoscape.js-panzoom.css") - (string-append panzoom js-path "cytoscape-panzoom/cytoscape.js-panzoom.css")) - (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape-panzoom/2.5.3/cytoscape-panzoom.js") - (string-append panzoom js-path "cytoscape-panzoom/cytoscape-panzoom.js")) - (("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css") - (string-append awesome "/share/web/font-awesome/css/font-awesome.css")) - (("https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js") - (string-append jquery "/share/web/jquery/jquery.min.js")) - (("https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.js") - (string-append lodash js-path "lodash/lodash.js"))) - (substitute* '("sourcecodes/layout_svg_wt.php" - "sourcecodes/layout_svg_no.php") - (("http://d3js.org/d3.v4.min.js") - (string-append d3js js-path "d3js/d3.min.js")) - (("http://d3js.org/d3-selection-multi.v1.js") - (string-append d3js-multi js-path "d3js-multi/d3-selection-multi.js")) - (("https://cdn.rawgit.com/eligrey/canvas-toBlob.js/f1a01896135ab378aa5c0118eadd81da55e698d8/canvas-toBlob.js") - (string-append canvas-toblob js-path "canvas-toBlob/canvas-toBlob.js")) - (("https://cdn.rawgit.com/eligrey/FileSaver.js/e9d941381475b5df8b7d7691013401e171014e89/FileSaver.min.js") - (string-append filesaver js-path "filesaver/filesaver.js")))) + ;(substitute* "sourcecodes/layout_cyto.php" + ; (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape/3.7.1/cytoscape.min.js") + ; (string-append cyto js-path "cytoscape/cytoscape.min.js")) + ; (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape/2.7.29/cytoscape.min.js") + ; (string-append cyto2 js-path "cytoscape/cytoscape.min.js")) + ; (("http://spades.bioinf.spbau.ru/~alla/graph_viewer/js/cytoscape-dagre.js") + ; (string-append cs-dagre js-path "cytoscape-dagre/cytoscape-dagre.js")) + ; (("https://unpkg.com/dagre@0.7.4/dist/dagre.js") + ; (string-append dagre js-path "dagre/dagre.js")) + ; (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape-panzoom/2.5.3/cytoscape.js-panzoom.css") + ; (string-append panzoom js-path "cytoscape-panzoom/cytoscape.js-panzoom.css")) + ; (("https://cdnjs.cloudflare.com/ajax/libs/cytoscape-panzoom/2.5.3/cytoscape-panzoom.js") + ; (string-append panzoom js-path "cytoscape-panzoom/cytoscape-panzoom.js")) + ; (("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css") + ; (string-append awesome "/share/web/font-awesome/css/font-awesome.css")) + ; (("https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js") + ; (string-append jquery "/share/web/jquery/jquery.min.js")) + ; (("https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.10/lodash.js") + ; (string-append lodash js-path "lodash/lodash.js"))) + ;(substitute* '("sourcecodes/layout_svg_wt.php" + ; "sourcecodes/layout_svg_no.php") + ; (("http://d3js.org/d3.v4.min.js") + ; (string-append d3js js-path "d3js/d3.min.js")) + ; (("http://d3js.org/d3-selection-multi.v1.js") + ; (string-append d3js-multi js-path "d3js-multi/d3-selection-multi.js")) + ; (("https://cdn.rawgit.com/eligrey/canvas-toBlob.js/f1a01896135ab378aa5c0118eadd81da55e698d8/canvas-toBlob.js") + ; (string-append canvas-toblob js-path "canvas-toBlob/canvas-toBlob.js")) + ; (("https://cdn.rawgit.com/eligrey/FileSaver.js/e9d941381475b5df8b7d7691013401e171014e89/FileSaver.min.js") + ; (string-append filesaver js-path "filesaver/filesaver.js"))) + ) #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (delete-file "sourcecodes/localscore/libRmath.so") (copy-recursively "." out)) #t)) (add-after 'install 'make-files-executable @@ -120,28 +126,30 @@ (for-each (lambda (file) (chmod file #o555)) - (find-files out "\\.sh$")) + (append (find-files out "\\.(sh|py)$") + (find-files (string-append out "/sourcecodes/run_scripts" ".*")) + )) #t))) (replace 'build (lambda _ (with-directory-excursion "sourcecodes" (substitute* "build.sh" (("./localscore") "localscore")) - (chmod "k-best/src/buildk_poster.sh" #o755) + (chmod "k-best/src/buildk_poster.sh" #o555) (invoke "sh" "build.sh") ;; from info_files/plotly_notes.txt ;(with-directory-excursion "data" ; (setenv "HOME" "/tmp") ; (invoke "python" "../cv_plotly.py" "LvQ") ; (invoke "sh" "../plotly_loo.sh")) - ;(invoke "./run_loo" "LvQ Weight") + ;(invoke "./run_scripts/run_loo" "LvQ Weight") )))))) (inputs `(("graphviz" ,graphviz-2.26) ("octave" ,octave-3.4.3) ("python" ,python-2) ("plotly" ,python2-plotly-3.2.1) - ("rmath" ,rmath-standalone) ; Should this be r-minimal? Which version? + ("rmath" ,rmath-standalone) ("jquery" ,web-jquery) ("awesome" ,web-font-awesome) ("cytoscape" ,javascript-cytoscape) diff --git a/gn/services/bnw-container.scm b/gn/services/bnw-container.scm index cd8562f..13a9317 100644 --- a/gn/services/bnw-container.scm +++ b/gn/services/bnw-container.scm @@ -1,6 +1,7 @@ (define-module (gn services bnw-container)) -(use-modules (gnu)) +(use-modules (gnu) + (gn packages bnw)) (use-service-modules base networking web) (operating-system @@ -22,9 +23,14 @@ (server-blocks (list (nginx-server-configuration - (root "/srv/http/bnw") + (server-name '("Bayesian Network")) + (listen '("8888")) + (root bnw) (locations - (list (nginx-php-location))) - (listen '("8880")) - (ssl-certificate #f) - (ssl-certificate-key #f))))))))) + (list + (nginx-php-location) + (nginx-location-configuration + (uri "/sourcecodes/data/") + (body (list "alias /tmp/bnw/;"))) + )) + )))))))) diff --git a/gn/services/gitea-dump.service b/gn/services/gitea-dump.service index b9b310d..c177334 100644 --- a/gn/services/gitea-dump.service +++ b/gn/services/gitea-dump.service @@ -4,7 +4,7 @@ Wants=gitea.service [Service] Type=oneshot -Environment="GITEA_COMMAND=$(GUIX_PACKAGE_PATH=/home/efraimf/workspace/guix-bioinformatics /var/guix/profiles/per-user/efraimf/current-guix/bin/guix build gitea)/bin/gitea" +Environment="GITEA_COMMAND=/usr/local/guix-profiles/gitea/bin/gitea" ExecStart=/bin/su -l gitea -c 'GITEA_WORK_DIR=/var/lib/git/gitea HOME=/var/lib/git/gitea ${GITEA_COMMAND} dump' [Install] diff --git a/gn/services/gitea-nocontainer.service b/gn/services/gitea-nocontainer.service index b18e235..6784e51 100644 --- a/gn/services/gitea-nocontainer.service +++ b/gn/services/gitea-nocontainer.service @@ -3,7 +3,7 @@ Description=Gitea git server and web ui Wants=guix-daemon.service [Service] -Environment="GITEA_COMMAND=$(GUIX_PACKAGE_PATH=/home/efraimf/workspace/guix-bioinformatics /var/guix/profiles/per-user/efraimf/current-guix/bin/guix build gitea)/bin/gitea" +Environment="GITEA_COMMAND=/usr/local/guix-profiles/gitea/bin/gitea" ExecStart=/bin/su -l gitea -c 'GITEA_WORK_DIR=/var/lib/git/gitea HOME=/var/lib/git/gitea ${GITEA_COMMAND} --port 3300' [Install] |