aboutsummaryrefslogtreecommitdiff
path: root/gn
diff options
context:
space:
mode:
authorEfraim Flashner2019-10-16 12:43:56 +0300
committerEfraim Flashner2019-10-16 12:44:52 +0300
commit0e892feec8936bfe852bbaec680bb6de5f4747ee (patch)
tree8624ad5bf6001bdd8a3594fd07514b1fe0971006 /gn
parent641257478ddb350639d34d3fbaf13088afa996be (diff)
downloadguix-bioinformatics-0e892feec8936bfe852bbaec680bb6de5f4747ee.tar.gz
gn: rn6-assembly-error-app: Create launcher script.
* gn/packages/bioinformatics.scm (rn6-assembly-error-app)[arguments]: Remove some library substitutions. Fix location of png directory. Create launcher script. [inputs]: Add r-minimal. Move r-ggplot2, r-shiny ... [propagated-inputs]: ... to here. Add r.
Diffstat (limited to 'gn')
-rw-r--r--gn/packages/bioinformatics.scm32
1 files changed, 20 insertions, 12 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm
index 612ce3e..e537aa8 100644
--- a/gn/packages/bioinformatics.scm
+++ b/gn/packages/bioinformatics.scm
@@ -741,29 +741,37 @@ different datasets.
(use-modules (guix build utils))
(let* ((out (assoc-ref %outputs "out"))
(targetdir (string-append out "/share/" ,name))
- (ggplot2 (assoc-ref %build-inputs "r-ggplot2"))
- (shiny (assoc-ref %build-inputs "r-shiny"))
+ (app (string-append out "/bin/" ,name))
+ (Rbin (string-append (assoc-ref %build-inputs "r-min")
+ "/bin/Rscript"))
(convert (string-append (assoc-ref %build-inputs "imagemagick")
"/bin/convert"))
(source (assoc-ref %build-inputs "source")))
- ;; Copied from https://stackoverflow.com/questions/2698269/how-do-you-change-library-location-in-r
(copy-recursively source targetdir)
(substitute* (string-append targetdir "/server.r")
- (("library\\(\"shiny\"" prefix)
- (string-append prefix ",lib.loc=" shiny "/site-library\""))
- (("library\\(\"ggplot2\"" prefix)
- (string-append prefix ",lib.loc=" ggplot2 "/site-library\""))
- (("convert") convert)
- )
+ (("./pngs") (string-append targetdir "/pngs"))
+ (("convert") convert))
+ (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=4202)~%\n"
+ Rbin targetdir)))
+ (chmod app #o555)
#t))))
(native-inputs `(("source" ,source)))
(inputs
`(("imagemagick" ,imagemagick)
+ ("r-min" ,r-minimal)))
+ (propagated-inputs
+ `(("freetype" ,freetype)
+ ("r" ,r)
("r-ggplot2" ,r-ggplot2)
("r-shiny" ,r-shiny)))
- (propagated-inputs
- `(("freetype" ,freetype)))
- (home-page "http://rn6err.opar.io/") ; or similar
+ (home-page "http://rn6err.opar.io/")
(synopsis "Display potential assembly errors in rn6")
(description
"Display potential assembly errors in rn6.")