Archived
1
0
Fork 0

gnu: nanopolish: Update to 0.14.0.

* gnu/packages/bioinformatics.scm (nanopolish): Update to 0.14.0.
[source]: Update snippet.
[arguments]: Use gexp; use cc-for-target; drop #T from build phases.
[inputs]: Add minimap2.
[native-inputs]: Add cmake-minimal.
This commit is contained in:
Ricardo Wurmus 2023-01-06 14:51:55 +01:00
parent 8ace894681
commit 24e5dbb57a
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -14358,91 +14358,89 @@ choosing which reads pass the filter.")
license:asl2.0))))) ;histogram.py license:asl2.0))))) ;histogram.py
(define-public nanopolish (define-public nanopolish
;; The recommended way to install is to clone the git repository (package
;; <https://github.com/jts/nanopolish#installing-a-particular-release>. (name "nanopolish")
;; Also, the differences between release and current version seem to be (version "0.14.0")
;; significant. (source
(let ((commit "6331dc4f15b9dfabb954ba3fae9d76b6c3ca6377") (origin
(revision "1")) (method git-fetch)
(package (uri (git-reference
(name "nanopolish") (url "https://github.com/jts/nanopolish")
(version (git-version "0.11.1" revision commit)) (commit (string-append "v" version))
(source (recursive? #t)))
(origin (file-name (git-file-name name version))
(method git-fetch) (sha256
(uri (git-reference (base32 "1ha9v5ia0qrwgav0956cfc7n64wjm9a9w3rvkg21g37a994yixg5"))
(url "https://github.com/jts/nanopolish") (modules '((guix build utils)))
(commit commit) (snippet
(recursive? #t))) ;; TODO: unbundle slow5lib
(file-name (git-file-name name version)) '(begin (for-each delete-file-recursively
(sha256 '("htslib" "minimap2"))))))
(base32 "15ikl3d37y49pwd7vx36xksgsqajhf24q7qqsnpl15dqqyy5qgbc")) (build-system gnu-build-system)
(modules '((guix build utils))) (arguments
(snippet (list
'(begin #:make-flags
(delete-file-recursively "htslib") #~(list "HDF5=noinstall"
#t)))) "EIGEN=noinstall"
(build-system gnu-build-system) "HTS=noinstall"
(arguments "MINIMAP2=noinstall"
`(#:make-flags (string-append "CC=" #$(cc-for-target)))
`("HDF5=noinstall" "EIGEN=noinstall" "HTS=noinstall" "CC=gcc") #:tests? #f ; no check target
#:tests? #f ; no check target #:phases
#:phases #~(modify-phases %standard-phases
(modify-phases %standard-phases (add-after 'unpack 'find-eigen
(add-after 'unpack 'find-eigen (lambda* (#:key inputs #:allow-other-keys)
(lambda* (#:key inputs #:allow-other-keys) (setenv "CPATH"
(setenv "CPATH" (string-append
(string-append (search-input-directory inputs "/include/eigen3")
(search-input-directory inputs "/include/eigen3") ":" (or (getenv "CPATH") "")))))
":" (or (getenv "CPATH") ""))))) (delete 'configure)
(delete 'configure) (replace 'install
(replace 'install (lambda _
(lambda* (#:key outputs #:allow-other-keys) (let ((bin (string-append #$output "/bin"))
(let* ((out (assoc-ref outputs "out")) (scripts (string-append #$output "/share/nanopolish/scripts")))
(bin (string-append out "/bin"))
(scripts (string-append out "/share/nanopolish/scripts")))
(install-file "nanopolish" bin) (install-file "nanopolish" bin)
(for-each (lambda (file) (install-file file scripts)) (for-each (lambda (file) (install-file file scripts))
(find-files "scripts" ".*")) (find-files "scripts" ".*")))))
#t))) (add-after 'install 'wrap-programs
(add-after 'install 'wrap-programs (lambda* (#:key inputs #:allow-other-keys)
(lambda* (#:key inputs outputs #:allow-other-keys) (let ((pythonpath (getenv "GUIX_PYTHONPATH"))
(let ((pythonpath (getenv "GUIX_PYTHONPATH")) (perl5lib (getenv "PERL5LIB"))
(perl5lib (getenv "PERL5LIB")) (scripts (string-append #$output "/share/nanopolish/scripts"))
(scripts (string-append (assoc-ref outputs "out") (guile (search-input-file inputs "bin/guile")))
"/share/nanopolish/scripts")) (for-each (lambda (file)
(guile (search-input-file inputs "bin/guile"))) (wrap-program file `("GUIX_PYTHONPATH" ":" prefix (,pythonpath))))
(for-each (lambda (file) (find-files scripts "\\.py"))
(wrap-program file `("GUIX_PYTHONPATH" ":" prefix (,pythonpath)))) (for-each (lambda (file)
(find-files scripts "\\.py")) (wrap-script file #:guile guile
(for-each (lambda (file) `("PERL5LIB" ":" prefix (,perl5lib))))
(wrap-script file #:guile guile (find-files scripts "\\.pl"))))))))
`("PERL5LIB" ":" prefix (,perl5lib)))) (inputs
(find-files scripts "\\.pl")))))))) `(("guile" ,guile-3.0) ; for wrappers
(inputs ("eigen" ,eigen)
`(("guile" ,guile-3.0) ; for wrappers ("hdf5" ,hdf5)
("eigen" ,eigen) ("htslib" ,htslib)
("hdf5" ,hdf5) ("minimap2" ,minimap2)
("htslib" ,htslib) ("perl" ,perl)
("perl" ,perl) ("bioperl" ,bioperl-minimal)
("bioperl" ,bioperl-minimal) ("perl-getopt-long" ,perl-getopt-long)
("perl-getopt-long" ,perl-getopt-long) ("python" ,python-wrapper)
("python" ,python-wrapper) ("python-biopython" ,python-biopython)
("python-biopython" ,python-biopython) ("python-numpy" ,python-numpy)
("python-numpy" ,python-numpy) ("python-pysam" ,python-pysam)
("python-pysam" ,python-pysam) ("python-scikit-learn" , python-scikit-learn)
("python-scikit-learn" , python-scikit-learn) ("python-scipy" ,python-scipy)
("python-scipy" ,python-scipy) ("zlib" ,zlib)))
("zlib" ,zlib))) (native-inputs (list cmake-minimal))
(home-page "https://github.com/jts/nanopolish") (home-page "https://github.com/jts/nanopolish")
(synopsis "Signal-level analysis of Oxford Nanopore sequencing data") (synopsis "Signal-level analysis of Oxford Nanopore sequencing data")
(description (description
"This package analyses the Oxford Nanopore sequencing data at signal-level. "This package analyses the Oxford Nanopore sequencing data at signal-level.
Nanopolish can calculate an improved consensus sequence for a draft genome Nanopolish can calculate an improved consensus sequence for a draft genome
assembly, detect base modifications, call SNPs (Single nucleotide assembly, detect base modifications, call SNPs (Single nucleotide
polymorphisms) and indels with respect to a reference genome and more.") polymorphisms) and indels with respect to a reference genome and more.")
(license license:expat)))) (license license:expat)))
(define-public cnvkit (define-public cnvkit
(package (package