about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPjotr Prins2023-12-21 15:28:51 +0100
committerPjotr Prins2023-12-21 15:28:51 +0100
commite68a6a4b879da45b9919459e36e447603a55334e (patch)
tree41a17a536d66c66bf45014a648f348386d284eb9
parent93fc6fd6685e714989d2b5d8ec9bded696cb0970 (diff)
downloadgn-guile-e68a6a4b879da45b9919459e36e447603a55334e.tar.gz
Precompute
-rwxr-xr-x.guix-shell2
-rw-r--r--gn/data/dataset.scm2
-rw-r--r--gn/data/genotype.scm2
-rw-r--r--guix.scm71
-rwxr-xr-xscripts/precompute/precompute-hits.scm4
5 files changed, 78 insertions, 3 deletions
diff --git a/.guix-shell b/.guix-shell
index f3c4ebc..0eb387b 100755
--- a/.guix-shell
+++ b/.guix-shell
@@ -2,6 +2,6 @@
 #
 #  . .guix-shell -- guile -L . --fresh-auto-compile --listen=1970
 
-echo "Create a shell to run tools. In the container"
+echo "Create a shell to run tools."
 
 guix shell -C -D -F --network coreutils guile guile-dbi guile-dbd-mysql guile-fibers guile-json guile-gnutls guile-readline guile-redis openssl nss-certs gemma parallel $*
diff --git a/gn/data/dataset.scm b/gn/data/dataset.scm
index 5e81d1e..3d96663 100644
--- a/gn/data/dataset.scm
+++ b/gn/data/dataset.scm
@@ -1,5 +1,5 @@
 (define-module (gn data dataset)
-  #:use-module (json)
+  ;; #:use-module (json)
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
   #:use-module (ice-9 iconv)
diff --git a/gn/data/genotype.scm b/gn/data/genotype.scm
index c7cb63c..a12deee 100644
--- a/gn/data/genotype.scm
+++ b/gn/data/genotype.scm
@@ -1,5 +1,5 @@
 (define-module (gn data genotype)
-  #:use-module (json)
+  ;; #:use-module (json)
   #:use-module (ice-9 match)
   #:use-module (ice-9 format)
   #:use-module (ice-9 iconv)
diff --git a/guix.scm b/guix.scm
new file mode 100644
index 0000000..4417452
--- /dev/null
+++ b/guix.scm
@@ -0,0 +1,71 @@
+;; To use this file to build HEAD of gn-guile:
+;;
+;;   guix build -f guix.scm
+;;
+;; To get a development container
+;;
+;;   guix shell -C -D -f guix.scm
+;;
+
+(use-modules
+ ((guix licenses) #:prefix license:)
+ (guix gexp)
+ (guix packages)
+ (guix git-download)
+ (guix build-system guile)
+ (gnu packages algebra)
+ (gnu packages base)
+ (gnu packages bash)
+ (gnu packages compression)
+ (gnu packages bioinformatics)
+ (gnu packages build-tools)
+ (gnu packages certs)
+ (gnu packages curl)
+ (gnu packages gcc)
+ (gnu packages guile)
+ (gnu packages guile-xyz)
+ (gnu packages llvm)
+ (gnu packages ninja)
+ (gnu packages parallel)
+ (gnu packages perl)
+ (gnu packages perl6)
+ (gnu packages pkg-config)
+ (gnu packages python)
+ (gnu packages tls)
+ (srfi srfi-1)
+ (ice-9 popen)
+ (ice-9 rdelim))
+
+(define %source-dir (dirname (current-filename)))
+
+(define %git-commit
+    (read-string (open-pipe "git show HEAD | head -1 | cut -d ' ' -f 2" OPEN_READ)))
+
+(define-public gn-guile-git
+  (package
+    (name "gn-guile-git")
+    (version (git-version "4.0.0-" "HEAD" %git-commit))
+    (source (local-file %source-dir #:recursive? #t))
+    (build-system guile-build-system)
+
+     (inputs
+      (list guile-3.0-latest bash-minimal perl
+            guile-dbi guile-dbd-mysql guile-fibers guile-gnutls guile-readline guile-redis openssl nss-certs gemma parallel))
+     (propagated-inputs
+      (list guile-json-4))
+
+#!
+     (arguments
+      `(#:compile-flags '("--r6rs" "-Wunbound-variable" "-Warity-mismatch")
+        #:modules ((guix build guile-build-system)
+                   (guix build utils)
+                   (srfi srfi-26)
+                   (ice-9 ftw)
+                   (json))))
+!#
+     (home-page "https://git.genenetwork.com/gn-guile")
+     (synopsis "Next generation GN code in guile")
+     (description "Use of guile.")
+     (license license:gpl3)))
+
+gn-guile-git
diff --git a/scripts/precompute/precompute-hits.scm b/scripts/precompute/precompute-hits.scm
index 5f45967..8588061 100755
--- a/scripts/precompute/precompute-hits.scm
+++ b/scripts/precompute/precompute-hits.scm
@@ -6,6 +6,10 @@ and with some extra paths
 
 .guix-shell ruby --expose=/home/wrk/iwrk/opensource/code/genetics/gemma-wrapper/=/gemma-wrapper --expose=/home/wrk/iwrk/opensource/code/genetics/gemma/=/gemma -- guile -L . -s ./scripts/precompute/precompute-hits.scm
 
+You may want to forward a mysql port if there is no DB locally
+
+ssh -L 3306:127.0.0.1:3306 -f -N tux02.genenetwork.org
+
 !#
 
 (use-modules (dbi dbi)