[PATCH] gnu: Add mashmap.

  • Open
  • quality assurance status badge
Details
One participant
  • gemmaro
Owner
unassigned
Submitted by
gemmaro
Severity
normal
G
G
gemmaro wrote on 7 Jun 15:38 +0200
(address . guix-patches@gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
74f398d3d8593139397b50eb7e89b86d4cb3f6ec.1717767512.git.gemmaro.dev@gmail.com
* gnu/packages/bioinformatics.scm (mashmap): New variable.

Change-Id: I38f984b308db0a3a5756852cd89de25ae0875f76
---
gnu/packages/bioinformatics.scm | 68 +++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)

Toggle diff (97 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index cecd94bbb7..d12ec9a249 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -26,6 +26,7 @@
;;; Copyright © 2022, 2023 Navid Afkhami <navid.afkhami@mdc-berlin.de>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;; Copyright © 2024 Alexis Simon <alexis.simon@runbox.com>
+;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -172,6 +173,7 @@ (define-module (gnu packages bioinformatics)
#:use-module (gnu packages wget)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
+ #:use-module (gnu packages xdisorg)
#:use-module (guix platform)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
@@ -22617,6 +22619,72 @@ (define-public hh-suite
based on the pairwise alignment of hidden Markov models (HMMs).")
(license license:gpl3+)))
+(define-public mashmap
+ (package
+ (name "mashmap")
+ (version "3.1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/marbl/MashMap")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0iqgcx5jk6asihdvzv2sa5v373y9k9fsd2a2in25ragil8z8nckp"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gnuplot (string-append (assoc-ref inputs
+ "gnuplot")
+ "/bin/gnuplot"))
+ (xclip (string-append (assoc-ref inputs "xclip")
+ "/bin/xclip")))
+ (substitute* "scripts/generateDotPlot"
+ (("gnuplot --version")
+ (string-append gnuplot " --version"))
+ (("my \\$cmd = \"gnuplot\";")
+ (string-append "my $cmd = \"" gnuplot "\";"))
+ (("xclip -o")
+ (string-append xclip " -o"))))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (begin
+ (invoke "../build/bin/mashmap"
+ "-r" "../source/data/scerevisiae8.fa.gz"
+ "-q" "../source/data/scerevisiae8.fa.gz"
+ "--pi" "95"
+ "-n" "1"
+ "-Y" "#"
+ "-o" "scerevisiae8.paf")
+ (invoke "../source/scripts/test.sh"
+ "../source/data/scerevisiae8.fa.gz.fai"
+ "scerevisiae8.paf" "0.92")))))
+ (add-after 'install 'install-script
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "../source/scripts/generateDotPlot"
+ (string-append out "/share/mashmap"))))))))
+ (native-inputs (list bedtools util-linux))
+ (inputs (list gsl
+ zlib
+ htslib
+ perl
+ gnuplot
+ xclip))
+ (home-page "https://github.com/marbl/MashMap")
+ (synopsis "Fast approximate aligner for long DNA sequences")
+ (description
+ "MashMap implements a fast and approximate algorithm for computing
+local alignment boundaries between long DNA sequences. It can be
+useful for mapping genome assembly or long reads (PacBio/ONT) to
+reference genome(s).")
+ (license license:public-domain)))
+
(define-public wfmash
(package
(name "wfmash")

base-commit: 580d77d0fb12448ef1621699cc0c56e787e2aadb
--
2.45.1
G
G
gemmaro wrote on 17 Jun 05:32 +0200
[PATCH v2] gnu: Add mashmap.
(address . 71414@debbugs.gnu.org)(name . gemmaro)(address . gemmaro.dev@gmail.com)
f979de7d073cc29c35de582bf104fdabeefb7935.1718595148.git.gemmaro.dev@gmail.com
* gnu/packages/bioinformatics.scm (mashmap): New variable.

Change-Id: I8f0a9827faa560765ef50af40b908a745c6e7ddd
---
This fixes build failures on some platforms by excluding them.

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

Toggle diff (101 lines)
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index cecd94bbb7..85262b51cf 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -26,6 +26,7 @@
;;; Copyright © 2022, 2023 Navid Afkhami <navid.afkhami@mdc-berlin.de>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
;;; Copyright © 2024 Alexis Simon <alexis.simon@runbox.com>
+;;; Copyright © 2024 gemmaro <gemmaro.dev@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -172,6 +173,7 @@ (define-module (gnu packages bioinformatics)
#:use-module (gnu packages wget)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
+ #:use-module (gnu packages xdisorg)
#:use-module (guix platform)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
@@ -22617,6 +22619,76 @@ (define-public hh-suite
based on the pairwise alignment of hidden Markov models (HMMs).")
(license license:gpl3+)))
+(define-public mashmap
+ (package
+ (name "mashmap")
+ (version "3.1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/marbl/MashMap")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0iqgcx5jk6asihdvzv2sa5v373y9k9fsd2a2in25ragil8z8nckp"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gnuplot (string-append (assoc-ref inputs
+ "gnuplot")
+ "/bin/gnuplot"))
+ (xclip (string-append (assoc-ref inputs "xclip")
+ "/bin/xclip")))
+ (substitute* "scripts/generateDotPlot"
+ (("gnuplot --version")
+ (string-append gnuplot " --version"))
+ (("my \\$cmd = \"gnuplot\";")
+ (string-append "my $cmd = \"" gnuplot "\";"))
+ (("xclip -o")
+ (string-append xclip " -o"))))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (if tests?
+ (begin
+ (invoke "../build/bin/mashmap"
+ "-r" "../source/data/scerevisiae8.fa.gz"
+ "-q" "../source/data/scerevisiae8.fa.gz"
+ "--pi" "95"
+ "-n" "1"
+ "-Y" "#"
+ "-o" "scerevisiae8.paf")
+ (invoke "../source/scripts/test.sh"
+ "../source/data/scerevisiae8.fa.gz.fai"
+ "scerevisiae8.paf" "0.92")))))
+ (add-after 'install 'install-script
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "../source/scripts/generateDotPlot"
+ (string-append out "/share/mashmap"))))))))
+ (native-inputs (list bedtools util-linux))
+ (inputs (list gsl
+ zlib
+ htslib
+ perl
+ gnuplot
+ xclip))
+ (home-page "https://github.com/marbl/MashMap")
+ (synopsis "Fast approximate aligner for long DNA sequences")
+ (description
+ "MashMap implements a fast and approximate algorithm for computing
+local alignment boundaries between long DNA sequences. It can be
+useful for mapping genome assembly or long reads (PacBio/ONT) to
+reference genome(s).")
+ ;; Some platforms fail to build/check this pacakge.
+ ;; armhf-linux: It doesn't have a type __uint128_t.
+ ;; i686-linux: Check fails due to the differences with bedtools results.
+ (supported-systems '("x86_64-linux" "aarch64-linux"))
+ (license license:public-domain)))
+
(define-public wfmash
(package
(name "wfmash")

base-commit: bd5c61781c13611ed16686513980907c6ee34ae6
--
2.45.1
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 71414@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71414
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch