unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#35792] [PATCH 0/7] Package freebayes
@ 2019-05-18 17:25 Pierre Neidhardt
  2019-05-18 17:26 ` [bug#35792] [PATCH 1/7] gnu: Add tabixpp Pierre Neidhardt
  0 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2019-05-18 17:25 UTC (permalink / raw)
  To: 35792

Mostly ready for merge except for the FreeBayes test which don't pass because
we need grep with PCRE support.

Pierre Neidhardt (7):
  gnu: Add tabixpp.
  gnu: Add smithwaterman.
  gnu: Add multichoose.
  gnu: Add fsom.
  gnu: Add fastahack.
  gnu: Add vcflib.
  gnu: Add freebayes.

 gnu/packages/bioinformatics.scm | 400 ++++++++++++++++++++++++++++++++
 1 file changed, 400 insertions(+)

--
2.21.0

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 1/7] gnu: Add tabixpp.
  2019-05-18 17:25 [bug#35792] [PATCH 0/7] Package freebayes Pierre Neidhardt
@ 2019-05-18 17:26 ` Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 2/7] gnu: Add smithwaterman Pierre Neidhardt
                     ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Pierre Neidhardt @ 2019-05-18 17:26 UTC (permalink / raw)
  To: 35792

* gnu/packages/bioinformatics.scm (tabixpp): New variable.
---
 gnu/packages/bioinformatics.scm | 39 +++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 37f2001ea3..244741854d 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -14830,3 +14830,42 @@ ATAC-seq results.  It was written to make it easier to spot differences that
 might be caused by ATAC-seq library prep or sequencing.  The main program,
 @code{ataqv}, examines aligned reads and reports some basic metrics.")
     (license license:gpl3+)))
+
+(define-public tabixpp
+  (package
+   (name "tabixpp")
+   (version "1.0.0")
+   (source (origin
+     (method git-fetch)
+     (uri (git-reference
+           (url "https://github.com/ekg/tabixpp")
+           (commit (string-append "v" version))))
+     (file-name (git-file-name name version))
+     (sha256
+      (base32 "08vx6nsipk971cyr8z53rnzwkvlld63kcn1fw0pwddynz91xfny8"))))
+   (build-system gnu-build-system)
+   (inputs
+    `(("htslib" ,htslib)
+      ("zlib" ,zlib)))
+   (arguments
+    `(#:tests? #f ; There are no tests to run.
+      #:phases
+      (modify-phases %standard-phases
+        (delete 'configure) ; There is no configure phase.
+        ;; The build phase needs overriding the location of htslib.
+        (replace 'build
+          (lambda* (#:key inputs #:allow-other-keys)
+            (let ((htslib-ref (assoc-ref inputs "htslib")))
+              (invoke "make"
+                      (string-append "HTS_LIB=" htslib-ref "/lib/libhts.a")
+                      "HTS_HEADERS="    ; No need to check for headers here.
+                      (string-append "LIBPATH=-L. -L" htslib-ref "/include")))))
+        (replace 'install
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+              (install-file "tabix++" bin)))))))
+   (home-page "https://github.com/ekg/tabixpp")
+   (synopsis "C++ wrapper around tabix project")
+   (description "This is a C++ wrapper around the Tabix project which abstracts
+some of the details of opening and jumping in tabix-indexed files.")
+   (license license:expat)))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 2/7] gnu: Add smithwaterman.
  2019-05-18 17:26 ` [bug#35792] [PATCH 1/7] gnu: Add tabixpp Pierre Neidhardt
@ 2019-05-18 17:26   ` Pierre Neidhardt
  2019-08-08 14:30     ` Ricardo Wurmus
  2019-05-18 17:26   ` [bug#35792] [PATCH 3/7] gnu: Add multichoose Pierre Neidhardt
                     ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2019-05-18 17:26 UTC (permalink / raw)
  To: 35792

* gnu/packages/bioinformatics.scm (smithwaterman): New variable.
---
 gnu/packages/bioinformatics.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 244741854d..1bf33853b0 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -14869,3 +14869,33 @@ might be caused by ATAC-seq library prep or sequencing.  The main program,
    (description "This is a C++ wrapper around the Tabix project which abstracts
 some of the details of opening and jumping in tabix-indexed files.")
    (license license:expat)))
