Patchwork gnu: Add bits.

login
register
mail settings
Submitter Ricardo Wurmus
Date June 29, 2016, 2:36 p.m.
Message ID <20160629143617.28293-1-ricardo.wurmus@mdc-berlin.de>
Download mbox | patch
Permalink /patch/13483/
State New
Headers show

Comments

Ricardo Wurmus - June 29, 2016, 2:36 p.m.
* gnu/packages/bioinformatics.scm (bits): New variable.
---
 gnu/packages/bioinformatics.scm | 46 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
Leo Famulari - June 29, 2016, 4:13 p.m.
On Wed, Jun 29, 2016 at 04:36:17PM +0200, Ricardo Wurmus wrote:
> * gnu/packages/bioinformatics.scm (bits): New variable.

> +      (arguments
> +       `(#:tests? #f ;no tests included

How about the tests described in the README?

https://github.com/arq5x/bits

"Now, you can test both the sequential and CUDA versions of the tools by
running the bits_tests scripts. Also, this shell script demonstrates how
to run each of the BITS tools"
Ricardo Wurmus - June 29, 2016, 7:15 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Wed, Jun 29, 2016 at 04:36:17PM +0200, Ricardo Wurmus wrote:
>> * gnu/packages/bioinformatics.scm (bits): New variable.
>
>> +      (arguments
>> +       `(#:tests? #f ;no tests included
>
> How about the tests described in the README?
>
> https://github.com/arq5x/bits
>
> "Now, you can test both the sequential and CUDA versions of the tools by
> running the bits_tests scripts. Also, this shell script demonstrates how
> to run each of the BITS tools"

Good idea, I’ll do that.

~~ Ricardo
Ricardo Wurmus - July 5, 2016, 1:05 p.m.
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

> Leo Famulari <leo@famulari.name> writes:
>
>> On Wed, Jun 29, 2016 at 04:36:17PM +0200, Ricardo Wurmus wrote:
>>> * gnu/packages/bioinformatics.scm (bits): New variable.
>>
>>> +      (arguments
>>> +       `(#:tests? #f ;no tests included
>>
>> How about the tests described in the README?
>>
>> https://github.com/arq5x/bits
>>
>> "Now, you can test both the sequential and CUDA versions of the tools by
>> running the bits_tests scripts. Also, this shell script demonstrates how
>> to run each of the BITS tools"
>
> Good idea, I’ll do that.

On second thought: I’d rather not.  The script doesn’t perform any
tests, it doesn’t compare the output to expected values, so I think it
doesn’t really make sense to run it during the check phase.

I’ll push this as is.  Thanks for checking!

~~ Ricardo

Patch

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index a8144a9..11784ab 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -5186,6 +5186,52 @@  two-dimensional genome scans.")
 libraries for systems that do not have these available via other means.")
     (license license:artistic2.0)))
 
+(define-public bits
+  (let ((revision "1")
+        (commit "3cc4567896d9d6442923da944beb704750a08d2d"))
+    (package
+      (name "bits")
+      ;; The version is 2.13.0 even though no release archives have been
+      ;; published as yet.
+      (version (string-append "2.13.0-" revision "." (string-take commit 9)))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/arq5x/bits.git")
+                      (commit commit)))
+                (file-name (string-append name "-" version "-checkout"))
+                (sha256
+                 (base32
+                  "17n2kffk4kmhivd8c98g2vr6y1s23vbg4sxlxs689wni66797hbs"))))
+      (build-system gnu-build-system)
+      (arguments
+       `(#:tests? #f ;no tests included
+         #:phases
+         (modify-phases %standard-phases
+           (delete 'configure)
+           (add-after 'unpack 'remove-cuda
+             (lambda _
+               (substitute* "Makefile"
+                 ((".*_cuda") "")
+                 (("(bits_test_intersections) \\\\" _ match) match))
+               #t))
+           (replace 'install
+             (lambda* (#:key outputs #:allow-other-keys)
+               (copy-recursively
+                "bin" (string-append (assoc-ref outputs "out") "/bin"))
+               #t)))))
+      (inputs
+       `(("gsl" ,gsl)
+         ("zlib" ,zlib)))
+      (home-page "https://github.com/arq5x/bits")
+      (synopsis "Implementation of binary interval search algorithm")
+      (description "This package provides an implementation of the
+BITS (Binary Interval Search) algorithm, an approach to interval set
+intersection.  It is especially suited for the comparison of diverse genomic
+datasets and the exploration of large datasets of genome
+intervals (e.g. genes, sequence alignments).")
+      (license license:gpl2))))
+
 (define-public piranha
   ;; There is no release tarball for the latest version.  The latest commit is
   ;; older than one year at the time of this writing.