guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gnu: Update STAR to 2.5.0c.


From: Ricardo Wurmus
Subject: [PATCH] gnu: Update STAR to 2.5.0c.
Date: Tue, 19 Jan 2016 16:29:35 +0100

>From e7090b086c71fb8f8a56b6c7cb078b94bc577d2c Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Tue, 19 Jan 2016 16:04:01 +0100
Subject: [PATCH 1/2] gnu: star: Use "modify-phases" syntax.

* gnu/packages/bioinformatics.scm (star)[arguments]: Use "modify-phases"
  syntax.
---
 gnu/packages/bioinformatics.scm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 74cadff..d30b0c9 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3259,15 +3259,15 @@ of these reads to align data quickly through a 
hash-based indexing scheme.")
      '(#:tests? #f ;no check target
        #:make-flags '("STAR")
        #:phases
-       (alist-cons-after
-        'unpack 'enter-source-dir (lambda _ (chdir "source"))
-        (alist-replace
-         'install
-         (lambda* (#:key outputs #:allow-other-keys)
-           (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
-             (install-file "STAR" bin)))
-         (alist-delete
-          'configure %standard-phases)))))
+       (modify-phases %standard-phases
+         (add-after 'unpack 'enter-source-dir
+           (lambda _ (chdir "source") #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
+               (install-file "STAR" bin))
+             #t))
+         (delete 'configure))))
     (native-inputs
      `(("vim" ,vim))) ; for xxd
     (inputs
-- 
2.1.0

>From 4efd7a8afe3fbc03f59c1061e9ab2cfcb7c88160 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <address@hidden>
Date: Tue, 19 Jan 2016 16:26:47 +0100
Subject: [PATCH 2/2] gnu: star: Update to 2.5.0c.

* gnu/packages/bioinformatics.scm (star): Update to 2.5.0c.
[source]: Remove bundled htslib sources and pre-built binaries.
[arguments]: Add phase "do-not-use-bundled-htslib".
[inputs]: Add "htslib".
---
 gnu/packages/bioinformatics.scm | 40 ++++++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index d30b0c9..20a150f 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3241,19 +3241,25 @@ of these reads to align data quickly through a 
hash-based indexing scheme.")
 (define-public star
   (package
     (name "star")
-    (version "2.4.2a")
+    (version "2.5.0c")
     (source (origin
               (method url-fetch)
-              (uri (string-append
-                    "https://github.com/alexdobin/STAR/archive/STAR_";
-                    version ".tar.gz"))
+              (uri (string-append "https://github.com/alexdobin/STAR/archive/";
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1c3rnm7r5l0kl3d04gl1g7938xqf1c2l0mla87rlplqg1hcns5mc"))
+                "1hd662ijwns6rpsd5536sm3h69yfb6xsfkrrrlnyh745gf6d5z4q"))
               (modules '((guix build utils)))
               (snippet
-               '(substitute* "source/Makefile"
-                  (("/bin/rm") "rm")))))
+               '(begin
+                  (substitute* "source/Makefile"
+                    (("/bin/rm") "rm"))
+                  ;; Remove pre-built binaries and bundled htslib sources.
+                  (delete-file-recursively "bin/MacOSX_x86_64")
+                  (delete-file-recursively "bin/Linux_x86_64")
+                  (delete-file-recursively "source/htslib")
+                  #t))))
     (build-system gnu-build-system)
     (arguments
      '(#:tests? #f ;no check target
@@ -3262,6 +3268,23 @@ of these reads to align data quickly through a 
hash-based indexing scheme.")
        (modify-phases %standard-phases
          (add-after 'unpack 'enter-source-dir
            (lambda _ (chdir "source") #t))
+         (add-after 'enter-source-dir 'do-not-use-bundled-htslib
+           (lambda _
+             (substitute* "Makefile"
+               (("(Depend.list: \\$\\(SOURCES\\) parametersDefault\\.xxd) 
htslib"
+                 _ prefix) prefix))
+             (substitute* '("BAMfunctions.cpp"
+                            "signalFromBAM.h"
+                            "bam_cat.h"
+                            "bam_cat.c"
+                            "STAR.cpp"
+                            "bamRemoveDuplicates.cpp")
+               (("#include \"htslib/([^\"]+\\.h)\"" _ header)
+                (string-append "#include <" header ">")))
+             (substitute* "IncludeDefine.h"
+               (("\"htslib/(htslib/[^\"]+.h)\"" _ header)
+                (string-append "<" header ">")))
+             #t))
          (replace 'install
            (lambda* (#:key outputs #:allow-other-keys)
              (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
@@ -3271,7 +3294,8 @@ of these reads to align data quickly through a hash-based 
indexing scheme.")
     (native-inputs
      `(("vim" ,vim))) ; for xxd
     (inputs
-     `(("zlib" ,zlib)))
+     `(("htslib" ,htslib)
+       ("zlib" ,zlib)))
     (home-page "https://github.com/alexdobin/STAR";)
     (synopsis "Universal RNA-seq aligner")
     (description
-- 
2.1.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]