From d5aa746d3f7ecf46fcab2c527fb2d033a77c5143 Mon Sep 17 00:00:00 2001 From: Shepherd on Tux02 Date: Fri, 21 Jun 2024 04:51:09 -0500 Subject: ratspub: remove definitions as they are replaced by genecup --- gn/packages/ratspub.scm | 152 ------------------------------------------------ 1 file changed, 152 deletions(-) (limited to 'gn/packages') diff --git a/gn/packages/ratspub.scm b/gn/packages/ratspub.scm index d797e8a..c530979 100644 --- a/gn/packages/ratspub.scm +++ b/gn/packages/ratspub.scm @@ -20,135 +20,6 @@ #:use-module (gn packages python) #:use-module (gn packages web)) -(define-public ratspub - (package - (name "ratspub") - (version "0.4.5") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/chen42/ratspub") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - ;; Keep the service running on port 4200. - (modules '((guix build utils))) - (snippet - '(begin (substitute* "server.py" - (("4201") "4200")))) - (sha256 - (base32 - "1y89rkqdxcnl2jjsy1wfp9p8qkgh6nzqs1r37wyhc8y7r3dva7kf")))) - (build-system python-build-system) - (arguments - `(#:tests? #f ; no test suite - #:phases - (modify-phases %standard-phases - (delete 'configure) - (delete 'build) - (add-after 'unpack 'make-files-writable - (lambda _ - (for-each make-file-writable (find-files ".")))) - (add-after 'unpack 'patch-datadir - (lambda _ - (substitute* "server.py" - (("^datadir.*") "datadir = \"/export/ratspub/\"\n")))) - (add-after 'unpack 'patch-sources - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (inetutils (assoc-ref inputs "inetutils"))) - (substitute* '("templates/cytoscape.html" - "templates/tableview.html" - "templates/tableview0.html" - "templates/userarchive.html") - (("https.*FileSaver.js.*\\\">") "/static/FileSaver.js\">") - (("https.*cytoscape-svg.js.*\\\">") "/static/cytoscape-svg.js\">") - (("https.*cytoscape.min.js.*\\\">") "/static/cytoscape.min.js\">")) - (substitute* "templates/layout.html" - (("https.*bootstrap.min.css.*\\\">") "/static/bootstrap.min.css\">") - (("https.*4.*bootstrap.min.js.*\\\">") "/static/bootstrap.min.js\">") - (("https.*4.7.0/css/font-awesome.min.css") "/static/font-awesome.min.css") - (("https.*jquery-3.2.1.slim.min.js.*\\\">") "/static/jquery.slim.min.js\">") - (("https.*1.12.9/umd/popper.min.js.*\\\">") "/static/popper.min.js\">")) - (substitute* "ratspub.py" - (("hostname") (string-append inetutils "/bin/hostname")))))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (copy-recursively "." out)))) - (add-after 'install 'install-javascript - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (awesome (assoc-ref inputs "font-awesome")) - (bootstrap (assoc-ref inputs "bootstrap")) - (cytoscape (assoc-ref inputs "cytoscape")) - (cytoscape-svg (assoc-ref inputs "cytoscape-svg")) - (jquery (assoc-ref inputs "jquery")) - (js-filesaver (assoc-ref inputs "js-filesaver")) - (js-popper (assoc-ref inputs "js-popper"))) - (symlink (string-append awesome - "/share/web/font-awesomecss/font-awesome.min.css") - (string-append out "/static/font-awesome.min.css")) - (symlink (string-append bootstrap - "/share/web/bootstrap/css/bootstrap.min.css") - (string-append out "/static/bootstrap.min.css")) - (symlink (string-append bootstrap - "/share/web/bootstrap/js/bootstrap.min.js") - (string-append out "/static/bootstrap.min.js")) - (symlink (string-append cytoscape - "/share/genenetwork2/javascript/cytoscape/cytoscape.min.js") - (string-append out "/static/cytoscape.min.js")) - (symlink (string-append cytoscape-svg - "/share/javascript/cytoscape-svg.js") - (string-append out "/static/cytoscape-svg.js")) - (symlink (string-append jquery - "/share/web/jquery/jquery.slim.min.js") - (string-append out "/static/jquery.slim.min.js")) - (symlink (string-append js-filesaver - "/share/javascript/FileSaver.js") - (string-append out "/static/FileSaver.js")) - (symlink (string-append js-popper - "/share/javascript/popper.min.js") - (string-append out "/static/popper.min.js"))))) - (add-after 'install 'wrap-executable - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (path (getenv "GUIX_PYTHONPATH"))) - (wrap-program (string-append out "/server.py") - `("PATH" ":" prefix (,(dirname (which "edirect.pl")) - ,(dirname (which "dirname")) - ,(dirname (which "grep")) - ,(dirname (which "sed")))) - `("GUIX_PYTHONPATH" ":" prefix (,path))))))))) - (inputs - `(("edirect" ,edirect) - ("inetutils" ,inetutils) - ("python-bcrypt" ,python-bcrypt) - ("python-flask-sqlalchemy" ,python-flask-sqlalchemy) - ("python-keras" ,python-keras-for-ratspub) - ("python-nltk" ,python-nltk) - ("tensorflow" ,tensorflow))) - (native-inputs - `(("bootstrap" ,web-bootstrap) - ("cytoscape" ,javascript-cytoscape-3.17) - ;("cytoscape-svg" ,js-cytoscape-svg-0.3.1) ; TODO - ("cytoscape-svg" ,js-cytoscape-svg-vendor-0.3.1) - ("font-awesome" ,web-font-awesome) - ("jquery" ,web-jquery) - ("js-filesaver" ,js-filesaver-1.3.2) - ("js-popper" ,js-popper-1.12.9))) - (home-page "https://rats.pub/") - (synopsis "Relationship with Addiction Through Searches of PubMed") - (description - "RatsPub is a tool to efficiently and comprehensively answer the question -\"What do we know about these genes and addiction?\". RatsPub answers this -question by searching PubMed to find sentences containing the query terms (i.e., -gene symbols) and over 300 drug addiction-related keywords that are organized -into six categories. Data from @url{https://www.ebi.ac.uk/gwas/, -@acronym{NHGRI-EBI GWAS, European Bioinformatics Institute Genome-Wide -Association Studies}} catalog are also included in the search. These -gene-keyword relationships are presented as an interactive graph and a table.") - (license license:expat))) - (define use-corrected-inputs (package-input-rewriting/spec ;; Tensorflow-native provides much improved speeds. python-h5py@2 provides @@ -156,29 +27,6 @@ gene-keyword relationships are presented as an interactive graph and a table.") `(("tensorflow" . ,(const tensorflow-native)) ("python-h5py" . ,(const python-h5py-2))))) -(define-public ratspub-with-tensorflow-native - (package - (inherit - (tensowflow-native-instead-of-tensorflow ratspub)) - (name "ratspub-with-tensorflow-native"))) - -;; We want a copy of python-keras with the AUC optimizer backported. -;; We skip the tests because we "test in production". -;; That's a lie. The test suite just takes a long time to run. -(define-public python-keras-for-ratspub - (hidden-package - (package - (inherit python-keras) - (source - (origin - (inherit (package-source python-keras)) - (patches (search-patches "keras-auc-optimizer.patch")))) - (arguments - (substitute-keyword-arguments (package-arguments python-keras) - ((#:phases phases) - `(modify-phases ,phases - (delete 'check)))))))) - (define-public python-keras-no-tests (hidden-package (package -- cgit v1.2.3