+
+(define-public smithwaterman
+  ;; TODO: Upgrading smithwaterman breaks FreeBayes.
+  (let ((commit "203218b47d45ac56ef234716f1bd4c741b289be1"))
+    (package
+      (name "smithwaterman")
+      (version (string-append "0-1." (string-take commit 7)))
+      (source (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ekg/smithwaterman/")
+              (commit commit)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0z9xsmsv452kgdfbbwydyc6nymg3fwyv8zswls8qjin3r4ia4415"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; There are no tests to run.
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure) ; There is no configure phase.
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+                 (install-file "smithwaterman" bin)))))))
+      (home-page "https://github.com/ekg/smithwaterman")
+      (synopsis "Implementation of the Smith-Waterman algorithm")
+      (description "Implementation of the Smith-Waterman algorithm.")
+      ;; The licensing terms are unclear: https://github.com/ekg/smithwaterman/issues/9.
+      (license (list license:gpl2 license:expat)))))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 3/7] gnu: Add multichoose.
  2019-05-18 17:26 ` [bug#35792] [PATCH 1/7] gnu: Add tabixpp Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 2/7] gnu: Add smithwaterman Pierre Neidhardt
@ 2019-05-18 17:26   ` Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 4/7] gnu: Add fsom Pierre Neidhardt
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Pierre Neidhardt @ 2019-05-18 17:26 UTC (permalink / raw)
  To: 35792

* gnu/packages/bioinformatics.scm (multichoose): New variable.
---
 gnu/packages/bioinformatics.scm | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1bf33853b0..3ff0f69f5e 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -14899,3 +14899,39 @@ some of the details of opening and jumping in tabix-indexed files.")
       (description "Implementation of the Smith-Waterman algorithm.")
       ;; The licensing terms are unclear: https://github.com/ekg/smithwaterman/issues/9.
       (license (list license:gpl2 license:expat)))))
