aboutsummaryrefslogtreecommitdiff
path: root/gn/packages/genenetwork.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gn/packages/genenetwork.scm')
-rw-r--r--gn/packages/genenetwork.scm387
1 files changed, 232 insertions, 155 deletions
diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm
index 4c3ef26..60173a9 100644
--- a/gn/packages/genenetwork.scm
+++ b/gn/packages/genenetwork.scm
@@ -293,7 +293,6 @@ Graphical Fragment Assembly} files and related formats.")
(define-public genenetwork2
(let ((commit "84cbf35adbb15c79638372d108308edb05f12683"))
(package
- (inherit python2-genenetwork2)
(name "genenetwork2")
(version (string-append "3.11-guix-" (string-take commit 7) ))
(source (origin
@@ -308,166 +307,244 @@ Graphical Fragment Assembly} files and related formats.")
(native-inputs
`(("graphviz" ,graphviz)))
(propagated-inputs
- (let ((inputs (package-propagated-inputs python2-genenetwork2)))
- `(,@(fold
- alist-delete inputs
- (map car
- (filter (lambda (x)
- (let ((name (car x)))
- (or (string-prefix? "python2" name)
- (string-prefix? "python-2" name)
- (string=? "python" name))))
- inputs)))
- ("genenetwork3" ,genenetwork3)
- ("parallel" ,parallel) ;; GNU parallel
- ("python" ,python-wrapper)
- ("python-pillow" ,python-pillow)
- ("python-coverage" ,python-coverage)
- ("python-configparser" ,python-configparser) ;; maintenance/scripts
- ("python-flask" ,python-flask)
- ("gunicorn" ,gunicorn)
- ("python-autopep8" ,python-autopep8)
- ("python-cssselect" ,python-cssselect)
- ("python-elasticsearch" ,python-elasticsearch)
- ("python-htmlgen" ,python-htmlgen)
- ("python-jinja2" ,python-jinja2)
- ("python-sqlalchemy" ,python-sqlalchemy)
- ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)
- ("python-setuptools" ,python-setuptools)
- ("python-scipy" ,python-scipy)
- ("python-lxml" ,python-lxml)
- ("python-mechanize" ,python-mechanize)
- ("python-mysqlclient" ,python-mysqlclient)
- ("python-mypy" ,python-mypy)
- ("python-numpy" ,python-numpy)
- ("python-pandas" ,python-pandas)
- ("python-parameterized" ,python-parameterized)
- ("python-passlib" ,python-passlib)
- ("python-pylint" ,python-pylint)
- ("python-redis" ,python-redis)
- ("python-requests" ,python-requests)
- ("python-simplejson" ,python-simplejson)
- ("python-pyyaml" ,python-pyyaml)
- ("python-markdown" ,python-markdown)
- ("python-rdflib" ,python-rdflib)
- ;; TODO: Get rid of Python R bindings
- ("python-rpy2" ,python-rpy2-next)
- ("python-beautifulsoup4" ,python-beautifulsoup4)
- ;; Disable for now. Build fails on Penguin2
- ;; ("python-flask-socketio" ,python-flask-socketio)
- ("python-xlsxwriter" ,python-xlsxwriter))))
+ `(("genenetwork3" ,genenetwork3)
+ ("parallel" ,parallel) ;; GNU parallel
+ ("coreutils" ,coreutils)
+ ("git" ,git)
+ ("which" ,which)
+ ("grep" ,grep)
+ ("r" ,r)
+ ("r-ctl" ,r-ctl)
+ ; ("r-phewas" ,r-phewas)
+ ("r-qtl" ,r-qtl)
+ ("r-wgcna" ,r-wgcna)
+ ("redis" ,redis)
+ ("mariadb" ,mariadb)
+ ("gemma" ,gemma-gn2)
+ ("gemma-wrapper" ,gemma-wrapper)
+ ; ("genenetwork2-files-small" ,genenetwork2-files-small)
+ ("plink-ng-gn" ,plink-ng-gn)
+ ; ("pylmm-gn2" ,pylmm-gn2)
+ ("rust-qtlreaper" ,rust-qtlreaper)
+ ("nginx" ,nginx)
+ ("python" ,python-wrapper)
+ ("python-pillow" ,python-pillow)
+ ("python-coverage" ,python-coverage)
+ ("python-configparser" ,python-configparser) ;; maintenance/scripts
+ ("python-flask" ,python-flask)
+ ("gunicorn" ,gunicorn)
+ ("python-autopep8" ,python-autopep8)
+ ("python-cssselect" ,python-cssselect)
+ ("python-elasticsearch" ,python-elasticsearch)
+ ("python-htmlgen" ,python-htmlgen)
+ ("python-jinja2" ,python-jinja2)
+ ("python-sqlalchemy" ,python-sqlalchemy)
+ ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)
+ ("python-setuptools" ,python-setuptools)
+ ("python-scipy" ,python-scipy)
+ ("python-lxml" ,python-lxml)
+ ("python-mechanize" ,python-mechanize)
+ ("python-mysqlclient" ,python-mysqlclient)
+ ("python-mypy" ,python-mypy)
+ ("python-numpy" ,python-numpy)
+ ("python-pandas" ,python-pandas)
+ ("python-parameterized" ,python-parameterized)
+ ("python-passlib" ,python-passlib)
+ ("python-pylint" ,python-pylint)
+ ("python-redis" ,python-redis)
+ ("python-requests" ,python-requests)
+ ("python-simplejson" ,python-simplejson)
+ ("python-pyyaml" ,python-pyyaml)
+ ("python-markdown" ,python-markdown)
+ ("python-rdflib" ,python-rdflib)
+ ("python-twint" ,python-twint)
+ ("python-unittest2" ,python-unittest2)
+ ;; TODO: Get rid of Python R bindings
+ ("python-rpy2" ,python-rpy2-next)
+ ("python-beautifulsoup4" ,python-beautifulsoup4)
+ ;; Disable for now. Build fails on Penguin2
+ ;; ("python-flask-socketio" ,python-flask-socketio)
+ ("python-xlsxwriter" ,python-xlsxwriter)
+ ;; All the external js dependencies
+ ("javascript-twitter-post-fetcher" ,javascript-twitter-post-fetcher)
+ ("javascript-cytoscape" ,javascript-cytoscape)
+ ("javascript-panzoom" ,javascript-cytoscape-panzoom)
+ ("javascript-qtip" ,javascript-cytoscape-qtip)
+ ("javascript-chroma" ,javascript-chroma)
+ ("javascript-d3-tip" ,javascript-d3-tip)
+ ("javascript-jscolor" ,javascript-jscolor)
+ ("javascript-colorbox" ,javascript-colorbox)
+ ("javascript-jszip" ,javascript-jszip)
+ ("js-jstat" ,js-jstat)
+ ("js-md5" ,js-md5)
+ ("js-parsley" ,js-parsley)
+ ("javascript-plotly" ,javascript-plotly)
+ ("javascript-typeahead" ,javascript-typeahead)
+ ("js-underscore" ,js-underscore)
+ ("js-smart-time-ago" ,js-smart-time-ago)
+ ("javascript-nouislider" ,javascript-nouislider)
+ ("javascript-purescript-genome-browser" ,javascript-purescript-genome-browser)
+ ("javascript-ckeditor" ,javascript-ckeditor)
+ ("javascript-datatables" ,javascript-datatables)
+ ("javascript-datatables-scroller" ,javascript-datatables-scroller)
+ ("javascript-datatables-buttons" ,javascript-datatables-buttons)
+ ("javascript-datatables-buttons-bootstrap" ,javascript-datatables-buttons-bootstrap)
+ ("javascript-datatables-plugins" ,javascript-datatables-plugins)
+ ("javascript-datatables-col-reorder" ,javascript-datatables-col-reorder)
+ ("javascript-datatables-col-resize" ,javascript-datatables-col-resize)
+ ("javascript-datatables-buttons-styles" ,javascript-datatables-buttons-styles)
+ ("javascript-shapiro-wilk" ,javascript-shapiro-wilk)
+ ("javascript-underscore-string" ,javascript-underscore-string)
+ ("javascript-qtip2" ,javascript-qtip2)
+ ("javascript-d3js" ,javascript-d3js)
+ ("javascript-nvd3" ,javascript-nvd3)
+ ("javascript-bootstrap" ,javascript-bootstrap)
+ ("javascript-jquery" ,javascript-jquery)
+ ("javascript-zxcvbn" ,javascript-zxcvbn)
+ ("javascript-jquery-ui" ,javascript-jquery-ui)
+ ("javascript-jquery-cookie" ,javascript-jquery-cookie)
+ ("javascript-font-awesome" ,javascript-font-awesome)))
+ (inputs
+ `(("javascript-colorbox" ,(package-source javascript-colorbox))))
+ (build-system python-build-system)
(arguments
- (let ((python (specification->package "python-wrapper"))
- (args (package-arguments python2-genenetwork2)))
- (substitute-keyword-arguments args
- ((#:python _) python)
- ((#:phases phases)
- `(modify-phases ,phases
- (add-after 'unpack 'fix-paths-scripts
- (lambda _
- (substitute* "bin/genenetwork2"
- (("/usr/bin/env") (which "env"))
- (("python ") (string-append (which "python3") " "))
- (("readlink") (which "readlink"))
- (("dirname") (which "dirname"))
- (("basename") (which "basename"))
- (("cat") (which "cat"))
- (("echo") (which "echo"))
- (("redis-server") (which "redis-server"))
- (("git") (which "git"))
- (("grep") (which "grep"))
- (("rm") (which "rm"))
- (("which") (which "which")))
- #t))
- (add-after 'install 'generate-graph
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (call-with-output-file
- (string-append
- (assoc-ref outputs "out")
- "/lib/python3.8/site-packages"
- "/wqflask/dependency-graph.html")
- (lambda (port)
- (format
- port "~a"
- ,(call-with-output-string
- (lambda (p)
- (with-output-to-port p
- (lambda ()
- (run-with-store
- (open-connection)
- (export-graph
- (list this-package)
- p
- #:node-type %package-node-type
- #:backend %d3js-backend)))))))))))
- (add-after 'install 'generate-dag-svg-file
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let* ((output-dir
- (string-append
- (assoc-ref outputs "out")
- "/lib/python3.8/site-packages/wqflask/"))
- (dot-file
- (string-append
- output-dir
- "dependency-graph.dot"))
- (svg-file
- (string-append
- output-dir
- "dependency-graph.svg")))
- (begin
- (call-with-output-file
- dot-file
- (lambda (port)
- (format
- port "~a"
- ,(call-with-output-string
- (lambda (p)
- (with-output-to-port p
- (lambda ()
- (run-with-store
- (open-connection)
- (export-graph
- (list this-package)
- p
- #:node-type %package-node-type
- #:backend %graphviz-backend)))))))))
- (invoke "dot" "-Tsvg" "-o" svg-file dot-file)))))
- (add-after 'install 'generate-dependency-file
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (call-with-output-file
- (string-append
- (assoc-ref outputs "out")
- "/lib/python3.8/site-packages"
- "/wqflask/DEPENDENCIES.md")
- (lambda (port)
- (format
- port "
+ `(#:python python-wrapper
+ #:tests? #f ; no 'setup.py test'
+ #:phases %standard-phases
+ (modify-phases ,phases
+ (delete 'reset-gzip-timestamps)
+ (add-after 'unpack 'fix-paths-scripts
+ (lambda _
+ (substitute* "bin/genenetwork2"
+ (("/usr/bin/env") (which "env"))
+ (("python ") (string-append (which "python3") " "))
+ (("readlink") (which "readlink"))
+ (("dirname") (which "dirname"))
+ (("basename") (which "basename"))
+ (("cat") (which "cat"))
+ (("echo") (which "echo"))
+ (("redis-server") (which "redis-server"))
+ (("git") (which "git"))
+ (("grep") (which "grep"))
+ (("rm") (which "rm"))
+ (("which") (which "which")))
+ #t))
+ (add-after 'unpack 'patch-javascript
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((colorbox (assoc-ref inputs "javascript-colorbox"))
+ (gn2 "/share/genenetwork2/javascript/"))
+ (delete-file-recursively "wqflask/wqflask/static/packages/colorbox")
+ (copy-recursively colorbox "wqflask/wqflask/static/packages/colorbox")
+ #t)))
+ (add-before 'install 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* (
+ ; (datafiles (string-append (assoc-ref inputs "genenetwork2-files-small") "/share/genenetwork2"))
+ ; (pylmmcmd (string-append (assoc-ref inputs "pylmm-gn2") "/bin/pylmm_redis"))
+ (plink2cmd (string-append (assoc-ref inputs "plink-ng-gn") "/bin/plink2"))
+ (gemmacmd (string-append (assoc-ref inputs "gemma") "/bin/gemma"))
+ )
+
+ (substitute* '("etc/default_settings.py")
+ ; (("^GENENETWORK_FILES +=.*") (string-append "GENENETWORK_FILES = \"" datafiles "\"\n" ))
+ ; (("^PYLMM_COMMAND =.*") (string-append "PYLMM_COMMAND = \"" pylmmcmd "\"\n" ))
+ (("^PLINK_COMMAND =.*") (string-append "PLINK_COMMAND = \"" plink2cmd "\"\n" ))
+ (("^GEMMA_COMMAND =.*") (string-append "GEMMA_COMMAND = \"" gemmacmd "\"\n" ))
+ )
+ )))
+ (add-after 'install 'generate-graph
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (call-with-output-file
+ (string-append
+ (assoc-ref outputs "out")
+ "/lib/python3.8/site-packages"
+ "/wqflask/dependency-graph.html")
+ (lambda (port)
+ (format
+ port "~a"
+ ,(call-with-output-string
+ (lambda (p)
+ (with-output-to-port p
+ (lambda ()
+ (run-with-store
+ (open-connection)
+ (export-graph
+ (list this-package)
+ p
+ #:node-type %package-node-type
+ #:backend %d3js-backend)))))))))))
+ (add-after 'install 'generate-dag-svg-file
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let* ((output-dir
+ (string-append
+ (assoc-ref outputs "out")
+ "/lib/python3.8/site-packages/wqflask/"))
+ (dot-file
+ (string-append
+ output-dir
+ "dependency-graph.dot"))
+ (svg-file
+ (string-append
+ output-dir
+ "dependency-graph.svg")))
+ (begin
+ (call-with-output-file
+ dot-file
+ (lambda (port)
+ (format
+ port "~a"
+ ,(call-with-output-string
+ (lambda (p)
+ (with-output-to-port p
+ (lambda ()
+ (run-with-store
+ (open-connection)
+ (export-graph
+ (list this-package)
+ p
+ #:node-type %package-node-type
+ #:backend %graphviz-backend)))))))))
+ (invoke "dot" "-Tsvg" "-o" svg-file dot-file)))))
+ (add-after 'install 'generate-dependency-file
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (call-with-output-file
+ (string-append
+ (assoc-ref outputs "out")
+ "/lib/python3.8/site-packages"
+ "/wqflask/DEPENDENCIES.md")
+ (lambda (port)
+ (format
+ port "
#### System Inputs (generated from ~a package defined in ~a)
|Name | Description |
|-----|-------------|
~a
"
- ,(package-name this-package)
- (string-append
- "[genenetwork.scm]"
- "(http://git.genenetwork.org/"
- "guix-bioinformatics/guix-bioinformatics"
- "/src/branch/master/gn/packages/"
- "genenetwork.scm)")
- ,(apply
- string-append
- (map
- (lambda (input)
- (let* ((pkg (cadr input))
- (name (package-name pkg))
- (version (package-version pkg))
- (home-page (package-home-page pkg))
- (description (package-synopsis pkg)))
- (string-append
- "| **[" name "](" home-page ")** v"
- version"| "
- description " |\n")))
- (package-propagated-inputs this-package))))))))))))))))
+ ,(package-name this-package)
+ (string-append
+ "[genenetwork.scm]"
+ "(http://git.genenetwork.org/"
+ "guix-bioinformatics/guix-bioinformatics"
+ "/src/branch/master/gn/packages/"
+ "genenetwork.scm)")
+ ,(apply
+ string-append
+ (map
+ (lambda (input)
+ (let* ((pkg (cadr input))
+ (name (package-name pkg))
+ (version (package-version pkg))
+ (home-page (package-home-page pkg))
+ (description (package-synopsis pkg)))
+ (string-append
+ "| **[" name "](" home-page ")** v"
+ version"| "
+ description " |\n")))
+ (package-propagated-inputs this-package)))))))))))
+ (home-page "http://genenetwork.org/")
+ (synopsis "Full genenetwork services")
+ (description "Genenetwork installation sumo.")
+ (license license:agpl3+))))
;; ./pre-inst-env guix download http://files.genenetwork.org/raw_database/db_webqtl_s.zip
;; 0sscjh0wml2lx0mb43vf4chg9gpbfi7abpjxb34n3kyny9ll557x