From 06d9f9655d124803c911b8bcade0b97e08168c12 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 15 Jan 2020 04:42:43 -0600 Subject: gn: Add python2-htmlgen-2.2. --- gn/packages/python.scm | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'gn/packages') diff --git a/gn/packages/python.scm b/gn/packages/python.scm index 2336cc9..c3e01fd 100644 --- a/gn/packages/python.scm +++ b/gn/packages/python.scm @@ -539,6 +539,53 @@ project)") (description #f) (license #f))) +(define-public python2-htmlgen-2.2 + (package + (name "python2-htmlgen-2.2") + (version "2.2.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://debian/pool/main/h/htmlgen/htmlgen_" version ".orig.tar.gz")) + (sha256 + (base32 + "186kb434q6z84g31ysvzi4kcfcvl3pmm57k4jlng4ccgls94x6wb")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'modernize-imports + (lambda _ + (substitute* "HTMLgen.py" + (("whrandom") "random")) + (substitute* "HTMLcalendar.py" + (("import regex") "import re as regex")) + (substitute* "HTMLutil.py" + (("import string, regex") "import re as regex\nimport string")) + (substitute* "HTMLtest.py" + (("import string, regex, regsub") "import re as regex\nimport string") + (("regsub.split") "re.split")) + #t)) + (replace 'build + (lambda _ + (invoke "python" "-m" "compileall" "."))) + (replace 'check + (lambda _ + (invoke "python" "HTMLtest.py"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/python2.7/site-packages/htmlgen/"))) + ;; Install libs and headers. + (for-each (lambda (file) + (install-file file lib)) + (find-files "." "\\.py[c]?$")) + #t)))))) + (home-page "https://packages.debian.org/unstable/python/python-htmlgen") + (synopsis "Genenetwork version of Python2 HTMLgen (defunkt project)") + (description #f) + (license #f))) + ; penguin2:~/tmp$ env IPFS_PATH=/export/ipfs/ ipfs add -r Imaging/ ; added QmV8Rew1re8gBTLsaqMU4bd7euFUPEpjiD572mtoz6KhPn Imaging/Imaging-1.1.6-gn.tar.gz ; added QmdkzQpVMLZVtywpYesynt9c7H8w7hHZRYKq8woN7stfpD Imaging -- cgit v1.2.3 From 586aeb8ece73707d858a1efb787f3876c821eef3 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jan 2020 01:49:04 -0600 Subject: gn: python2-htmlgen-gn: Fixup package Re-indented the whole package Updated the package to work with python-2.7. --- gn/packages/python.scm | 106 +++++++++++++++++++++++++------------------------ 1 file changed, 54 insertions(+), 52 deletions(-) (limited to 'gn/packages') diff --git a/gn/packages/python.scm b/gn/packages/python.scm index c3e01fd..9c097e3 100644 --- a/gn/packages/python.scm +++ b/gn/packages/python.scm @@ -486,58 +486,60 @@ Python 3 support.") ; pinned QmZLWsPHLFTU3hWAfdTwj3RXFrS8Ma7KEixne1suWuYqeG recursively (define-public python2-htmlgen-gn ; guix obsolete -(package - (name "python2-htmlgen-gn") - (version "2.2.2") - (source (origin - (method url-fetch) - ;; http://files.genenetwork.org/software/contrib/htmlgen-2.2.2-gn.tar.gz - (uri (string-append - "http://ipfs.genenetwork.org/ipfs/QmZLWsPHLFTU3hWAfdTwj3RXFrS8Ma7KEixne1suWuYqeG/htmlgen-" version "-gn.tar.gz")) - (sha256 - (base32 - "1lwsk56rymhrma46cbyh3g64ksmq1vsih3qkrc2vh0lpba825y7r")) - ;;(patches (list - ;; (search-patch "python2-htmlgen-Applied-Deb-patch.patch") - ;; (search-patch "python2-htmlgen-Fix-test-for-random.patch") - )) - (build-system python-build-system) - (outputs '("out")) - (native-inputs - `(("make" ,gnu-make) - )) - (propagated-inputs - `(("python2" ,python-2))) - (arguments - `(#:phases (modify-phases %standard-phases - (replace 'build - (lambda _ - (system* "python2" "-m" "compileall" "."))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (include (string-append out "/include")) - (lib2 (string-append out "/lib/htmlgen")) - (lib (string-append (assoc-ref %outputs "out") "/lib/python2.7/site-packages/htmlgen")) - (pkgconfig (string-append out "/lib/pkgconfig")) - (doc (string-append out "/share/doc"))) - ;; Install libs and headers. - ;; (copy-file "HTMLgen.pyc" "HTMLgen2.pyc") - (install-file "HTMLgen.pyc" lib) - (install-file "HTMLgen2.pyc" lib) - (install-file "imgsize.pyc" lib) - (install-file "ImageH.pyc" lib) - (install-file "ImagePaletteH.pyc" lib) - (install-file "__init__.pyc" lib) - ))) ; install - ) ; phases - #:tests? #f)) - (home-page - "https://packages.debian.org/unstable/python/python-htmlgen") - (synopsis "Genenetwork version of Python2 HTMLgen (defunkt -project)") - (description #f) - (license #f))) + (package + (name "python2-htmlgen-gn") + (version "2.2.2") + (source (origin + (method url-fetch) + ;; http://files.genenetwork.org/software/contrib/htmlgen-2.2.2-gn.tar.gz + (uri (string-append + "http://ipfs.genenetwork.org/ipfs/QmZLWsPHLFTU3hWAfdTwj3RXFrS8Ma7KEixne1suWuYqeG/htmlgen-" version "-gn.tar.gz")) + (sha256 + (base32 + "1lwsk56rymhrma46cbyh3g64ksmq1vsih3qkrc2vh0lpba825y7r")) + ;;(patches (list + ;; (search-patch "python2-htmlgen-Applied-Deb-patch.patch") + ;; (search-patch "python2-htmlgen-Fix-test-for-random.patch") + )) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'modernize-imports + (lambda _ + (substitute* "HTMLgen.py" + (("whrandom") "random")) + (substitute* "HTMLcalendar.py" + (("import regex") "import re as regex")) + (substitute* "HTMLutil.py" + (("import string, regex") "import re as regex\nimport string")) + (substitute* "HTMLtest.py" + (("import string, regex, regsub") "import re as regex\nimport string") + (("regsub.split") "re.split")) + #t)) + (replace 'build + (lambda _ + (invoke "python" "-m" "compileall" "."))) + (replace 'check + (lambda* (#:key (tests? '()) #:allow-other-keys) + (if tests? + (invoke "python" "HTMLtest.py") + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/python2.7/site-packages/htmlgen/"))) + ;; Install libs and headers. + (for-each (lambda (file) + (install-file file lib)) + (find-files "." "\\.py[c]?$")) + #t)))))) + (home-page "https://packages.debian.org/unstable/python/python-htmlgen") + (synopsis "Genenetwork version of Python2 HTMLgen (defunkt project)") + (description #f) + (license #f))) (define-public python2-htmlgen-2.2 (package -- cgit v1.2.3 From 15b6a4ac8c87592327ba953ea3912bf5a344d439 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 16 Jan 2020 02:07:47 -0600 Subject: gn: Add genenetwork1 --- gn/packages/genenetwork.scm | 86 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) (limited to 'gn/packages') diff --git a/gn/packages/genenetwork.scm b/gn/packages/genenetwork.scm index 489a88f..49f2935 100644 --- a/gn/packages/genenetwork.scm +++ b/gn/packages/genenetwork.scm @@ -7,6 +7,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system cargo) + #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module (gnu packages) @@ -18,6 +19,7 @@ #:use-module (gnu packages crates-io) #:use-module (gnu packages compression) #:use-module (gnu packages databases) + #:use-module (gnu packages ghostscript) #:use-module (gnu packages python) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-science) @@ -27,10 +29,12 @@ #:use-module (gnu packages version-control) #:use-module (gnu packages vim) #:use-module (gnu packages web) + #:use-module (gnu packages wget) #:use-module (gn packages bioinformatics) #:use-module (gn packages crates-io) #:use-module (gn packages elixir) #:use-module (gn packages gemma) + #:use-module (gn packages graphviz) #:use-module (gn packages javascript) #:use-module (gn packages phewas) #:use-module (gn packages python) @@ -647,3 +651,85 @@ written in C") (synopsis "Full genenetwork services") (description "Genenetwork installation sumo.") (license license:agpl3+)))) + +(define-public genenetwork + (let ((commit "19791ce6b3c38be8cbf9bc9cd3e95dbee14116c2") ; Aug 23, 2018 + (revision "1")) + (package + (name "genenetwork") + (version (git-version "0.0.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/genenetwork/genenetwork1.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1s735dj8kf98gf5w58p10zzyc5766gn27j4j5yh07ksadg7h1kdi")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (add-after 'patch-generated-file-shebangs 'patch-more-files + (lambda* (#:key inputs #:allow-other-keys) + (let ((piddle (assoc-ref inputs "python-piddle"))) + (substitute* "web/webqtl/networkGraph/networkGraphUtils.py" + (("/usr/local/bin/neato") (which "neato")) + (("/usr/local/bin/circo") (which "circo")) + (("/usr/local/bin/twopi") (which "twopi")) + (("/usr/local/bin/fdp") (which "fdp")) + (("ps2pdf") (which "ps2pdf"))) + (substitute* "web/webqtl/maintainance/addRif.py" + (("rm ") (string-append (which "rm") " ")) + (("wget ") (string-append (which "wget") " ")) + (("gunzip") (which "gunzip"))) + (substitute* "web/webqtl/misc/editHtmlPage.py" + (("/bin/cp") (which "cp"))) + (substitute* "web/webqtl/geneWiki/AddGeneRIFPage.py" + (("touch") (which "touch"))) + (substitute* '("web/webqtl/maintainance/addRif.py" + "web/webqtl/networkGraph/networkGraphPage.py" + "web/webqtl/utility/svg.py") + (("/usr/bin/python") (which "python")) + (("/usr/bin/env python") (which "python"))) + (substitute* "web/webqtl/base/webqtlConfigLocal.py" + (("PythonPath.*") + (string-append "PythonPath = '" (which "python") "'\n")) + (("PIDDLE_FONT_PATH.*/lib") + (string-append "PIDDLE_FONT_PATH = '" piddle "/lib")))) + #t)) + (add-before 'install 'replace-htaccess-file + (lambda _ + (delete-file "web/webqtl/.htaccess") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (copy-recursively "." (assoc-ref outputs "out")) + #t))))) + (inputs + `(("ghostscript" ,ghostscript) + ("graphviz" ,graphviz-2.26) + ("python24" ,python-2.4) + ("python-piddle" ,python24-piddle) + ("wget" ,wget))) + (home-page "http://www.genenetwork.org/webqtl/main.py") + (synopsis + "Combined database and data analysis software resource for systems genetics") + (description "GeneNetwork is a group of linked data sets and tools used to +study complex networks of genes, molecules, and higher order gene function and +phenotypes. GeneNetwork combines more than 25 years of legacy data generated by +hundreds of scientists together with sequence data (SNPs) and massive +transcriptome data sets (expression genetic or eQTL data sets). The +@dfn{quantitative trait locus} (QTL) mapping module that is built into GN is +optimized for fast on-line analysis of traits that are controlled by +combinations of gene +variants and environmental factors. GeneNetwork can be used to study humans, +mice (BXD, AXB, LXS, etc.), rats (HXB), Drosophila, and plant species (barley +and Arabidopsis). Most of these population data sets are linked with dense +genetic maps (genotypes) that can be used to locate the genetic modifiers that +cause differences in expression and phenotypes, including disease susceptibility.") + (license license:agpl3+)))) -- cgit v1.2.3