+
+(define-public multichoose
+  (package
+    (name "multichoose")
+    (version "1.0.3")
+    (source (origin
+      (method git-fetch)
+      (uri (git-reference
+            (url "https://github.com/ekg/multichoose/")
+            (commit (string-append "v" version))))
+      (file-name (git-file-name name version))
+      (sha256
+       (base32 "0ci5fqvmpamwgxvmyd79ygj6n3bnbl3vc7b6h1sxz58186sm3pfs"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("python" ,python-2)
+       ("node" ,node)))
+    (arguments
+     `(#:tests? #f ; There are no tests to run.
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure) ; There is no configure phase.
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+               ;; TODO: There are Python modules for these programs too.
+               (install-file "multichoose" bin)
+               (install-file "multipermute" bin)))))))
+    (home-page "https://github.com/ekg/multichoose")
+    (synopsis "Efficient loopless multiset combination generation algorithm")
+    (description "This library implements an efficient loopless multiset
+combination generation algorithm which is (approximately) described in
+\"Loopless algorithms for generating permutations, combinations, and other
+combinatorial configurations.\", G. Ehrlich - Journal of the ACM (JACM),
+1973. (Algorithm 7.)")
+    (license license:expat)))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 4/7] gnu: Add fsom.
  2019-05-18 17:26 ` [bug#35792] [PATCH 1/7] gnu: Add tabixpp Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 2/7] gnu: Add smithwaterman Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 3/7] gnu: Add multichoose Pierre Neidhardt
@ 2019-05-18 17:26   ` Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 5/7] gnu: Add fastahack Pierre Neidhardt
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Pierre Neidhardt @ 2019-05-18 17:26 UTC (permalink / raw)
  To: 35792

* gnu/packages/bioinformatics.scm (fsom): New variable.
---
 gnu/packages/bioinformatics.scm | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 3ff0f69f5e..e018b51968 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -14935,3 +14935,32 @@ combination generation algorithm which is (approximately) described in
 combinatorial configurations.\", G. Ehrlich - Journal of the ACM (JACM),
 1973. (Algorithm 7.)")
     (license license:expat)))
+
+(define-public fsom
+  (let ((commit "a6ef318fbd347c53189384aef7f670c0e6ce89a3"))
+    (package
+      (name "fsom")
+      (version (git-version "0.0.0" "1" commit))
+      (source (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ekg/fsom/")
+              (commit commit)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0gw1lpvr812pywg9y546x0h1hhj261xwls41r6kqhddjlrcjc0pi"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; There are no tests to run.
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure) ; There is no configure phase.
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+                 (install-file "fsom" bin)))))))
+      (home-page "https://github.com/ekg/fsom")
+      (synopsis "Manage SOM (Self-Organizing Maps) neural networks")
+      (description "A tiny C library for managing SOM (Self-Organizing Maps)
+neural networks.")
+      (license license:gpl3))))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 5/7] gnu: Add fastahack.
  2019-05-18 17:26 ` [bug#35792] [PATCH 1/7] gnu: Add tabixpp Pierre Neidhardt
                     ` (2 preceding siblings ...)
  2019-05-18 17:26   ` [bug#35792] [PATCH 4/7] gnu: Add fsom Pierre Neidhardt
@ 2019-05-18 17:26   ` Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 6/7] gnu: Add vcflib Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 7/7] gnu: Add freebayes Pierre Neidhardt
  5 siblings, 0 replies; 13+ messages in thread
From: Pierre Neidhardt @ 2019-05-18 17:26 UTC (permalink / raw)
  To: 35792

* gnu/packages/bioinformatics.scm (fastahack): New variable.
---
 gnu/packages/bioinformatics.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e018b51968..3ad0a2a421 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -14964,3 +14964,35 @@ combinatorial configurations.\", G. Ehrlich - Journal of the ACM (JACM),
       (description "A tiny C library for managing SOM (Self-Organizing Maps)
 neural networks.")
       (license license:gpl3))))
+
+(define-public fastahack
+  (let ((commit "c68cebb4f2e5d5d2b70cf08fbdf1944e9ab2c2dd"))
+    (package
+      (name "fastahack")
+      (version (git-version "0.0.0" "1" commit))
+      (source (origin
+        (method git-fetch)
+        (uri (git-reference
+              (url "https://github.com/ekg/fastahack/")
+              (commit commit)))
+        (file-name (git-file-name name version))
+        (sha256
+         (base32 "0hfdv67l9g611i2ck4l92pd6ygmsp9g1ph4zx1ni7qkpsikf0l19"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ; There are no tests to run.
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure) ; There is no configure phase.
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+                 (install-file "fastahack" bin)))))))
+      (home-page "https://github.com/ekg/fastahack")
+      (synopsis "Indexing and sequence extraction from FASTA files")
+      (description "Fastahack is a small application for indexing and
+extracting sequences and subsequences from FASTA files.  The included library
+provides a FASTA reader and indexer that can be embedded into applications
+which would benefit from directly reading subsequences from FASTA files.  The
+library automatically handles index file generation and use.")
+      (license (list license:expat license:gpl2)))))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 6/7] gnu: Add vcflib.
  2019-05-18 17:26 ` [bug#35792] [PATCH 1/7] gnu: Add tabixpp Pierre Neidhardt
                     ` (3 preceding siblings ...)
  2019-05-18 17:26   ` [bug#35792] [PATCH 5/7] gnu: Add fastahack Pierre Neidhardt
@ 2019-05-18 17:26   ` Pierre Neidhardt
  2019-05-18 17:26   ` [bug#35792] [PATCH 7/7] gnu: Add freebayes Pierre Neidhardt
  5 siblings, 0 replies; 13+ messages in thread
From: Pierre Neidhardt @ 2019-05-18 17:26 UTC (permalink / raw)
  To: 35792

* gnu/packages/bioinformatics.scm (vcflib): New variable.
---
 gnu/packages/bioinformatics.scm | 107 ++++++++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 3ad0a2a421..665c807de9 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -14870,6 +14870,24 @@ might be caused by ATAC-seq library prep or sequencing.  The main program,
 some of the details of opening and jumping in tabix-indexed files.")
    (license license:expat)))
 
+(define tabixpp-freebayes
+  ;; This version works with FreeBayes while the released
+  ;; version doesn't. The released creates a variable with the name \"vcf\"
+  ;; somewhere, which is also the name of a namespace in vcflib.
+  (let ((commit "bbc63a49acc52212199f92e9e3b8fba0a593e3f7"))
+    (package
+      (inherit tabixpp)
+      (name "tabixpp-freebayes")
+      (version (git-version "0.0.0" "1" commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/ekg/tabixpp/")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32 "017qsmsc2kyiyzqr9nl8cc6pfldxf16dbn8flx5i59mbqr9ydi7g")))))))
+
 (define-public smithwaterman
   ;; TODO: Upgrading smithwaterman breaks FreeBayes.
   (let ((commit "203218b47d45ac56ef234716f1bd4c741b289be1"))
@@ -14996,3 +15014,92 @@ provides a FASTA reader and indexer that can be embedded into applications
 which would benefit from directly reading subsequences from FASTA files.  The
 library automatically handles index file generation and use.")
       (license (list license:expat license:gpl2)))))
+
+(define-public vcflib
+  (let ((commit "5ac091365fdc716cc47cc5410bb97ee5dc2a2c92" ))
+    (package
+      (name "vcflib")
+      (version (git-version "1.0.2" "1" commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/vcflib/vcflib/")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1gijvcz1lcdn5kvgzb671l6iby0379qk00nqmcrszgk67hfwx6kq"))))
+      (build-system gnu-build-system)
+      (native-inputs
+       `(("zlib" ,zlib)
+         ;; Submodules.
+         ;; This package builds against the .o files so we need to extract the source.
+         ("tabixpp-src" ,(package-source tabixpp-freebayes))
+         ("smithwaterman-src" ,(package-source smithwaterman))
+         ("multichoose-src" ,(package-source multichoose))
+         ("fsom-src" ,(package-source fsom))
+         ("filevercmp-src" ,(package-source filevercmp))
+         ("fastahack-src" ,(package-source fastahack))
+         ("intervaltree-src"
+          ,(origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/ekg/intervaltree/")
+                   (commit "dbb4c513d1ad3baac516fc1484c995daf9b42838")))
+             (file-name "intervaltree-src.tar.gz")
+             (sha256
+              (base32 "1fy5qbj4bg8d2bjysvaa9wfnqn2rj2sk5yra2h4l5pzvy53f23fj"))))))
+      (arguments
+       `(#:tests? #f
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (delete 'check)
+           (add-after 'unpack 'unpack-submodule-sources
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((unpack (lambda (source target)
+                               (with-directory-excursion target
+                                 (if (file-is-directory? (assoc-ref inputs source))
+                                     (copy-recursively (assoc-ref inputs source) ".")
+                                     (invoke "tar" "xvf"
+                                             (assoc-ref inputs source)
+                                             "--strip-components=1"))))))
+                 (and
+                  (unpack "intervaltree-src" "intervaltree")
+                  (unpack "fastahack-src" "fastahack")
+                  (unpack "filevercmp-src" "filevercmp")
+                  (unpack "fsom-src" "fsom")
+                  (unpack "multichoose-src" "multichoose")
+                  (unpack "smithwaterman-src" "smithwaterman")
+                  (unpack "tabixpp-src" "tabixpp")))))
+           (add-after 'unpack-submodule-sources 'fix-makefile
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* '("Makefile")
+                 (("^GIT_VERSION.*") "GIT_VERSION = v1.0.0"))))
+           (replace 'build
+             (lambda* (#:key inputs make-flags #:allow-other-keys)
+               (with-directory-excursion "tabixpp"
+                 (invoke "make"))
+               (invoke "make" "CC=gcc"
+                       (string-append "CFLAGS=\"" "-Itabixpp "
+                                      ;; "-I" (assoc-ref inputs "htslib") "/include "
+                                      "\"")
+                       "all")))
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
+                     (lib (string-append (assoc-ref outputs "out") "/lib")))
+                 (for-each (lambda (file)
+                             (install-file file bin))
+                           (find-files "bin" ".*"))
+                 ;; The header files in src/ do not interface libvcflib,
+                 ;; therefore they are left out.
+                 (install-file "libvcflib.a" lib)))))))
+      (home-page "https://github.com/vcflib/vcflib/")
+      (synopsis "Library for parsing and manipulating VCF files")
+      (description "Vcflib provides methods to manipulate and interpret
+sequence variation as it can be described by VCF.  It is both an API for parsing
+and operating on records of genomic variation as it can be described by the VCF
+format, and a collection of command-line utilities for executing complex
+manipulations on VCF files.")
+      (license license:expat))))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 7/7] gnu: Add freebayes.
  2019-05-18 17:26 ` [bug#35792] [PATCH 1/7] gnu: Add tabixpp Pierre Neidhardt
                     ` (4 preceding siblings ...)
  2019-05-18 17:26   ` [bug#35792] [PATCH 6/7] gnu: Add vcflib Pierre Neidhardt
@ 2019-05-18 17:26   ` Pierre Neidhardt
  2019-08-01 14:38     ` Pjotr Prins
  5 siblings, 1 reply; 13+ messages in thread
From: Pierre Neidhardt @ 2019-05-18 17:26 UTC (permalink / raw)
  To: 35792

* gnu/packages/bioinformatics.scm (freebayes): New variable.
---
 gnu/packages/bioinformatics.scm | 127 ++++++++++++++++++++++++++++++++
 1 file changed, 127 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 665c807de9..704db184eb 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -15103,3 +15103,130 @@ and operating on records of genomic variation as it can be described by the VCF
 format, and a collection of command-line utilities for executing complex
 manipulations on VCF files.")
       (license license:expat))))
+
+(define-public freebayes
+  (let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb")
+        (revision "1")
+        (version "1.0.2"))
+    (package
+      (name "freebayes")
+      (version (git-version version revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/ekg/freebayes.git")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32 "1sbzwmcbn78ybymjnhwk7qc5r912azy5vqz2y7y81616yc3ba2a2"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("zlib" ,zlib)
+         ("htslib" ,htslib)))
+      (native-inputs
+       `(("bc" ,bc)                     ; Needed for running tests.
+         ("samtools" ,samtools)         ; Needed for running tests.
+         ("parallel" ,parallel)         ; Needed for running tests.
+         ("procps" ,procps)             ; Needed for running tests.
+         ("bamtools" ,bamtools)
+         ("bamtools" ,bamtools)
+         ("vcflib-src" ,(package-source vcflib))
+         ;; These are submodules for the vcflib version used in freebayes.
+         ;; This package builds against the .o files so we need to extract the source.
+         ("tabixpp-src" ,(package-source tabixpp-freebayes))
+         ("smithwaterman-src" ,(package-source smithwaterman))
+         ("multichoose-src" ,(package-source multichoose))
+         ("fsom-src" ,(package-source fsom))
+         ("filevercmp-src" ,(package-source filevercmp))
+         ("fastahack-src" ,(package-source fastahack))
+         ("intervaltree-src"
+          ,(origin
+             (method url-fetch)
+             (uri (string-append
+                   "https://github.com/ekg/intervaltree/archive/"
+                   "dbb4c513d1ad3baac516fc1484c995daf9b42838" ".tar.gz"))
+             (file-name "intervaltree-src.tar.gz")
+             (sha256
+              (base32 "19prwpn2wxsrijp5svfqvfcxl5nj7zdhm3jycd5kqhl9nifpmcks"))))
+         ;; These submodules are needed to run the tests.
+         ("bash-tap-src" ,(package-source bash-tap))
+         ("test-simple-bash-src"
+          ,(origin
+             (method git-fetch)
+             (uri (git-reference
+                   (url "https://github.com/ingydotnet/test-simple-bash/")
+                   (commit "124673ff204b01c8e96b7fc9f9b32ee35d898acc")))
+             (file-name "test-simple-bash-src.tar.gz")
+             (sha256
+              (base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga"))))))
+      (arguments
+       `(#:tests? #f    ; TODO: Re-enable when we have grep with perl support.
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-after 'unpack 'unpack-submodule-sources
+             (lambda* (#:key inputs #:allow-other-keys)
+               (let ((unpack (lambda (source target)
+                               (with-directory-excursion target
+                                 (if (file-is-directory? (assoc-ref inputs source))
+                                     (copy-recursively (assoc-ref inputs source) ".")
+                                     (invoke "tar" "xvf"
+                                             (assoc-ref inputs source)
+                                             "--strip-components=1"))))))
+                 (and
+                  (unpack "vcflib-src" "vcflib")
+                  (unpack "fastahack-src" "vcflib/fastahack")
+                  (unpack "filevercmp-src" "vcflib/filevercmp")
+                  (unpack "fsom-src" "vcflib/fsom")
+                  (unpack "intervaltree-src" "vcflib/intervaltree")
+                  (unpack "multichoose-src" "vcflib/multichoose")
+                  (unpack "smithwaterman-src" "vcflib/smithwaterman")
+                  (unpack "tabixpp-src" "vcflib/tabixpp")
+                  (unpack "test-simple-bash-src" "test/test-simple-bash")
+                  (unpack "bash-tap-src" "test/bash-tap")))))
+           (add-after 'unpack-submodule-sources 'fix-makefile
+             (lambda* (#:key inputs #:allow-other-keys)
+               ;; We don't have the .git folder to get the version tag from.
+               (substitute* '("vcflib/Makefile")
+                 (("^GIT_VERSION.*") (string-append "GIT_VERSION = v" ,version)))))
+           (replace 'build
+             (lambda* (#:key inputs make-flags #:allow-other-keys)
+               (with-directory-excursion "vcflib"
+                 (with-directory-excursion "tabixpp"
+                   (pk "Compile tabixpp before compiling the main project.")
+                   (let ((htslib-ref (assoc-ref inputs "htslib")))
+                     (invoke "make" "HTS_HEADERS="
+                             (string-append "HTS_LIB=" htslib-ref "/lib/libhts.a")
+                             (string-append "LIBPATH=-L. -L" htslib-ref "/include"))))
+                 (pk "Compile vcflib before compiling the main project.")
+                 (invoke "make" "CC=gcc"
+                         (string-append "CFLAGS=\"" "-Itabixpp "
+                                        "-I" (assoc-ref inputs "htslib") "/include " "\"")
+                         "all"))
+               (pk "Compile the main project.")
+               (with-directory-excursion "src"
+                 (substitute* "Makefile"
+                   (("-I\\$\\(BAMTOOLS_ROOT\\)/src") "-I$(BAMTOOLS_ROOT)/include/bamtools"))
+                 (invoke "make"
+                         (string-append "BAMTOOLS_ROOT="
+                                        (assoc-ref inputs "bamtools"))))))
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+                 (install-file "bin/freebayes" bin)
+                 (install-file "bin/bamleftalign" bin))))
+           ;; TODO: There are three tests that fail.  All because of the -P
+           ;; (--perl-regexp) option in grep, which is not compiled into the
+           ;; version of grep in Guix.
+           (replace 'check
+             (lambda* (#:key tests? #:allow-other-keys)
+               (when tests?
+                 (invoke "make" "test")))))))
+      (home-page "https://github.com/ekg/freebayes")
+      (synopsis "Haplotype-based variant detector")
+      (description "FreeBayes is a Bayesian genetic variant detector designed to
+find small polymorphisms, specifically SNPs (single-nucleotide polymorphisms),
+indels (insertions and deletions), MNPs (multi-nucleotide polymorphisms), and
+complex events (composite insertion and substitution events) smaller than the
+length of a short-read sequencing alignment.")
+      (license license:expat))))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 7/7] gnu: Add freebayes.
  2019-05-18 17:26   ` [bug#35792] [PATCH 7/7] gnu: Add freebayes Pierre Neidhardt
@ 2019-08-01 14:38     ` Pjotr Prins
  2019-08-08 12:20       ` bug#35792: " Efraim Flashner
  0 siblings, 1 reply; 13+ messages in thread
From: Pjotr Prins @ 2019-08-01 14:38 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: 35792

Can someone push this?

On Sat, May 18, 2019 at 07:26:40PM +0200, Pierre Neidhardt wrote:
> * gnu/packages/bioinformatics.scm (freebayes): New variable.
> ---
>  gnu/packages/bioinformatics.scm | 127 ++++++++++++++++++++++++++++++++
>  1 file changed, 127 insertions(+)
> 
> diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
> index 665c807de9..704db184eb 100644
> --- a/gnu/packages/bioinformatics.scm
> +++ b/gnu/packages/bioinformatics.scm
> @@ -15103,3 +15103,130 @@ and operating on records of genomic variation as it can be described by the VCF
>  format, and a collection of command-line utilities for executing complex
>  manipulations on VCF files.")
>        (license license:expat))))
> +
> +(define-public freebayes
> +  (let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb")
> +        (revision "1")
> +        (version "1.0.2"))
> +    (package
> +      (name "freebayes")
> +      (version (git-version version revision commit))
> +      (source (origin
> +                (method git-fetch)
> +                (uri (git-reference
> +                      (url "https://github.com/ekg/freebayes.git")
> +                      (commit commit)))
> +                (file-name (git-file-name name version))
> +                (sha256
> +                 (base32 "1sbzwmcbn78ybymjnhwk7qc5r912azy5vqz2y7y81616yc3ba2a2"))))
> +      (build-system gnu-build-system)
> +      (inputs
> +       `(("zlib" ,zlib)
> +         ("htslib" ,htslib)))
> +      (native-inputs
> +       `(("bc" ,bc)                     ; Needed for running tests.
> +         ("samtools" ,samtools)         ; Needed for running tests.
> +         ("parallel" ,parallel)         ; Needed for running tests.
> +         ("procps" ,procps)             ; Needed for running tests.
> +         ("bamtools" ,bamtools)
> +         ("bamtools" ,bamtools)
> +         ("vcflib-src" ,(package-source vcflib))
> +         ;; These are submodules for the vcflib version used in freebayes.
> +         ;; This package builds against the .o files so we need to extract the source.
> +         ("tabixpp-src" ,(package-source tabixpp-freebayes))
> +         ("smithwaterman-src" ,(package-source smithwaterman))
> +         ("multichoose-src" ,(package-source multichoose))
> +         ("fsom-src" ,(package-source fsom))
> +         ("filevercmp-src" ,(package-source filevercmp))
> +         ("fastahack-src" ,(package-source fastahack))
> +         ("intervaltree-src"
> +          ,(origin
> +             (method url-fetch)
> +             (uri (string-append
> +                   "https://github.com/ekg/intervaltree/archive/"
> +                   "dbb4c513d1ad3baac516fc1484c995daf9b42838" ".tar.gz"))
> +             (file-name "intervaltree-src.tar.gz")
> +             (sha256
> +              (base32 "19prwpn2wxsrijp5svfqvfcxl5nj7zdhm3jycd5kqhl9nifpmcks"))))
> +         ;; These submodules are needed to run the tests.
> +         ("bash-tap-src" ,(package-source bash-tap))
> +         ("test-simple-bash-src"
> +          ,(origin
> +             (method git-fetch)
> +             (uri (git-reference
> +                   (url "https://github.com/ingydotnet/test-simple-bash/")
> +                   (commit "124673ff204b01c8e96b7fc9f9b32ee35d898acc")))
> +             (file-name "test-simple-bash-src.tar.gz")
> +             (sha256
> +              (base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga"))))))
> +      (arguments
> +       `(#:tests? #f    ; TODO: Re-enable when we have grep with perl support.
> +         #:phases
> +         (modify-phases %standard-phases
> +           (delete 'configure)
> +           (add-after 'unpack 'unpack-submodule-sources
> +             (lambda* (#:key inputs #:allow-other-keys)
> +               (let ((unpack (lambda (source target)
> +                               (with-directory-excursion target
> +                                 (if (file-is-directory? (assoc-ref inputs source))
> +                                     (copy-recursively (assoc-ref inputs source) ".")
> +                                     (invoke "tar" "xvf"
> +                                             (assoc-ref inputs source)
> +                                             "--strip-components=1"))))))
> +                 (and
> +                  (unpack "vcflib-src" "vcflib")
> +                  (unpack "fastahack-src" "vcflib/fastahack")
> +                  (unpack "filevercmp-src" "vcflib/filevercmp")
> +                  (unpack "fsom-src" "vcflib/fsom")
> +                  (unpack "intervaltree-src" "vcflib/intervaltree")
> +                  (unpack "multichoose-src" "vcflib/multichoose")
> +                  (unpack "smithwaterman-src" "vcflib/smithwaterman")
> +                  (unpack "tabixpp-src" "vcflib/tabixpp")
> +                  (unpack "test-simple-bash-src" "test/test-simple-bash")
> +                  (unpack "bash-tap-src" "test/bash-tap")))))
> +           (add-after 'unpack-submodule-sources 'fix-makefile
> +             (lambda* (#:key inputs #:allow-other-keys)
> +               ;; We don't have the .git folder to get the version tag from.
> +               (substitute* '("vcflib/Makefile")
> +                 (("^GIT_VERSION.*") (string-append "GIT_VERSION = v" ,version)))))
> +           (replace 'build
> +             (lambda* (#:key inputs make-flags #:allow-other-keys)
> +               (with-directory-excursion "vcflib"
> +                 (with-directory-excursion "tabixpp"
> +                   (pk "Compile tabixpp before compiling the main project.")
> +                   (let ((htslib-ref (assoc-ref inputs "htslib")))
> +                     (invoke "make" "HTS_HEADERS="
> +                             (string-append "HTS_LIB=" htslib-ref "/lib/libhts.a")
> +                             (string-append "LIBPATH=-L. -L" htslib-ref "/include"))))
> +                 (pk "Compile vcflib before compiling the main project.")
> +                 (invoke "make" "CC=gcc"
> +                         (string-append "CFLAGS=\"" "-Itabixpp "
> +                                        "-I" (assoc-ref inputs "htslib") "/include " "\"")
> +                         "all"))
> +               (pk "Compile the main project.")
> +               (with-directory-excursion "src"
> +                 (substitute* "Makefile"
> +                   (("-I\\$\\(BAMTOOLS_ROOT\\)/src") "-I$(BAMTOOLS_ROOT)/include/bamtools"))
> +                 (invoke "make"
> +                         (string-append "BAMTOOLS_ROOT="
> +                                        (assoc-ref inputs "bamtools"))))))
> +           (replace 'install
> +             (lambda* (#:key outputs #:allow-other-keys)
> +               (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
> +                 (install-file "bin/freebayes" bin)
> +                 (install-file "bin/bamleftalign" bin))))
> +           ;; TODO: There are three tests that fail.  All because of the -P
> +           ;; (--perl-regexp) option in grep, which is not compiled into the
> +           ;; version of grep in Guix.
> +           (replace 'check
> +             (lambda* (#:key tests? #:allow-other-keys)
> +               (when tests?
> +                 (invoke "make" "test")))))))
> +      (home-page "https://github.com/ekg/freebayes")
> +      (synopsis "Haplotype-based variant detector")
> +      (description "FreeBayes is a Bayesian genetic variant detector designed to
> +find small polymorphisms, specifically SNPs (single-nucleotide polymorphisms),
> +indels (insertions and deletions), MNPs (multi-nucleotide polymorphisms), and
> +complex events (composite insertion and substitution events) smaller than the
> +length of a short-read sequencing alignment.")
> +      (license license:expat))))
> -- 
> 2.21.0
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#35792: [PATCH 7/7] gnu: Add freebayes.
  2019-08-01 14:38     ` Pjotr Prins
@ 2019-08-08 12:20       ` Efraim Flashner
  0 siblings, 0 replies; 13+ messages in thread
From: Efraim Flashner @ 2019-08-08 12:20 UTC (permalink / raw)
  To: Pjotr Prins; +Cc: Pierre Neidhardt, 35792-done

[-- Attachment #1: Type: text/plain, Size: 324 bytes --]

I pushed this patch series with a few changes.

I see also that freebayes 1.3.1 came out in the meantime.


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 2/7] gnu: Add smithwaterman.
  2019-05-18 17:26   ` [bug#35792] [PATCH 2/7] gnu: Add smithwaterman Pierre Neidhardt
@ 2019-08-08 14:30     ` Ricardo Wurmus
  2019-08-08 16:29       ` Efraim Flashner
  0 siblings, 1 reply; 13+ messages in thread
From: Ricardo Wurmus @ 2019-08-08 14:30 UTC (permalink / raw)
  To: Pierre Neidhardt, Efraim Flashner; +Cc: 35792


Pierre Neidhardt <mail@ambrevar.xyz> writes:

> * gnu/packages/bioinformatics.scm (smithwaterman): New variable.
[…]
> +      ;; The licensing terms are unclear: https://github.com/ekg/smithwaterman/issues/9.
> +      (license (list license:gpl2 license:expat)))))

If the licensing terms are unclear we should not include this package.

--
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 2/7] gnu: Add smithwaterman.
  2019-08-08 14:30     ` Ricardo Wurmus
@ 2019-08-08 16:29       ` Efraim Flashner
  2019-08-08 16:31         ` Ricardo Wurmus
  0 siblings, 1 reply; 13+ messages in thread
From: Efraim Flashner @ 2019-08-08 16:29 UTC (permalink / raw)
  To: Ricardo Wurmus, Pierre Neidhardt; +Cc: 35792

https://github.com/ekg/smithwaterman/issues/9#issuecomment-493694384

Between the two licenses it's GPL2. The expat license text just hasn't been removed.

On August 8, 2019 2:30:24 PM UTC, Ricardo Wurmus <rekado@elephly.net> wrote:
>
>Pierre Neidhardt <mail@ambrevar.xyz> writes:
>
>> * gnu/packages/bioinformatics.scm (smithwaterman): New variable.
>[…]
>> +      ;; The licensing terms are unclear:
>https://github.com/ekg/smithwaterman/issues/9.
>> +      (license (list license:gpl2 license:expat)))))
>
>If the licensing terms are unclear we should not include this package.
>
>--
>Ricardo

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#35792] [PATCH 2/7] gnu: Add smithwaterman.
  2019-08-08 16:29       ` Efraim Flashner
@ 2019-08-08 16:31         ` Ricardo Wurmus
  0 siblings, 0 replies; 13+ messages in thread
From: Ricardo Wurmus @ 2019-08-08 16:31 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: Pierre Neidhardt, 35792


Efraim Flashner <efraim@flashner.co.il> writes:

> https://github.com/ekg/smithwaterman/issues/9#issuecomment-493694384
>
> Between the two licenses it's GPL2. The expat license text just hasn't been removed.

Okay, that makes sense.

-- 
Ricardo

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2019-08-08 16:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-18 17:25 [bug#35792] [PATCH 0/7] Package freebayes Pierre Neidhardt
2019-05-18 17:26 ` [bug#35792] [PATCH 1/7] gnu: Add tabixpp Pierre Neidhardt
2019-05-18 17:26   ` [bug#35792] [PATCH 2/7] gnu: Add smithwaterman Pierre Neidhardt
2019-08-08 14:30     ` Ricardo Wurmus
2019-08-08 16:29       ` Efraim Flashner
2019-08-08 16:31         ` Ricardo Wurmus
2019-05-18 17:26   ` [bug#35792] [PATCH 3/7] gnu: Add multichoose Pierre Neidhardt
2019-05-18 17:26   ` [bug#35792] [PATCH 4/7] gnu: Add fsom Pierre Neidhardt
2019-05-18 17:26   ` [bug#35792] [PATCH 5/7] gnu: Add fastahack Pierre Neidhardt
2019-05-18 17:26   ` [bug#35792] [PATCH 6/7] gnu: Add vcflib Pierre Neidhardt
2019-05-18 17:26   ` [bug#35792] [PATCH 7/7] gnu: Add freebayes Pierre Neidhardt
2019-08-01 14:38     ` Pjotr Prins
2019-08-08 12:20       ` bug#35792: " Efraim Flashner

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).