guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: Add mosaicatcher.


From: guix-commits
Subject: branch master updated: gnu: Add mosaicatcher.
Date: Sat, 29 May 2021 01:45:30 -0400

This is an automated email from the git hooks/post-receive script.

rekado pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new e3cde9a  gnu: Add mosaicatcher.
e3cde9a is described below

commit e3cde9aaf8dfef17299987590db11aa1f4df418b
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sat May 29 07:25:08 2021 +0200

    gnu: Add mosaicatcher.
    
    * gnu/packages/patches/mosaicatcher-unbundle-htslib.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/bioinformatics.scm (mosaicatcher): New variable.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/bioinformatics.scm                    | 40 ++++++++++++++++++
 .../patches/mosaicatcher-unbundle-htslib.patch     | 49 ++++++++++++++++++++++
 3 files changed, 90 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 792ebac..cf13d67 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1432,6 +1432,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/module-init-tools-moduledir.patch       \
   %D%/packages/patches/monero-use-system-miniupnpc.patch                       
\
   %D%/packages/patches/mono-mdoc-timestamping.patch            \
+  %D%/packages/patches/mosaicatcher-unbundle-htslib.patch      \
   %D%/packages/patches/mozjs17-aarch64-support.patch           \
   %D%/packages/patches/mozjs24-aarch64-support.patch           \
   %D%/packages/patches/mozjs38-pkg-config-version.patch                \
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index f38c0c0..2a74433 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -6170,6 +6170,46 @@ Roche 454, Ion Torrent and Pacific BioSciences SMRT.")
       ;; 2. MD5 implementation - RSA Data Security, RFC 1321
       (license (list license:gpl2+ license:public-domain)))))
 
+(define-public mosaicatcher
+  (package
+    (name "mosaicatcher")
+    (version "0.3.1")
+    (source (origin
+              ;; There are no release tarballs nor tags.
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/friendsofstrandseq/mosaicatcher";)
+                    (commit (string-append version "-dev"))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1n2s5wvvj2y0vfgjkg1q11xahpbagxz7h2vf5q7qyy25s12kbzbd"))
+              (patches (search-patches "mosaicatcher-unbundle-htslib.patch"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #false ; there are no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda _ (chdir "src")))
+         (replace 'install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((target (assoc-ref outputs "out"))
+                    (bin (string-append target "/bin"))
+                    (share (string-append target "/share/mosaicatcher")))
+               (install-file "mosaic" bin)
+               (mkdir-p share)
+               (copy-recursively "../R" share)))))))
+    (inputs
+     `(("boost" ,boost)
+       ("htslib" ,htslib)))
+    (home-page "https://github.com/friendsofstrandseq/mosaicatcher";)
+    (synopsis "Count and classify Strand-seq reads")
+    (description
+     "Mosaicatcher counts Strand-seq reads and classifies strand states of
+each chromosome in each cell using a Hidden Markov Model.")
+    (license license:expat)))
+
 (define-public ngs-sdk
   (package
     (name "ngs-sdk")
diff --git a/gnu/packages/patches/mosaicatcher-unbundle-htslib.patch 
b/gnu/packages/patches/mosaicatcher-unbundle-htslib.patch
new file mode 100644
index 0000000..262895d
--- /dev/null
+++ b/gnu/packages/patches/mosaicatcher-unbundle-htslib.patch
@@ -0,0 +1,49 @@
+--- a/src/CMakeLists.txt       2021-05-28 13:07:25.655107983 +0200
++++ b/src/CMakeLists.txt       2021-05-28 13:09:55.764025497 +0200
+@@ -21,24 +21,6 @@
+ 
+ 
+ 
+-### Link HTSlib
+-
+-ExternalProject_Add(htslib
+-    PREFIX ${CMAKE_BINARY_DIR}/htslib
+-    GIT_REPOSITORY "https://github.com/samtools/htslib.git";
+-    GIT_TAG "1.3.1"
+-    UPDATE_COMMAND ""
+-    BUILD_IN_SOURCE 1
+-    CONFIGURE_COMMAND ""
+-    BUILD_COMMAND make
+-    INSTALL_COMMAND make install prefix=${CMAKE_BINARY_DIR}/htslib
+-    LOG_DOWNLOAD 1
+-)
+-link_directories (${CMAKE_BINARY_DIR}/htslib/lib)
+-include_directories (${CMAKE_BINARY_DIR}/htslib/include)
+-
+-
+-
+ ### Set version
+ 
+ # Get the current working branch
+@@ -64,13 +46,6 @@
+ 
+ # 2. Boost version from find_package (Boost_VERSION)
+ 
+-# 3. Get HTSlib version from git
+-execute_process(
+-    COMMAND git describe --always
+-    WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/htslib
+-    OUTPUT_VARIABLE HTSLIB_VERSION
+-    OUTPUT_STRIP_TRAILING_WHITESPACE
+-)
+ set(HTSLIB_VERSION "1.3.1 ${HTSLIB_VERSION}")
+ 
+ # 4. write version.hpp file
+@@ -105,7 +80,6 @@
+ add_executable (mosaic main.cpp ${HEADER_FILES})
+ target_link_libraries (mosaic LINK_PUBLIC ${Boost_LIBRARIES})
+ target_link_libraries (mosaic LINK_PUBLIC hts)
+-add_dependencies (mosaic htslib)
+ 
+ 
+ ### Doxygen API documentation



reply via email to

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