1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014, 2015 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages bioinformatics)
21 #:use-module ((guix licenses) #:prefix license:)
22 #:use-module (guix packages)
23 #:use-module (guix utils)
24 #:use-module (guix download)
25 #:use-module (guix git-download)
26 #:use-module (guix build-system gnu)
27 #:use-module (guix build-system cmake)
28 #:use-module (guix build-system perl)
29 #:use-module (guix build-system python)
30 #:use-module (guix build-system trivial)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages algebra)
33 #:use-module (gnu packages base)
34 #:use-module (gnu packages boost)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages cpio)
37 #:use-module (gnu packages file)
38 #:use-module (gnu packages java)
39 #:use-module (gnu packages linux)
40 #:use-module (gnu packages machine-learning)
41 #:use-module (gnu packages maths)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages perl)
44 #:use-module (gnu packages pkg-config)
45 #:use-module (gnu packages popt)
46 #:use-module (gnu packages protobuf)
47 #:use-module (gnu packages python)
48 #:use-module (gnu packages statistics)
49 #:use-module (gnu packages swig)
50 #:use-module (gnu packages tbb)
51 #:use-module (gnu packages textutils)
52 #:use-module (gnu packages vim)
53 #:use-module (gnu packages web)
54 #:use-module (gnu packages xml)
55 #:use-module (gnu packages zip))
57 (define-public aragorn
64 "http://mbio-serv2.mbioekol.lu.se/ARAGORN/Downloads/aragorn"
68 "1dg7jlz1qpqy88igjxd6ncs11ccsirb36qv1z01a0np4i4jh61mb"))))
69 (build-system gnu-build-system)
71 `(#:tests? #f ; there are no tests
73 (modify-phases %standard-phases
83 (string-append "aragorn" ,version ".c")))))
85 (lambda* (#:key outputs #:allow-other-keys)
86 (let* ((out (assoc-ref outputs "out"))
87 (bin (string-append out "/bin"))
88 (man (string-append out "/share/man/man1")))
91 (string-append bin "/aragorn"))
93 (copy-file "aragorn.1"
94 (string-append man "/aragorn.1")))
96 (home-page "http://mbio-serv2.mbioekol.lu.se/ARAGORN")
97 (synopsis "Detect tRNA, mtRNA and tmRNA genes in nucleotide sequences")
99 "Aragorn identifies transfer RNA, mitochondrial RNA and
100 transfer-messenger RNA from nucleotide sequences, based on homology to known
101 tRNA consensus sequences and RNA structure. It also outputs the secondary
102 structure of the predicted RNA.")
103 (license license:gpl2)))
105 (define-public bamtools
112 "https://github.com/pezmaster31/bamtools/archive/v"
114 (file-name (string-append name "-" version ".tar.gz"))
117 "1brry29bw2xr2l9pqn240rkqwayg85b8qq78zk2zs6nlspk4d018"))))
118 (build-system cmake-build-system)
120 `(#:tests? #f ;no "check" target
122 (modify-phases %standard-phases
124 'configure 'set-ldflags
125 (lambda* (#:key outputs #:allow-other-keys)
129 (assoc-ref outputs "out") "/lib/bamtools")))))))
130 (inputs `(("zlib" ,zlib)))
131 (home-page "https://github.com/pezmaster31/bamtools")
132 (synopsis "C++ API and command-line toolkit for working with BAM data")
134 "BamTools provides both a C++ API and a command-line toolkit for handling
136 (license license:expat)))
138 (define-public bedops
144 (uri (string-append "https://github.com/bedops/bedops/archive/v"
146 (file-name (string-append name "-" version ".tar.gz"))
149 "1kqbac547wyqma81cyky9n7mkgikjpsfd3nnmcm6hpqwanqgh10v"))))
150 (build-system gnu-build-system)
153 #:make-flags (list (string-append "BINDIR=" %output "/bin"))
156 'unpack 'unpack-tarballs
158 ;; FIXME: Bedops includes tarballs of minimally patched upstream
159 ;; libraries jansson, zlib, and bzip2. We cannot just use stock
160 ;; libraries because at least one of the libraries (zlib) is
161 ;; patched to add a C++ function definition (deflateInit2cpp).
162 ;; Until the Bedops developers offer a way to link against system
163 ;; libraries we have to build the in-tree copies of these three
166 ;; See upstream discussion:
167 ;; https://github.com/bedops/bedops/issues/124
169 ;; Unpack the tarballs to benefit from shebang patching.
170 (with-directory-excursion "third-party"
171 (and (zero? (system* "tar" "xvf" "jansson-2.6.tar.bz2"))
172 (zero? (system* "tar" "xvf" "zlib-1.2.7.tar.bz2"))
173 (zero? (system* "tar" "xvf" "bzip2-1.0.6.tar.bz2"))))
174 ;; Disable unpacking of tarballs in Makefile.
175 (substitute* "system.mk/Makefile.linux"
176 (("^\tbzcat .*") "\t@echo \"not unpacking\"\n")
177 (("\\./configure") "CONFIG_SHELL=bash ./configure"))
178 (substitute* "third-party/zlib-1.2.7/Makefile.in"
179 (("^SHELL=.*$") "SHELL=bash\n")))
180 (alist-delete 'configure %standard-phases))))
181 (home-page "https://github.com/bedops/bedops")
182 (synopsis "Tools for high-performance genomic feature operations")
184 "BEDOPS is a suite of tools to address common questions raised in genomic
185 studies---mostly with regard to overlap and proximity relationships between
186 data sets. It aims to be scalable and flexible, facilitating the efficient
187 and accurate analysis and management of large-scale genomic data.
189 BEDOPS provides tools that perform highly efficient and scalable Boolean and
190 other set operations, statistical calculations, archiving, conversion and
191 other management of genomic data of arbitrary scale. Tasks can be easily
192 split by chromosome for distributing whole-genome analyses across a
193 computational cluster.")
194 (license license:gpl2+)))
196 (define-public bedtools
202 (uri (string-append "https://github.com/arq5x/bedtools2/archive/v"
204 (file-name (string-append name "-" version ".tar.gz"))
207 "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl"))))
208 (build-system gnu-build-system)
209 (native-inputs `(("python" ,python-2)))
210 (inputs `(("samtools" ,samtools)
213 '(#:test-target "test"
216 'unpack 'patch-makefile-SHELL-definition
218 ;; patch-makefile-SHELL cannot be used here as it does not
219 ;; yet patch definitions with `:='. Since changes to
220 ;; patch-makefile-SHELL result in a full rebuild, features
221 ;; of patch-makefile-SHELL are reimplemented here.
222 (substitute* "Makefile"
223 (("^SHELL := .*$") (string-append "SHELL := " (which "bash") " -e \n"))))
228 (lambda* (#:key outputs #:allow-other-keys)
229 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
231 (for-each (lambda (file)
232 (copy-file file (string-append bin (basename file))))
233 (find-files "bin" ".*"))))
234 %standard-phases)))))
235 (home-page "https://github.com/arq5x/bedtools2")
236 (synopsis "Tools for genome analysis and arithmetic")
238 "Collectively, the bedtools utilities are a swiss-army knife of tools for
239 a wide-range of genomics analysis tasks. The most widely-used tools enable
240 genome arithmetic: that is, set theory on the genome. For example, bedtools
241 allows one to intersect, merge, count, complement, and shuffle genomic
242 intervals from multiple files in widely-used genomic file formats such as BAM,
244 (license license:gpl2)))
246 (define-public python2-pybedtools
248 (name "python2-pybedtools")
253 "https://pypi.python.org/packages/source/p/pybedtools/pybedtools-"
257 "1ldzdxw1p4y3g2ignmggsdypvqkcwqwzhdha4rbgpih048z5p4an"))))
258 (build-system python-build-system)
259 (arguments `(#:python ,python-2)) ; no Python 3 support
261 `(("python-cython" ,python2-cython)
262 ("python-matplotlib" ,python2-matplotlib)))
264 `(("bedtools" ,bedtools)
265 ("samtools" ,samtools)))
267 `(("python-pyyaml" ,python2-pyyaml)
268 ("python-nose" ,python2-nose)
269 ("python-setuptools" ,python2-setuptools)))
270 (home-page "https://pythonhosted.org/pybedtools/")
271 (synopsis "Python wrapper for BEDtools programs")
273 "pybedtools is a Python wrapper for Aaron Quinlan's BEDtools programs,
274 which are widely used for genomic interval manipulation or \"genome algebra\".
275 pybedtools extends BEDTools by offering feature-level manipulations from with
277 (license license:gpl2+)))
279 (define-public python-biopython
281 (name "python-biopython")
286 "http://biopython.org/DIST/biopython-"
290 "13m8s9jkrw40zvdp1rl709n6lmgdh4f52aann7gzr6sfp0fwhg26"))))
291 (build-system python-build-system)
293 `(("python-numpy" ,python-numpy)))
295 `(("python-setuptools" ,python2-setuptools)))
296 (home-page "http://biopython.org/")
297 (synopsis "Tools for biological computation in Python")
299 "Biopython is a set of tools for biological computation including parsers
300 for bioinformatics files into Python data structures; interfaces to common
301 bioinformatics programs; a standard sequence class and tools for performing
302 common operations on them; code to perform data classification; code for
303 dealing with alignments; code making it easy to split up parallelizable tasks
304 into separate processes; and more.")
305 (license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE"))))
307 (define-public python2-biopython
308 (package (inherit (package-with-python2 python-biopython))
310 `(("python2-numpy" ,python2-numpy)))))
312 (define-public blast+
319 "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/"
320 version "/ncbi-blast-" version "+-src.tar.gz"))
323 "19gq6as4k1jrgsd26158ads6h7v4jca3h4r5dzg1y0m6ya50x5ph"))
324 (modules '((guix build utils)))
327 ;; Remove bundled bzip2 and zlib
328 (delete-file-recursively "c++/src/util/compress/bzip2")
329 (delete-file-recursively "c++/src/util/compress/zlib")
330 (substitute* "c++/src/util/compress/Makefile.in"
331 (("bzip2 zlib api") "api"))
332 ;; Remove useless msbuild directory
333 (delete-file-recursively
334 "c++/src/build-system/project_tree_builder/msbuild")
336 (build-system gnu-build-system)
338 `(;; There are three(!) tests for this massive library, and all fail with
339 ;; "unparsable timing stats".
340 ;; ERR [127] -- [util/regexp] test_pcre.sh (unparsable timing stats)
341 ;; ERR [127] -- [serial/datatool] datatool.sh (unparsable timing stats)
342 ;; ERR [127] -- [serial/datatool] datatool_xml.sh (unparsable timing stats)
345 #:parallel-build? #f ; not supported
347 (modify-phases %standard-phases
350 ;; $HOME needs to be set at some point during the configure phase
351 (lambda _ (setenv "HOME" "/tmp") #t))
354 (lambda _ (chdir "c++") #t))
356 'enter-dir 'fix-build-system
359 (cond ((string=? cmd "date")
360 ;; make call to "date" deterministic
365 (format (current-error-port)
366 "WARNING: Unable to find absolute path for ~s~%"
370 ;; Rewrite hardcoded paths to various tools
371 (substitute* (append '("src/build-system/configure.ac"
372 "src/build-system/configure"
373 "scripts/common/impl/if_diff.sh"
374 "scripts/common/impl/run_with_lock.sh"
375 "src/build-system/Makefile.configurables.real"
376 "src/build-system/Makefile.in.top"
377 "src/build-system/Makefile.meta.gmake=no"
378 "src/build-system/Makefile.meta.in"
379 "src/build-system/Makefile.meta_l"
380 "src/build-system/Makefile.meta_p"
381 "src/build-system/Makefile.meta_r"
382 "src/build-system/Makefile.mk.in"
383 "src/build-system/Makefile.requirements"
384 "src/build-system/Makefile.rules_with_autodep.in")
385 (find-files "scripts/common/check" "\\.sh$"))
386 (("(/usr/bin/|/bin/)([a-z][-_.a-z]*)" all dir cmd)
387 (or (which* cmd) all)))
389 (substitute* (find-files "src/build-system" "^config.*")
390 (("LN_S=/bin/\\$LN_S") (string-append "LN_S=" (which "ln")))
393 ;; rewrite "/var/tmp" in check script
394 (substitute* "scripts/common/check/check_make_unix.sh"
395 (("/var/tmp") "/tmp"))
398 (substitute* (find-files "scripts/common/impl/" "\\.sh$")
400 (("action=/bin/") "action=")
401 (("export PATH") ":"))
405 (lambda* (#:key inputs outputs #:allow-other-keys)
406 (let ((out (assoc-ref outputs "out"))
407 (lib (string-append (assoc-ref outputs "lib") "/lib"))
408 (include (string-append (assoc-ref outputs "include")
409 "/include/ncbi-tools++")))
410 ;; The 'configure' script doesn't recognize things like
411 ;; '--enable-fast-install'.
412 (zero? (system* "./configure.orig"
413 (string-append "--with-build-root=" (getcwd) "/build")
414 (string-append "--prefix=" out)
415 (string-append "--libdir=" lib)
416 (string-append "--includedir=" include)
417 (string-append "--with-bz2="
418 (assoc-ref inputs "bzip2"))
419 (string-append "--with-z="
420 (assoc-ref inputs "zlib"))
421 ;; Each library is built twice by default, once
422 ;; with "-static" in its name, and again
426 (outputs '("out" ; 19 MB
434 (home-page "http://blast.ncbi.nlm.nih.gov")
435 (synopsis "Basic local alignment search tool")
437 "BLAST is a popular method of performing a DNA or protein sequence
438 similarity search, using heuristics to produce results quickly. It also
439 calculates an “expect value” that estimates how many matches would have
440 occurred at a given score by chance, which can aid a user in judging how much
441 confidence to have in an alignment.")
442 ;; Most of the sources are in the public domain, with the following
445 ;; * ./c++/include/util/bitset/
446 ;; * ./c++/src/html/ncbi_menu*.js
448 ;; * ./c++/include/util/impl/floating_point_comparison.hpp
450 ;; * ./c++/include/dbapi/driver/odbc/unix_odbc/
452 ;; * ./c++/src/corelib/teamcity_*
453 (license (list license:public-domain
459 (define-public bowtie
465 (uri (string-append "https://github.com/BenLangmead/bowtie2/archive/v"
467 (file-name (string-append name "-" version ".tar.gz"))
470 "15dnbqippwvhyh9zqjhaxkabk7lm1xbh1nvar1x4b5kwm117zijn"))
471 (modules '((guix build utils)))
473 '(substitute* "Makefile"
474 (("^CC = .*$") "CC = gcc")
475 (("^CPP = .*$") "CPP = g++")
476 ;; replace BUILD_HOST and BUILD_TIME for deterministic build
477 (("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
478 (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\"")))
479 (patches (list (search-patch "bowtie-fix-makefile.patch")))))
480 (build-system gnu-build-system)
481 (inputs `(("perl" ,perl)
482 ("perl-clone" ,perl-clone)
483 ("perl-test-deep" ,perl-test-deep)
484 ("perl-test-simple" ,perl-test-simple)
485 ("python" ,python-2)))
487 '(#:make-flags '("allall")
493 (lambda* (#:key outputs #:allow-other-keys)
494 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
496 (for-each (lambda (file)
497 (copy-file file (string-append bin file)))
498 (find-files "." "bowtie2.*"))))
501 (lambda* (#:key outputs #:allow-other-keys)
503 "scripts/test/simple_tests.pl"
504 "--bowtie2=./bowtie2"
505 "--bowtie2-build=./bowtie2-build"))
506 %standard-phases)))))
507 (home-page "http://bowtie-bio.sourceforge.net/bowtie2/index.shtml")
508 (synopsis "Fast and sensitive nucleotide sequence read aligner")
510 "Bowtie 2 is a fast and memory-efficient tool for aligning sequencing
511 reads to long reference sequences. It is particularly good at aligning reads
512 of about 50 up to 100s or 1,000s of characters, and particularly good at
513 aligning to relatively long (e.g. mammalian) genomes. Bowtie 2 indexes the
514 genome with an FM Index to keep its memory footprint small: for the human
515 genome, its memory footprint is typically around 3.2 GB. Bowtie 2 supports
516 gapped, local, and paired-end alignment modes.")
517 (supported-systems '("x86_64-linux"))
518 (license license:gpl3+)))
526 (uri (string-append "mirror://sourceforge/bio-bwa/bwa-"
530 "1330dpqncv0px3pbhjzz1gwgg39kkcv2r9qp2xs0sixf8z8wl7bh"))))
531 (build-system gnu-build-system)
533 '(#:tests? #f ;no "check" target
537 (lambda* (#:key outputs #:allow-other-keys)
538 (let ((bin (string-append
539 (assoc-ref outputs "out") "/bin"))
541 (assoc-ref outputs "out") "/share/doc/bwa"))
543 (assoc-ref outputs "out") "/share/man/man1")))
547 (copy-file "bwa" (string-append bin "/bwa"))
548 (copy-file "README.md" (string-append doc "/README.md"))
549 (copy-file "bwa.1" (string-append man "/bwa.1"))))
550 ;; no "configure" script
551 (alist-delete 'configure %standard-phases))))
552 (inputs `(("zlib" ,zlib)))
553 (home-page "http://bio-bwa.sourceforge.net/")
554 (synopsis "Burrows-Wheeler sequence aligner")
556 "BWA is a software package for mapping low-divergent sequences against a
557 large reference genome, such as the human genome. It consists of three
558 algorithms: BWA-backtrack, BWA-SW and BWA-MEM. The first algorithm is
559 designed for Illumina sequence reads up to 100bp, while the rest two for
560 longer sequences ranged from 70bp to 1Mbp. BWA-MEM and BWA-SW share similar
561 features such as long-read support and split alignment, but BWA-MEM, which is
562 the latest, is generally recommended for high-quality queries as it is faster
563 and more accurate. BWA-MEM also has better performance than BWA-backtrack for
564 70-100bp Illumina reads.")
565 (license license:gpl3+)))
567 (define-public python2-bx-python
569 (name "python2-bx-python")
574 "https://pypi.python.org/packages/source/b/bx-python/bx-python-"
578 "0ld49idhc5zjdvbhvjq1a2qmpjj7h5v58rqr25dzmfq7g34b50xh"))
579 (modules '((guix build utils)))
581 '(substitute* "setup.py"
582 ;; remove dependency on outdated "distribute" module
583 (("^from distribute_setup import use_setuptools") "")
584 (("^use_setuptools\\(\\)") "")))))
585 (build-system python-build-system)
587 `(#:tests? #f ;tests fail because test data are not included
590 `(("python-numpy" ,python2-numpy)
593 `(("python-nose" ,python2-nose)
594 ("python-setuptools" ,python2-setuptools)))
595 (home-page "http://bitbucket.org/james_taylor/bx-python/")
596 (synopsis "Tools for manipulating biological data")
598 "bx-python provides tools for manipulating biological data, particularly
599 multiple sequence alignments.")
600 (license license:expat)))
602 (define-public clipper
609 "https://github.com/YeoLab/clipper/archive/"
613 "1q7jpimsqln7ic44i8v2rx2haj5wvik8hc1s2syd31zcn0xk1iyq"))
614 (modules '((guix build utils)))
616 ;; remove unnecessary setup dependency
617 '(substitute* "setup.py"
618 (("setup_requires = .*") "")))))
619 (build-system python-build-system)
620 (arguments `(#:python ,python-2)) ; only Python 2 is supported
623 ("python-pybedtools" ,python2-pybedtools)
624 ("python-cython" ,python2-cython)
625 ("python-scikit-learn" ,python2-scikit-learn)
626 ("python-matplotlib" ,python2-matplotlib)
627 ("python-pysam" ,python2-pysam)
628 ("python-numpy" ,python2-numpy)
629 ("python-scipy" ,python2-scipy)))
631 `(("python-mock" ,python2-mock) ; for tests
632 ("python-pytz" ,python2-pytz) ; for tests
633 ("python-setuptools" ,python2-setuptools)))
634 (home-page "https://github.com/YeoLab/clipper")
635 (synopsis "CLIP peak enrichment recognition")
637 "CLIPper is a tool to define peaks in CLIP-seq datasets.")
638 (license license:gpl2)))
640 (define-public couger
647 "http://couger.oit.duke.edu/static/assets/COUGER"
651 "04p2b14nmhzxw5h72mpzdhalv21bx4w9b87z0wpw0xzxpysyncmq"))))
652 (build-system gnu-build-system)
656 (modify-phases %standard-phases
661 (lambda* (#:key outputs #:allow-other-keys)
662 (let ((out (assoc-ref outputs "out")))
663 (copy-recursively "src" (string-append out "/src"))
664 (mkdir (string-append out "/bin"))
665 ;; Add "src" directory to module lookup path.
666 (substitute* "couger"
668 (string-append "import sys\nsys.path.append(\""
669 out "\")\nfrom argparse")))
670 (copy-file "couger" (string-append out "/bin/couger")))
673 'install 'wrap-program
674 (lambda* (#:key inputs outputs #:allow-other-keys)
675 ;; Make sure 'couger' runs with the correct PYTHONPATH.
676 (let* ((out (assoc-ref outputs "out"))
677 (path (getenv "PYTHONPATH")))
678 (wrap-program (string-append out "/bin/couger")
679 `("PYTHONPATH" ":" prefix (,path))))
682 `(("python" ,python-2)
683 ("python2-pillow" ,python2-pillow)
684 ("python2-numpy" ,python2-numpy)
685 ("python2-scipy" ,python2-scipy)
686 ("python2-matplotlib" ,python2-matplotlib)))
690 ("randomjungle" ,randomjungle)))
693 (home-page "http://couger.oit.duke.edu")
694 (synopsis "Identify co-factors in sets of genomic regions")
696 "COUGER can be applied to any two sets of genomic regions bound by
697 paralogous TFs (e.g., regions derived from ChIP-seq experiments) to identify
698 putative co-factors that provide specificity to each TF. The framework
699 determines the genomic targets uniquely-bound by each TF, and identifies a
700 small set of co-factors that best explain the in vivo binding differences
703 COUGER uses classification algorithms (support vector machines and random
704 forests) with features that reflect the DNA binding specificities of putative
705 co-factors. The features are generated either from high-throughput TF-DNA
706 binding data (from protein binding microarray experiments), or from large
707 collections of DNA motifs.")
708 (license license:gpl3+)))
710 (define-public clustal-omega
712 (name "clustal-omega")
717 "http://www.clustal.org/omega/clustal-omega-"
721 "02ibkx0m0iwz8nscg998bh41gg251y56cgh86bvyrii5m8kjgwqf"))))
722 (build-system gnu-build-system)
724 `(("argtable" ,argtable)))
725 (home-page "http://www.clustal.org/omega/")
726 (synopsis "Multiple sequence aligner for protein and DNA/RNA")
728 "Clustal-Omega is a general purpose multiple sequence alignment (MSA)
729 program for protein and DNA/RNA. It produces high quality MSAs and is capable
730 of handling data-sets of hundreds of thousands of sequences in reasonable
732 (license license:gpl2+)))
734 (define-public crossmap
740 (uri (string-append "mirror://sourceforge/crossmap/CrossMap-"
744 "163hi5gjgij6cndxlvbkp5jjwr0k4wbm9im6d2210278q7k9kpnp"))
745 ;; patch has been sent upstream already
747 (search-patch "crossmap-allow-system-pysam.patch")))
748 (modules '((guix build utils)))
749 ;; remove bundled copy of pysam
751 '(delete-file-recursively "lib/pysam"))))
752 (build-system python-build-system)
758 (lambda _ (setenv "CROSSMAP_USE_SYSTEM_PYSAM" "1"))
761 `(("python-numpy" ,python2-numpy)
762 ("python-pysam" ,python2-pysam)
765 `(("python-cython" ,python2-cython)
766 ("python-nose" ,python2-nose)
767 ("python-setuptools" ,python2-setuptools)))
768 (home-page "http://crossmap.sourceforge.net/")
769 (synopsis "Convert genome coordinates between assemblies")
771 "CrossMap is a program for conversion of genome coordinates or annotation
772 files between different genome assemblies. It supports most commonly used
773 file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.")
774 (license license:gpl2+)))
776 (define-public cutadapt
783 "https://github.com/marcelm/cutadapt/archive/v"
785 (file-name (string-append name "-" version ".tar.gz"))
788 "161bp87y6gd6r5bmvjpn2b1k942i3fizfpa139f0jn6jv1wcp5h5"))))
789 (build-system python-build-system)
791 ;; tests must be run after install
792 `(#:phases (alist-cons-after
794 (lambda* (#:key inputs outputs #:allow-other-keys)
797 (getenv "PYTHONPATH")
798 ":" (assoc-ref outputs "out")
800 (string-take (string-take-right
801 (assoc-ref inputs "python") 5) 3)
803 (zero? (system* "nosetests" "-P" "tests")))
804 (alist-delete 'check %standard-phases))))
806 `(("python-cython" ,python-cython)
807 ("python-nose" ,python-nose)
808 ("python-setuptools" ,python-setuptools)))
809 (home-page "https://code.google.com/p/cutadapt/")
810 (synopsis "Remove adapter sequences from nucleotide sequencing reads")
812 "Cutadapt finds and removes adapter sequences, primers, poly-A tails and
813 other types of unwanted sequence from high-throughput sequencing reads.")
814 (license license:expat)))
816 (define-public diamond
823 "https://github.com/bbuchfink/diamond/archive/v"
825 (file-name (string-append name "-" version ".tar.gz"))
828 "0hfkcfv9f76h5brbyw9fyvmc0l9cmbsxrcdqk0fa9xv82zj47p15"))
830 (delete-file "bin/diamond")
832 (build-system gnu-build-system)
834 '(#:tests? #f ;no "check" target
836 (modify-phases %standard-phases
837 (add-after 'unpack 'enter-source-dir
843 (lambda* (#:key outputs #:allow-other-keys)
844 (let ((bin (string-append (assoc-ref outputs "out")
847 (copy-file "../bin/diamond"
848 (string-append bin "/diamond"))
855 (home-page "https://github.com/bbuchfink/diamond")
856 (synopsis "Accelerated BLAST compatible local sequence aligner")
858 "DIAMOND is a BLAST-compatible local aligner for mapping protein and
859 translated DNA query sequences against a protein reference database (BLASTP
860 and BLASTX alignment mode). The speedup over BLAST is up to 20,000 on short
861 reads at a typical sensitivity of 90-99% relative to BLAST depending on the
863 (license (license:non-copyleft "file://src/COPYING"
864 "See src/COPYING in the distribution."))))
866 (define-public edirect
872 ;; Note: older versions are not retained.
873 (uri "ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/edirect.zip")
876 "08afhz2ph66h8h381hl1mqyxkdi5nbvzsyj9gfw3jfbdijnpi4qj"))))
877 (build-system perl-build-system)
879 `(#:tests? #f ;no "check" target
881 (modify-phases %standard-phases
885 (lambda* (#:key outputs #:allow-other-keys)
886 (let ((target (string-append (assoc-ref outputs "out")
889 (copy-file "edirect.pl"
890 (string-append target "/edirect.pl"))
893 'install 'wrap-program
894 (lambda* (#:key inputs outputs #:allow-other-keys)
895 ;; Make sure 'edirect.pl' finds all perl inputs at runtime.
896 (let* ((out (assoc-ref outputs "out"))
897 (path (getenv "PERL5LIB")))
898 (wrap-program (string-append out "/bin/edirect.pl")
899 `("PERL5LIB" ":" prefix (,path)))))))))
901 `(("perl-html-parser" ,perl-html-parser)
902 ("perl-encode-locale" ,perl-encode-locale)
903 ("perl-file-listing" ,perl-file-listing)
904 ("perl-html-tagset" ,perl-html-tagset)
905 ("perl-html-tree" ,perl-html-tree)
906 ("perl-http-cookies" ,perl-http-cookies)
907 ("perl-http-date" ,perl-http-date)
908 ("perl-http-message" ,perl-http-message)
909 ("perl-http-negotiate" ,perl-http-negotiate)
910 ("perl-lwp-mediatypes" ,perl-lwp-mediatypes)
911 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
912 ("perl-net-http" ,perl-net-http)
913 ("perl-uri" ,perl-uri)
914 ("perl-www-robotrules" ,perl-www-robotrules)
918 (home-page "http://www.ncbi.nlm.nih.gov/books/NBK179288")
919 (synopsis "Tools for accessing the NCBI's set of databases")
921 "Entrez Direct (EDirect) is a method for accessing the National Center
922 for Biotechnology Information's (NCBI) set of interconnected
923 databases (publication, sequence, structure, gene, variation, expression,
924 etc.) from a terminal. Functions take search terms from command-line
925 arguments. Individual operations are combined to build multi-step queries.
926 Record retrieval and formatting normally complete the process.
928 EDirect also provides an argument-driven function that simplifies the
929 extraction of data from document summaries or other results that are returned
930 in structured XML format. This can eliminate the need for writing custom
931 software to answer ad hoc questions.")
932 (license license:public-domain)))
934 (define-public express
942 "http://bio.math.berkeley.edu/eXpress/downloads/express-"
943 version "/express-" version "-src.tgz"))
946 "03rczxd0gjp2l1jxcmjfmf5j94j77zqyxa6x063zsc585nj40n0c"))))
947 (build-system cmake-build-system)
949 `(#:tests? #f ;no "check" target
952 'unpack 'use-shared-boost-libs-and-set-bamtools-paths
953 (lambda* (#:key inputs #:allow-other-keys)
954 (substitute* "CMakeLists.txt"
955 (("set\\(Boost_USE_STATIC_LIBS ON\\)")
956 "set(Boost_USE_STATIC_LIBS OFF)")
957 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/bamtools/include")
958 (string-append (assoc-ref inputs "bamtools") "/include/bamtools")))
959 (substitute* "src/CMakeLists.txt"
960 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/\\.\\./bamtools/lib")
961 (string-append (assoc-ref inputs "bamtools") "/lib/bamtools")))
966 ("bamtools" ,bamtools)
967 ("protobuf" ,protobuf)
969 (home-page "http://bio.math.berkeley.edu/eXpress")
970 (synopsis "Streaming quantification for high-throughput genomic sequencing")
972 "eXpress is a streaming tool for quantifying the abundances of a set of
973 target sequences from sampled subsequences. Example applications include
974 transcript-level RNA-Seq quantification, allele-specific/haplotype expression
975 analysis (from RNA-Seq), transcription factor binding quantification in
976 ChIP-Seq, and analysis of metagenomic data.")
977 (license license:artistic2.0)))
979 (define-public fasttree
986 "http://www.microbesonline.org/fasttree/FastTree-"
990 "0dzqc9vr9iiiw21y159xfjl2z90vw0y7r4x6456pcaxiy5hd2wmi"))))
991 (build-system gnu-build-system)
993 `(#:tests? #f ; no "check" target
995 (modify-phases %standard-phases
999 (lambda* (#:key source #:allow-other-keys)
1000 (and (zero? (system* "gcc"
1002 "-finline-functions"
1009 (zero? (system* "gcc"
1013 "-finline-functions"
1021 (lambda* (#:key outputs #:allow-other-keys)
1022 (let ((bin (string-append (assoc-ref outputs "out")
1025 (copy-file "FastTree"
1026 (string-append bin "/FastTree"))
1027 (copy-file "FastTreeMP"
1028 (string-append bin "/FastTreeMP"))
1030 (home-page "http://www.microbesonline.org/fasttree")
1031 (synopsis "Infers approximately-maximum-likelihood phylogenetic trees")
1033 "FastTree can handle alignments with up to a million of sequences in a
1034 reasonable amount of time and memory. For large alignments, FastTree is
1035 100-1,000 times faster than PhyML 3.0 or RAxML 7.")
1036 (license license:gpl2+)))
1038 (define-public fastx-toolkit
1040 (name "fastx-toolkit")
1046 "https://github.com/agordon/fastx_toolkit/releases/download/"
1047 version "/fastx_toolkit-" version ".tar.bz2"))
1050 "01jqzw386873sr0pjp1wr4rn8fsga2vxs1qfmicvx1pjr72007wy"))))
1051 (build-system gnu-build-system)
1053 `(("libgtextutils" ,libgtextutils)))
1055 `(("pkg-config" ,pkg-config)))
1056 (home-page "http://hannonlab.cshl.edu/fastx_toolkit/")
1057 (synopsis "Tools for FASTA/FASTQ file preprocessing")
1059 "The FASTX-Toolkit is a collection of command line tools for Short-Reads
1060 FASTA/FASTQ files preprocessing.
1062 Next-Generation sequencing machines usually produce FASTA or FASTQ files,
1063 containing multiple short-reads sequences. The main processing of such
1064 FASTA/FASTQ files is mapping the sequences to reference genomes. However, it
1065 is sometimes more productive to preprocess the files before mapping the
1066 sequences to the genome---manipulating the sequences to produce better mapping
1067 results. The FASTX-Toolkit tools perform some of these preprocessing tasks.")
1068 (license license:agpl3+)))
1070 (define-public flexbar
1077 (string-append "mirror://sourceforge/flexbar/"
1078 version "/flexbar_v" version "_src.tgz"))
1081 "13jaykc3y1x8y5nn9j8ljnb79s5y51kyxz46hdmvvjj6qhyympmf"))))
1082 (build-system cmake-build-system)
1084 `(#:configure-flags (list
1085 (string-append "-DFLEXBAR_BINARY_DIR="
1086 (assoc-ref %outputs "out")
1091 (lambda* (#:key outputs #:allow-other-keys)
1092 (setenv "PATH" (string-append
1093 (assoc-ref outputs "out") "/bin:"
1095 (chdir "../flexbar_v2.5_src/test")
1096 (zero? (system* "bash" "flexbar_validate.sh")))
1097 (alist-delete 'install %standard-phases))))
1102 `(("pkg-config" ,pkg-config)
1104 (home-page "http://flexbar.sourceforge.net")
1105 (synopsis "Barcode and adapter removal tool for sequencing platforms")
1107 "Flexbar preprocesses high-throughput nucleotide sequencing data
1108 efficiently. It demultiplexes barcoded runs and removes adapter sequences.
1109 Moreover, trimming and filtering features are provided. Flexbar increases
1110 read mapping rates and improves genome and transcriptome assemblies. It
1111 supports next-generation sequencing data in fasta/q and csfasta/q format from
1112 Illumina, Roche 454, and the SOLiD platform.")
1113 (license license:gpl3)))
1122 "https://github.com/nboley/grit/archive/"
1124 (file-name (string-append name "-" version ".tar.gz"))
1127 "157in84dj70wimbind3x7sy1whs3h57qfgcnj2s6lrd38fbrb7mj"))))
1128 (build-system python-build-system)
1130 `(#:python ,python-2
1133 'unpack 'generate-from-cython-sources
1134 (lambda* (#:key inputs outputs #:allow-other-keys)
1135 ;; Delete these C files to force fresh generation from pyx sources.
1136 (delete-file "grit/sparsify_support_fns.c")
1137 (delete-file "grit/call_peaks_support_fns.c")
1138 (substitute* "setup.py"
1139 (("Cython.Setup") "Cython.Build")
1140 ;; Add numpy include path to fix compilation
1142 (string-append "pyx\", ], include_dirs = ['"
1143 (assoc-ref inputs "python-numpy")
1144 "/lib/python2.7/site-packages/numpy/core/include/"
1148 `(("python-scipy" ,python2-scipy)
1149 ("python-numpy" ,python2-numpy)
1150 ("python-pysam" ,python2-pysam)
1151 ("python-networkx" ,python2-networkx)))
1153 `(("python-cython" ,python2-cython)
1154 ("python-setuptools" ,python2-setuptools)))
1155 (home-page "http://grit-bio.org")
1156 (synopsis "Tool for integrative analysis of RNA-seq type assays")
1158 "GRIT is designed to use RNA-seq, TES, and TSS data to build and quantify
1159 full length transcript models. When none of these data sources are available,
1160 GRIT can be run by providing a candidate set of TES or TSS sites. In
1161 addition, GRIT can merge in reference junctions and gene boundaries. GRIT can
1162 also be run in quantification mode, where it uses a provided GTF file and just
1163 estimates transcript expression.")
1164 (license license:gpl3+)))
1166 (define-public hisat
1173 "http://ccb.jhu.edu/software/hisat/downloads/hisat-"
1174 version "-beta-source.zip"))
1177 "1k381ydranqxp09yf2y7w1d0chz5d59vb6jchi89hbb0prq19lk5"))))
1178 (build-system gnu-build-system)
1180 `(#:tests? #f ;no check target
1181 #:make-flags '("allall"
1182 ;; Disable unsupported `popcnt' instructions on
1183 ;; architectures other than x86_64
1184 ,@(if (string-prefix? "x86_64"
1185 (or (%current-target-system)
1188 '("POPCNT_CAPABILITY=0")))
1191 'unpack 'patch-sources
1193 ;; XXX Cannot use snippet because zip files are not supported
1194 (substitute* "Makefile"
1195 (("^CC = .*$") "CC = gcc")
1196 (("^CPP = .*$") "CPP = g++")
1197 ;; replace BUILD_HOST and BUILD_TIME for deterministic build
1198 (("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
1199 (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))
1200 (substitute* '("hisat-build" "hisat-inspect")
1201 (("/usr/bin/env") (which "env"))))
1204 (lambda* (#:key outputs #:allow-other-keys)
1205 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
1209 (copy-file file (string-append bin file)))
1212 "hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$"))))
1213 (alist-delete 'configure %standard-phases)))))
1215 `(("unzip" ,unzip)))
1220 (home-page "http://ccb.jhu.edu/software/hisat/index.shtml")
1221 (synopsis "Hierarchical indexing for spliced alignment of transcripts")
1223 "HISAT is a fast and sensitive spliced alignment program for mapping
1224 RNA-seq reads. In addition to one global FM index that represents a whole
1225 genome, HISAT uses a large set of small FM indexes that collectively cover the
1226 whole genome. These small indexes (called local indexes) combined with
1227 several alignment strategies enable effective alignment of RNA-seq reads, in
1228 particular, reads spanning multiple exons.")
1229 (license license:gpl3+)))
1231 (define-public hmmer
1238 "http://selab.janelia.org/software/hmmer"
1239 (version-prefix version 1) "/"
1240 version "/hmmer-" version ".tar.gz"))
1243 "0djmgc0pfli0jilfx8hql1axhwhqxqb8rxg2r5rg07aw73sfs5nx"))))
1244 (build-system gnu-build-system)
1245 (native-inputs `(("perl", perl)))
1246 (home-page "http://hmmer.janelia.org")
1247 (synopsis "Biosequence analysis using profile hidden Markov models")
1249 "HMMER is used for searching sequence databases for homologs of protein
1250 sequences, and for making protein sequence alignments. It implements methods
1251 using probabilistic models called profile hidden Markov models (profile
1253 (license (list license:gpl3+
1254 ;; The bundled library 'easel' is distributed
1255 ;; under The Janelia Farm Software License.
1256 (license:non-copyleft
1257 "file://easel/LICENSE"
1258 "See easel/LICENSE in the distribution.")))))
1260 (define-public htseq
1267 "https://pypi.python.org/packages/source/H/HTSeq/HTSeq-"
1271 "1i85ppf2j2lj12m0x690qq5nn17xxk23pbbx2c83r8ayb5wngzwv"))))
1272 (build-system python-build-system)
1273 (arguments `(#:python ,python-2)) ; only Python 2 is supported
1275 `(("python-numpy" ,python2-numpy)
1276 ("python-setuptools" ,python2-setuptools)))
1277 (home-page "http://www-huber.embl.de/users/anders/HTSeq/")
1278 (synopsis "Analysing high-throughput sequencing data with Python")
1280 "HTSeq is a Python package that provides infrastructure to process data
1281 from high-throughput sequencing assays.")
1282 (license license:gpl3+)))
1284 (define-public htsjdk
1291 "https://github.com/samtools/htsjdk/archive/"
1293 (file-name (string-append name "-" version ".tar.gz"))
1296 "0asdk9b8jx2ij7yd6apg9qx03li8q7z3ml0qy2r2qczkra79y6fw"))
1297 (modules '((guix build utils)))
1298 ;; remove build dependency on git
1299 (snippet '(substitute* "build.xml"
1300 (("failifexecutionfails=\"true\"")
1301 "failifexecutionfails=\"false\"")))))
1302 (build-system gnu-build-system)
1304 `(#:modules ((srfi srfi-1)
1305 (guix build gnu-build-system)
1307 #:phases (alist-replace
1310 (setenv "JAVA_HOME" (assoc-ref %build-inputs "jdk"))
1311 (zero? (system* "ant" "all"
1312 (string-append "-Ddist="
1313 (assoc-ref %outputs "out")
1314 "/share/java/htsjdk/"))))
1315 (fold alist-delete %standard-phases
1316 '(configure install check)))))
1319 ("jdk" ,icedtea6 "jdk")))
1320 (home-page "http://samtools.github.io/htsjdk/")
1321 (synopsis "Java API for high-throughput sequencing data (HTS) formats")
1323 "HTSJDK is an implementation of a unified Java library for accessing
1324 common file formats, such as SAM and VCF, used for high-throughput
1325 sequencing (HTS) data. There are also an number of useful utilities for
1326 manipulating HTS data.")
1327 (license license:expat)))
1329 (define-public htslib
1336 "https://github.com/samtools/htslib/releases/download/"
1337 version "/htslib-" version ".tar.bz2"))
1340 "1c32ssscbnjwfw3dra140fq7riarp2x990qxybh34nr1p5r17nxx"))))
1341 (build-system gnu-build-system)
1344 (modify-phases %standard-phases
1346 'unpack 'patch-tests
1348 (substitute* "test/test.pl"
1349 (("/bin/bash") (which "bash")))
1355 (home-page "http://www.htslib.org")
1356 (synopsis "C library for reading/writing high-throughput sequencing data")
1358 "HTSlib is a C library for reading/writing high-throughput sequencing
1359 data. It also provides the bgzip, htsfile, and tabix utilities.")
1360 ;; Files under cram/ are released under the modified BSD license;
1361 ;; the rest is released under the Expat license
1362 (license (list license:expat license:bsd-3))))
1371 "https://github.com/nboley/idr/archive/"
1373 (file-name (string-append name "-" version ".tar.gz"))
1376 "1k3x44biak00aiv3hpm1yd6nn4hhp7n0qnbs3zh2q9sw7qr1qj5r"))))
1377 (build-system python-build-system)
1380 (modify-phases %standard-phases
1382 'install 'wrap-program
1383 (lambda* (#:key inputs outputs #:allow-other-keys)
1384 (let* ((out (assoc-ref outputs "out"))
1385 (python-version (string-take (string-take-right
1386 (assoc-ref inputs "python") 5) 3))
1389 (string-append (assoc-ref inputs name)
1390 "/lib/python" python-version
1394 "python-matplotlib"))
1396 (wrap-program (string-append out "/bin/idr")
1397 `("PYTHONPATH" ":" prefix (,path))))
1400 `(("python-scipy" ,python-scipy)
1401 ("python-numpy" ,python-numpy)
1402 ("python-matplotlib" ,python-matplotlib)))
1404 `(("python-cython" ,python-cython)
1405 ("python-setuptools" ,python-setuptools)))
1406 (home-page "https://github.com/nboley/idr")
1407 (synopsis "Tool to measure the irreproducible discovery rate (IDR)")
1409 "The IDR (Irreproducible Discovery Rate) framework is a unified approach
1410 to measure the reproducibility of findings identified from replicate
1411 experiments and provide highly stable thresholds based on reproducibility.")
1412 (license license:gpl3+)))
1417 (version "2.1.0.20140616")
1421 "https://pypi.python.org/packages/source/M/MACS2/MACS2-"
1425 "11lmiw6avqhwn75sn59g4lfkrr2kk20r3rgfbx9xfqb8rg9mi2n6"))))
1426 (build-system python-build-system)
1428 `(#:python ,python-2 ; only compatible with Python 2.7
1429 #:tests? #f)) ; no test target
1431 `(("python-numpy" ,python2-numpy)))
1433 `(("python-setuptools" ,python2-setuptools)))
1434 (home-page "http://github.com/taoliu/MACS/")
1435 (synopsis "Model based analysis for ChIP-Seq data")
1437 "MACS is an implementation of a ChIP-Seq analysis algorithm for
1438 identifying transcript factor binding sites named Model-based Analysis of
1439 ChIP-Seq (MACS). MACS captures the influence of genome complexity to evaluate
1440 the significance of enriched ChIP regions and it improves the spatial
1441 resolution of binding sites through combining the information of both
1442 sequencing tag position and orientation.")
1443 (license license:bsd-3)))
1446 (define-public metabat
1453 "https://bitbucket.org/berkeleylab/metabat/get/"
1454 version ".tar.bz2"))
1455 (file-name (string-append name "-" version ".tar.bz2"))
1458 "0vgrhbaxg4dkxyax2kbigak7w0arhqvw0szwp6gd9wmyilc44kfa"))))
1459 (build-system gnu-build-system)
1462 (modify-phases %standard-phases
1463 (add-after 'unpack 'fix-includes
1465 (substitute* "SConstruct"
1466 (("/include/bam/bam.h")
1467 "/include/samtools/bam.h"))
1468 (substitute* "src/BamUtils.h"
1469 (("^#include \"bam/bam\\.h\"")
1470 "#include \"samtools/bam.h\"")
1471 (("^#include \"bam/sam\\.h\"")
1472 "#include \"samtools/sam.h\""))
1473 (substitute* "src/KseqReader.h"
1474 (("^#include \"bam/kseq\\.h\"")
1475 "#include \"samtools/kseq.h\""))
1477 (add-after 'unpack 'fix-scons
1479 (substitute* "SConstruct" ; Do not distribute README
1480 (("^env\\.Install\\(idir_prefix, 'README\\.md'\\)")
1485 (lambda* (#:key inputs outputs #:allow-other-keys)
1486 (mkdir (assoc-ref outputs "out"))
1487 (zero? (system* "scons"
1490 (assoc-ref outputs "out"))
1493 (assoc-ref inputs "htslib"))
1496 (assoc-ref inputs "samtools"))
1499 (assoc-ref inputs "boost"))
1501 ;; check and install carried out during build phase
1503 (delete 'install))))
1507 ("samtools" ,samtools)
1511 `(("scons" ,scons)))
1512 (home-page "https://bitbucket.org/berkeleylab/metabat")
1514 "Reconstruction of single genomes from complex microbial communities")
1516 "Grouping large genomic fragments assembled from shotgun metagenomic
1517 sequences to deconvolute complex microbial communities, or metagenome binning,
1518 enables the study of individual organisms and their interactions. MetaBAT is
1519 an automated metagenome binning software, which integrates empirical
1520 probabilistic distances of genome abundance and tetranucleotide frequency.")
1521 (license (license:non-copyleft "file://license.txt"
1522 "See license.txt in the distribution."))))
1531 "https://pypi.python.org/packages/source/m/misopy/misopy-"
1535 "0x446867az8ir0z8c1vjqffkp0ma37wm4sylixnkhgawllzx8v5w"))
1536 (modules '((guix build utils)))
1538 '(substitute* "setup.py"
1539 ;; Use setuptools, or else the executables are not
1541 (("distutils.core") "setuptools")
1542 ;; use "gcc" instead of "cc" for compilation
1544 "cc.set_executables(
1548 linker_so='gcc -shared'); defines")))))
1549 (build-system python-build-system)
1551 `(#:python ,python-2 ; only Python 2 is supported
1552 #:tests? #f)) ; no "test" target
1554 `(("samtools" ,samtools)
1555 ("python-numpy" ,python2-numpy)
1556 ("python-pysam" ,python2-pysam)
1557 ("python-scipy" ,python2-scipy)
1558 ("python-matplotlib" ,python2-matplotlib)))
1560 `(("python-mock" ,python2-mock) ;for tests
1561 ("python-pytz" ,python2-pytz) ;for tests
1562 ("python-setuptools" ,python2-setuptools)))
1563 (home-page "http://genes.mit.edu/burgelab/miso/index.html")
1564 (synopsis "Mixture of Isoforms model for RNA-Seq isoform quantitation")
1566 "MISO (Mixture-of-Isoforms) is a probabilistic framework that quantitates
1567 the expression level of alternatively spliced genes from RNA-Seq data, and
1568 identifies differentially regulated isoforms or exons across samples. By
1569 modeling the generative process by which reads are produced from isoforms in
1570 RNA-Seq, the MISO model uses Bayesian inference to compute the probability
1571 that a read originated from a particular isoform.")
1572 (license license:gpl2)))
1581 "https://github.com/wwood/OrfM/releases/download/v"
1582 version "/orfm-" version ".tar.gz"))
1585 "05fmw145snk646ly076zby0fjav0k7ysbclck5d4s9pmgcfpijc2"))))
1586 (build-system gnu-build-system)
1587 (inputs `(("zlib" ,zlib)))
1588 (synopsis "Simple and not slow open reading frame (ORF) caller")
1590 "An ORF caller finds stretches of DNA that when translated are not
1591 interrupted by stop codons. OrfM finds and prints these ORFs.")
1592 (home-page "https://github.com/wwood/OrfM")
1593 (license license:lgpl3+)))
1595 (define-public python2-pbcore
1597 (name "python2-pbcore")
1602 "https://github.com/PacificBiosciences/pbcore/archive/"
1604 (file-name (string-append name "-" version ".tar.gz"))
1607 "1z46rwjac93jm87cbj2zgjg6qvsgs65140wkbbxsvxps7ai4pm09"))))
1608 (build-system python-build-system)
1609 (arguments `(#:python ,python-2)) ; pbcore requires Python 2.7
1611 `(("python-cython" ,python2-cython)
1612 ("python-numpy" ,python2-numpy)
1613 ("python-pysam" ,python2-pysam)
1614 ("python-h5py" ,python2-h5py)))
1616 `(("python-setuptools" ,python2-setuptools)))
1617 (home-page "http://pacificbiosciences.github.io/pbcore/")
1618 (synopsis "Library for reading and writing PacBio data files")
1620 "The pbcore package provides Python APIs for interacting with PacBio data
1621 files and writing bioinformatics applications.")
1622 (license license:bsd-3)))
1624 (define-public python2-warpedlmm
1626 (name "python2-warpedlmm")
1632 "https://pypi.python.org/packages/source/W/WarpedLMM/WarpedLMM-"
1636 "1agfz6zqa8nc6cw47yh0s3y14gkpa9wqazwcj7mwwj3ffnw39p3j"))))
1637 (build-system python-build-system)
1639 `(#:python ,python-2 ; requires Python 2.7
1641 (modify-phases %standard-phases
1643 'install 'remove-bin-directory
1644 (lambda* (#:key outputs #:allow-other-keys)
1645 ;; The "bin" directory only contains wrappers for running
1646 ;; the module tests. They are not needed after the
1648 (delete-file-recursively
1649 (string-append (assoc-ref outputs "out") "/bin"))
1652 `(("python-scipy" ,python2-scipy)
1653 ("python-numpy" ,python2-numpy)
1654 ("python-matplotlib" ,python2-matplotlib)
1655 ("python-fastlmm" ,python2-fastlmm)
1656 ("python-pandas" ,python2-pandas)
1657 ("python-pysnptools" ,python2-pysnptools)))
1659 `(("python-setuptools" ,python2-setuptools)
1660 ("python-mock" ,python2-mock)
1661 ("python-nose" ,python2-nose)
1663 (home-page "https://github.com/PMBio/warpedLMM")
1664 (synopsis "Implementation of warped linear mixed models")
1666 "WarpedLMM is a Python implementation of the warped linear mixed model,
1667 which automatically learns an optimal warping function (or transformation) for
1668 the phenotype as it models the data.")
1669 (license license:asl2.0)))
1671 (define-public pbtranscript-tofu
1672 (let ((commit "c7bbd5472"))
1674 (name "pbtranscript-tofu")
1675 (version (string-append "0.4.1." commit))
1679 (url "https://github.com/PacificBiosciences/cDNA_primer.git")
1681 (file-name (string-append name "-" version ".tar.gz"))
1684 "148xkzi689c49g6fdhckp6mnmj2qhjdf1j4wifm6ja7ij95d7fxx"))))
1685 (build-system python-build-system)
1687 `(#:python ,python-2
1688 ;; With standard flags, the install phase attempts to create a zip'd
1689 ;; egg file, and fails with an error: 'ZIP does not support timestamps
1691 #:configure-flags '("--single-version-externally-managed"
1692 "--record=pbtranscript-tofu.txt")
1695 'unpack 'enter-directory-and-clean-up
1697 (chdir "pbtranscript-tofu/pbtranscript/")
1699 (delete-file-recursively "dist/")
1700 (delete-file-recursively "build/")
1701 (delete-file-recursively "setuptools_cython-0.2.1-py2.6.egg/")
1702 (delete-file-recursively "pbtools.pbtranscript.egg-info")
1703 (delete-file "Cython-0.20.1.tar.gz")
1704 (delete-file "setuptools_cython-0.2.1-py2.7.egg")
1705 (delete-file "setuptools_cython-0.2.1.tar.gz")
1706 (delete-file "setup.cfg")
1707 (for-each delete-file
1708 (find-files "." "\\.so$"))
1709 ;; files should be writable for install phase
1710 (for-each (lambda (f) (chmod f #o755))
1711 (find-files "." "\\.py$")))
1714 `(("python-cython" ,python2-cython)
1715 ("python-numpy" ,python2-numpy)
1716 ("python-bx-python" ,python2-bx-python)
1717 ("python-networkx" ,python2-networkx)
1718 ("python-scipy" ,python2-scipy)
1719 ("python-pbcore" ,python2-pbcore)))
1721 `(("python-nose" ,python2-nose)
1722 ("python-setuptools" ,python2-setuptools)))
1723 (home-page "https://github.com/PacificBiosciences/cDNA_primer")
1724 (synopsis "Analyze transcriptome data generated with the Iso-Seq protocol")
1726 "pbtranscript-tofu contains scripts to analyze transcriptome data
1727 generated using the PacBio Iso-Seq protocol.")
1728 (license license:bsd-3))))
1730 (define-public prodigal
1737 "https://github.com/hyattpd/Prodigal/archive/v"
1739 (file-name (string-append name "-" version ".tar.gz"))
1742 "0m8sb0fg6lmxrlpzna0am6svbnlmd3dckrhgzxxgb3gxr5fyj284"))))
1743 (build-system gnu-build-system)
1745 `(#:tests? #f ;no check target
1746 #:make-flags (list (string-append "INSTALLDIR="
1747 (assoc-ref %outputs "out")
1750 (modify-phases %standard-phases
1751 (delete 'configure))))
1752 (home-page "http://prodigal.ornl.gov")
1753 (synopsis "Protein-coding gene prediction for Archaea and Bacteria")
1755 "Prodigal runs smoothly on finished genomes, draft genomes, and
1756 metagenomes, providing gene predictions in GFF3, Genbank, or Sequin table
1757 format. It runs quickly, in an unsupervised fashion, handles gaps, handles
1758 partial genes, and identifies translation initiation sites.")
1759 (license license:gpl3+)))
1769 (string-append "http://deweylab.biostat.wisc.edu/rsem/src/rsem-"
1772 (base32 "0nzdc0j0hjllhsd5f2xli95dafm3nawskigs140xzvjk67xh0r9q"))
1773 (patches (list (search-patch "rsem-makefile.patch")))
1774 (modules '((guix build utils)))
1777 ;; remove bundled copy of boost
1778 (delete-file-recursively "boost")
1780 (build-system gnu-build-system)
1782 `(#:tests? #f ;no "check" target
1784 (modify-phases %standard-phases
1785 ;; No "configure" script.
1786 ;; Do not build bundled samtools library.
1789 (substitute* "Makefile"
1790 (("^all : sam/libbam.a") "all : "))
1793 (lambda* (#:key outputs #:allow-other-keys)
1794 (let* ((out (string-append (assoc-ref outputs "out")))
1795 (bin (string-append out "/bin/"))
1796 (perl (string-append out "/lib/perl5/site_perl")))
1799 (for-each (lambda (file)
1801 (string-append bin (basename file))))
1802 (find-files "." "rsem-.*"))
1803 (copy-file "rsem_perl_utils.pm"
1804 (string-append perl "/rsem_perl_utils.pm")))
1807 'install 'wrap-program
1808 (lambda* (#:key outputs #:allow-other-keys)
1809 (let ((out (assoc-ref outputs "out")))
1810 (for-each (lambda (prog)
1811 (wrap-program (string-append out "/bin/" prog)
1812 `("PERL5LIB" ":" prefix
1813 (,(string-append out "/lib/perl5/site_perl")))))
1814 '("rsem-plot-transcript-wiggles"
1815 "rsem-calculate-expression"
1816 "rsem-generate-ngvector"
1818 "rsem-prepare-reference")))
1822 ("ncurses" ,ncurses)
1825 ("samtools" ,samtools-0.1)
1827 (home-page "http://deweylab.biostat.wisc.edu/rsem/")
1828 (synopsis "Estimate gene expression levels from RNA-Seq data")
1830 "RSEM is a software package for estimating gene and isoform expression
1831 levels from RNA-Seq data. The RSEM package provides a user-friendly
1832 interface, supports threads for parallel computation of the EM algorithm,
1833 single-end and paired-end read data, quality scores, variable-length reads and
1834 RSPD estimation. In addition, it provides posterior mean and 95% credibility
1835 interval estimates for expression levels. For visualization, it can generate
1836 BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.")
1837 (license license:gpl3+)))
1839 (define-public rseqc
1847 (string-append "mirror://sourceforge/rseqc/"
1848 version "/RSeQC-" version ".tar.gz"))
1850 (base32 "15ly0254yi032qzkdplg00q144qfdsd986gh62829rl5bkxhj330"))
1851 (modules '((guix build utils)))
1854 ;; remove bundled copy of pysam
1855 (delete-file-recursively "lib/pysam")
1856 (substitute* "setup.py"
1857 ;; remove dependency on outdated "distribute" module
1858 (("^from distribute_setup import use_setuptools") "")
1859 (("^use_setuptools\\(\\)") "")
1860 ;; do not use bundled copy of pysam
1861 (("^have_pysam = False") "have_pysam = True"))))))
1862 (build-system python-build-system)
1863 (arguments `(#:python ,python-2))
1865 `(("python-cython" ,python2-cython)
1866 ("python-pysam" ,python2-pysam)
1867 ("python-numpy" ,python2-numpy)
1868 ("python-setuptools" ,python2-setuptools)
1871 `(("python-nose" ,python2-nose)))
1872 (home-page "http://rseqc.sourceforge.net/")
1873 (synopsis "RNA-seq quality control package")
1875 "RSeQC provides a number of modules that can comprehensively evaluate
1876 high throughput sequence data, especially RNA-seq data. Some basic modules
1877 inspect sequence quality, nucleotide composition bias, PCR bias and GC bias,
1878 while RNA-seq specific modules evaluate sequencing saturation, mapped reads
1879 distribution, coverage uniformity, strand specificity, etc.")
1880 (license license:gpl3+)))
1882 (define-public samtools
1890 (string-append "mirror://sourceforge/samtools/"
1891 version "/samtools-" version ".tar.bz2"))
1894 "1akdqb685pk9xk1nb6sa9aq8xssjjhvvc06kp4cpdqvz2157l3j2"))))
1895 (build-system gnu-build-system)
1897 `(;; There are 87 test failures when building on non-64-bit architectures
1898 ;; due to invalid test data. This has since been fixed upstream (see
1899 ;; <https://github.com/samtools/samtools/pull/307>), but as there has
1900 ;; not been a new release we disable the tests for all non-64-bit
1902 #:tests? ,(string=? (or (%current-system) (%current-target-system))
1904 #:modules ((ice-9 ftw)
1906 (guix build gnu-build-system)
1908 #:make-flags (list "LIBCURSES=-lncurses"
1909 (string-append "prefix=" (assoc-ref %outputs "out")))
1914 (lambda* (#:key inputs #:allow-other-keys)
1915 (let ((bash (assoc-ref inputs "bash")))
1916 (substitute* "test/test.pl"
1917 ;; The test script calls out to /bin/bash
1919 (string-append bash "/bin/bash"))
1920 ;; There are two failing tests upstream relating to the "stats"
1921 ;; subcommand in test_usage_subcommand ("did not have Usage"
1922 ;; and "usage did not mention samtools stats"), so we disable
1924 (("(test_usage_subcommand\\(.*\\);)" cmd)
1925 (string-append "unless ($subcommand eq 'stats') {" cmd "};")))))
1927 'install 'install-library
1928 (lambda* (#:key outputs #:allow-other-keys)
1929 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
1931 (copy-file "libbam.a" (string-append lib "/libbam.a"))))
1933 'install 'install-headers
1934 (lambda* (#:key outputs #:allow-other-keys)
1935 (let ((include (string-append (assoc-ref outputs "out")
1936 "/include/samtools/")))
1938 (for-each (lambda (file)
1939 (copy-file file (string-append include
1941 (scandir "." (lambda (name) (string-match "\\.h$" name))))
1943 (alist-delete 'configure %standard-phases))))))
1944 (native-inputs `(("pkg-config" ,pkg-config)))
1945 (inputs `(("ncurses" ,ncurses)
1949 (home-page "http://samtools.sourceforge.net")
1950 (synopsis "Utilities to efficiently manipulate nucleotide sequence alignments")
1952 "Samtools implements various utilities for post-processing nucleotide
1953 sequence alignments in the SAM, BAM, and CRAM formats, including indexing,
1954 variant calling (in conjunction with bcftools), and a simple alignment
1956 (license license:expat)))
1958 (define-public samtools-0.1
1959 ;; This is the most recent version of the 0.1 line of samtools. The input
1960 ;; and output formats differ greatly from that used and produced by samtools
1961 ;; 1.x and is still used in many bioinformatics pipelines.
1962 (package (inherit samtools)
1968 (string-append "mirror://sourceforge/samtools/"
1969 version "/samtools-" version ".tar.bz2"))
1971 (base32 "1m33xsfwz0s8qi45lylagfllqg7fphf4dr0780rsvw75av9wk06h"))))
1973 (substitute-keyword-arguments (package-arguments samtools)
1974 ((#:tests? tests) #f) ;no "check" target
1976 `(modify-phases ,phases
1978 (lambda* (#:key outputs #:allow-other-keys)
1979 (let ((bin (string-append
1980 (assoc-ref outputs "out") "/bin")))
1982 (copy-file "samtools"
1983 (string-append bin "/samtools")))))
1984 (delete 'patch-tests)))))))
1986 (define-public ngs-sdk
1994 (string-append "https://github.com/ncbi/ngs/archive/"
1996 (file-name (string-append name "-" version ".tar.gz"))
1999 "1x58gpm574n0xmk2a98gmikbgycq78ia0bvnb42k5ck34fmd5v8y"))))
2000 (build-system gnu-build-system)
2002 `(#:parallel-build? #f ; not supported
2003 #:tests? #f ; no "check" target
2007 (lambda* (#:key outputs #:allow-other-keys)
2008 (let ((out (assoc-ref outputs "out")))
2009 ;; The 'configure' script doesn't recognize things like
2010 ;; '--enable-fast-install'.
2011 (zero? (system* "./configure"
2012 (string-append "--build-prefix=" (getcwd) "/build")
2013 (string-append "--prefix=" out)))))
2016 (lambda _ (chdir "ngs-sdk") #t)
2017 %standard-phases))))
2018 (native-inputs `(("perl" ,perl)))
2019 (home-page "https://github.com/ncbi/ngs")
2020 (synopsis "API for accessing Next Generation Sequencing data")
2022 "NGS is a domain-specific API for accessing reads, alignments and pileups
2023 produced from Next Generation Sequencing. The API itself is independent from
2024 any particular back-end implementation, and supports use of multiple back-ends
2026 (license license:public-domain)))
2028 (define-public ngs-java
2029 (package (inherit ngs-sdk)
2032 `(,@(substitute-keyword-arguments
2033 `(#:modules ((guix build gnu-build-system)
2037 ,@(package-arguments ngs-sdk))
2040 'enter-dir 'fix-java-symlink-installation
2042 ;; Only replace the version suffix, not the version number in
2043 ;; the directory name. Reported here:
2044 ;; https://github.com/ncbi/ngs/pull/4
2045 (substitute* "Makefile.java"
2046 (((string-append "\\$\\(subst "
2047 "(\\$\\(VERSION[^\\)]*\\)),"
2048 "(\\$\\([^\\)]+\\)),"
2049 "(\\$\\([^\\)]+\\)|\\$\\@)"
2051 _ pattern replacement target)
2052 (string-append "$(patsubst "
2057 'enter-dir (lambda _ (chdir "ngs-java") #t)
2060 `(("jdk" ,icedtea6 "jdk")
2061 ("ngs-sdk" ,ngs-sdk)))
2062 (synopsis "Java bindings for NGS SDK")))
2064 (define-public ncbi-vdb
2072 (string-append "https://github.com/ncbi/ncbi-vdb/archive/"
2074 (file-name (string-append name "-" version ".tar.gz"))
2077 "1cj8nk6if8sqagv20vx36v566fdvhcaadf0x1ycnbgql6chbs6vy"))))
2078 (build-system gnu-build-system)
2080 `(#:parallel-build? #f ; not supported
2081 #:tests? #f ; no "check" target
2085 (lambda* (#:key inputs outputs #:allow-other-keys)
2086 (let ((out (assoc-ref outputs "out")))
2087 ;; Only replace the version suffix, not the version number in the
2088 ;; directory name; fixed in commit 4dbba5c6a809 (no release yet).
2089 (substitute* "setup/konfigure.perl"
2090 (((string-append "\\$\\(subst "
2091 "(\\$\\(VERSION[^\\)]*\\)),"
2092 "(\\$\\([^\\)]+\\)),"
2093 "(\\$\\([^\\)]+\\)|\\$\\@)"
2095 _ pattern replacement target)
2096 (string-append "$(patsubst "
2101 ;; Override include path for libmagic
2102 (substitute* "setup/package.prl"
2103 (("name => 'magic', Include => '/usr/include'")
2104 (string-append "name=> 'magic', Include => '"
2105 (assoc-ref inputs "libmagic")
2108 ;; Install kdf5 library (needed by sra-tools)
2109 (substitute* "build/Makefile.install"
2110 (("LIBRARIES_TO_INSTALL =")
2111 "LIBRARIES_TO_INSTALL = kdf5.$(VERSION_LIBX) kdf5.$(VERSION_SHLX)"))
2113 ;; The 'configure' script doesn't recognize things like
2114 ;; '--enable-fast-install'.
2117 (string-append "--build-prefix=" (getcwd) "/build")
2118 (string-append "--prefix=" (assoc-ref outputs "out"))
2119 (string-append "--debug")
2120 (string-append "--with-xml2-prefix="
2121 (assoc-ref inputs "libxml2"))
2122 (string-append "--with-ngs-sdk-prefix="
2123 (assoc-ref inputs "ngs-sdk"))
2124 (string-append "--with-ngs-java-prefix="
2125 (assoc-ref inputs "ngs-java"))
2126 (string-append "--with-hdf5-prefix="
2127 (assoc-ref inputs "hdf5"))))))
2129 'install 'install-interfaces
2130 (lambda* (#:key outputs #:allow-other-keys)
2131 ;; Install interface libraries. On i686 the interface libraries
2132 ;; are installed to "linux/gcc/i386", so we need to use the Linux
2133 ;; architecture name ("i386") instead of the target system prefix
2135 (mkdir (string-append (assoc-ref outputs "out") "/ilib"))
2136 (copy-recursively (string-append "build/ncbi-vdb/linux/gcc/"
2137 ,(system->linux-architecture
2138 (or (%current-target-system)
2141 (string-append (assoc-ref outputs "out")
2143 ;; Install interface headers
2144 (copy-recursively "interfaces"
2145 (string-append (assoc-ref outputs "out")
2147 %standard-phases))))
2149 `(("libxml2" ,libxml2)
2150 ("ngs-sdk" ,ngs-sdk)
2151 ("ngs-java" ,ngs-java)
2154 (native-inputs `(("perl" ,perl)))
2155 (home-page "https://github.com/ncbi/ncbi-vdb")
2156 (synopsis "Database engine for genetic information")
2158 "The NCBI-VDB library implements a highly compressed columnar data
2159 warehousing engine that is most often used to store genetic information.
2160 Databases are stored in a portable image within the file system, and can be
2161 accessed/downloaded on demand across HTTP.")
2162 (license license:public-domain)))
2164 (define-public plink
2172 "http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-"
2173 version "-src.zip"))
2175 (base32 "0as8gxm4pjyc8dxmm1sl873rrd7wn5qs0l29nqfnl31x8i467xaa"))
2176 (patches (list (search-patch "plink-1.07-unclobber-i.patch")))))
2177 (build-system gnu-build-system)
2179 '(#:tests? #f ;no "check" target
2180 #:make-flags (list (string-append "LIB_LAPACK="
2181 (assoc-ref %build-inputs "lapack")
2182 "/lib/liblapack.so")
2185 ;; disable phoning home
2188 (modify-phases %standard-phases
2189 ;; no "configure" script
2192 (lambda* (#:key outputs #:allow-other-keys)
2193 (let ((bin (string-append (assoc-ref outputs "out")
2196 (copy-file "plink" (string-append bin "plink"))
2200 ("lapack" ,lapack)))
2202 `(("unzip" ,unzip)))
2203 (home-page "http://pngu.mgh.harvard.edu/~purcell/plink/")
2204 (synopsis "Whole genome association analysis toolset")
2206 "PLINK is a whole genome association analysis toolset, designed to
2207 perform a range of basic, large-scale analyses in a computationally efficient
2208 manner. The focus of PLINK is purely on analysis of genotype/phenotype data,
2209 so there is no support for steps prior to this (e.g. study design and
2210 planning, generating genotype or CNV calls from raw data). Through
2211 integration with gPLINK and Haploview, there is some support for the
2212 subsequent visualization, annotation and storage of results.")
2213 ;; Code is released under GPLv2, except for fisher.h, which is under
2215 (license (list license:gpl2 license:lgpl2.1+))))
2217 (define-public preseq
2224 (string-append "http://smithlabresearch.org/downloads/preseq-"
2225 version ".tar.bz2"))
2227 (base32 "0r7sw07p6nv8ygvc17gd78lisbw5336v3vhs86b5wv8mw3pwqksc"))
2228 (patches (list (search-patch "preseq-1.0.2-install-to-PREFIX.patch")
2229 (search-patch "preseq-1.0.2-link-with-libbam.patch")))
2230 (modules '((guix build utils)))
2232 ;; Remove bundled samtools.
2233 '(delete-file-recursively "preseq-master/samtools"))))
2234 (build-system gnu-build-system)
2236 `(#:tests? #f ;no "check" target
2238 (modify-phases %standard-phases
2242 (chdir "preseq-master")
2245 'enter-dir 'use-samtools-headers
2247 (substitute* '("smithlab_cpp/SAM.cpp"
2248 "smithlab_cpp/SAM.hpp")
2249 (("sam.h") "samtools/sam.h"))
2251 (delete 'configure))
2252 #:make-flags (list (string-append "PREFIX="
2253 (assoc-ref %outputs "out"))
2254 (string-append "LIBBAM="
2255 (assoc-ref %build-inputs "samtools")
2259 ("samtools" ,samtools-0.1)
2261 (home-page "http://smithlabresearch.org/software/preseq/")
2262 (synopsis "Program for analyzing library complexity")
2264 "The preseq package is aimed at predicting and estimating the complexity
2265 of a genomic sequencing library, equivalent to predicting and estimating the
2266 number of redundant reads from a given sequencing depth and how many will be
2267 expected from additional sequencing using an initial sequencing experiment.
2268 The estimates can then be used to examine the utility of further sequencing,
2269 optimize the sequencing depth, or to screen multiple libraries to avoid low
2270 complexity samples.")
2271 (license license:gpl3+)))
2273 (define-public sra-tools
2281 (string-append "https://github.com/ncbi/sra-tools/archive/"
2283 (file-name (string-append name "-" version ".tar.gz"))
2286 "11nrnvz7a012f4iryf0wiwrid0h111grsfxbxa9j51h3f2xbvgns"))))
2287 (build-system gnu-build-system)
2289 `(#:parallel-build? #f ; not supported
2290 #:tests? #f ; no "check" target
2294 (lambda* (#:key inputs outputs #:allow-other-keys)
2295 ;; The build system expects a directory containing the sources and
2296 ;; raw build output of ncbi-vdb, including files that are not
2297 ;; installed. Since we are building against an installed version of
2298 ;; ncbi-vdb, the following modifications are needed.
2299 (substitute* "setup/konfigure.perl"
2300 ;; Make the configure script look for the "ilib" directory of
2301 ;; "ncbi-vdb" without first checking for the existence of a
2302 ;; matching library in its "lib" directory.
2303 (("^ my \\$f = File::Spec->catdir\\(\\$libdir, \\$lib\\);")
2304 "my $f = File::Spec->catdir($ilibdir, $ilib);")
2305 ;; Look for interface libraries in ncbi-vdb's "ilib" directory.
2306 (("my \\$ilibdir = File::Spec->catdir\\(\\$builddir, 'ilib'\\);")
2307 "my $ilibdir = File::Spec->catdir($dir, 'ilib');"))
2309 ;; The 'configure' script doesn't recognize things like
2310 ;; '--enable-fast-install'.
2313 (string-append "--build-prefix=" (getcwd) "/build")
2314 (string-append "--prefix=" (assoc-ref outputs "out"))
2315 (string-append "--debug")
2316 (string-append "--with-fuse-prefix="
2317 (assoc-ref inputs "fuse"))
2318 (string-append "--with-magic-prefix="
2319 (assoc-ref inputs "libmagic"))
2320 ;; TODO: building with libxml2 fails with linker errors
2321 ;; (string-append "--with-xml2-prefix="
2322 ;; (assoc-ref inputs "libxml2"))
2323 (string-append "--with-ncbi-vdb-sources="
2324 (assoc-ref inputs "ncbi-vdb"))
2325 (string-append "--with-ncbi-vdb-build="
2326 (assoc-ref inputs "ncbi-vdb"))
2327 (string-append "--with-ngs-sdk-prefix="
2328 (assoc-ref inputs "ngs-sdk"))
2329 (string-append "--with-hdf5-prefix="
2330 (assoc-ref inputs "hdf5")))))
2332 (native-inputs `(("perl" ,perl)))
2334 `(("ngs-sdk" ,ngs-sdk)
2335 ("ncbi-vdb" ,ncbi-vdb)
2340 (home-page "http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software")
2341 (synopsis "Tools and libraries for reading and writing sequencing data")
2343 "The SRA Toolkit from NCBI is a collection of tools and libraries for
2344 reading of sequencing files from the Sequence Read Archive (SRA) database and
2345 writing files into the .sra format.")
2346 (license license:public-domain)))
2348 (define-public seqan
2354 (uri (string-append "http://packages.seqan.de/seqan-library/"
2355 "seqan-library-" version ".tar.bz2"))
2358 "05s3wrrwn50f81aklfm65i4a749zag1vr8z03k21xm0pdxy47yvp"))))
2359 ;; The documentation is 7.8MB and the includes are 3.6MB heavy, so it
2360 ;; makes sense to split the outputs.
2361 (outputs '("out" "doc"))
2362 (build-system trivial-build-system)
2364 `(#:modules ((guix build utils))
2367 (use-modules (guix build utils))
2368 (let ((tar (assoc-ref %build-inputs "tar"))
2369 (bzip (assoc-ref %build-inputs "bzip2"))
2370 (out (assoc-ref %outputs "out"))
2371 (doc (assoc-ref %outputs "doc")))
2372 (setenv "PATH" (string-append tar "/bin:" bzip "/bin"))
2373 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
2374 (chdir (string-append "seqan-library-" ,version))
2375 (copy-recursively "include" (string-append out "/include"))
2376 (copy-recursively "share" (string-append doc "/share"))))))
2378 `(("source" ,source)
2381 (home-page "http://www.seqan.de")
2382 (synopsis "Library for nucleotide sequence analysis")
2384 "SeqAn is a C++ library of efficient algorithms and data structures for
2385 the analysis of sequences with the focus on biological data. It contains
2386 algorithms and data structures for string representation and their
2387 manipulation, online and indexed string search, efficient I/O of
2388 bioinformatics file formats, sequence alignment, and more.")
2389 (license license:bsd-3)))
2398 "https://github.com/alexdobin/STAR/archive/STAR_"
2402 "1c3rnm7r5l0kl3d04gl1g7938xqf1c2l0mla87rlplqg1hcns5mc"))
2403 (modules '((guix build utils)))
2405 '(substitute* "source/Makefile"
2406 (("/bin/rm") "rm")))))
2407 (build-system gnu-build-system)
2409 '(#:tests? #f ;no check target
2410 #:make-flags '("STAR")
2413 'unpack 'enter-source-dir (lambda _ (chdir "source"))
2416 (lambda* (#:key outputs #:allow-other-keys)
2417 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
2419 (copy-file "STAR" (string-append bin "STAR"))))
2421 'configure %standard-phases)))))
2423 `(("vim" ,vim))) ; for xxd
2426 (home-page "https://github.com/alexdobin/STAR")
2427 (synopsis "Universal RNA-seq aligner")
2429 "The Spliced Transcripts Alignment to a Reference (STAR) software is
2430 based on a previously undescribed RNA-seq alignment algorithm that uses
2431 sequential maximum mappable seed search in uncompressed suffix arrays followed
2432 by seed clustering and stitching procedure. In addition to unbiased de novo
2433 detection of canonical junctions, STAR can discover non-canonical splices and
2434 chimeric (fusion) transcripts, and is also capable of mapping full-length RNA
2436 ;; STAR is licensed under GPLv3 or later; htslib is MIT-licensed.
2437 (license license:gpl3+)))
2439 (define-public subread
2442 (version "1.4.6-p2")
2446 "mirror://sourceforge/subread/subread-"
2447 version "-source.tar.gz"))
2450 "06sv9mpcsdj6p68y15d6gi70lca3lxmzk0dn61hg0kfsa7rxmsr3"))))
2451 (build-system gnu-build-system)
2453 `(#:tests? #f ;no "check" target
2454 #:make-flags '("-f" "Makefile.Linux")
2458 (lambda _ (chdir "src") #t)
2461 (lambda* (#:key outputs #:allow-other-keys)
2462 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
2464 (copy-recursively "../bin" bin)))
2465 ;; no "configure" script
2466 (alist-delete 'configure %standard-phases)))))
2467 (inputs `(("zlib" ,zlib)))
2468 (home-page "http://bioinf.wehi.edu.au/subread-package/")
2469 (synopsis "Tool kit for processing next-gen sequencing data")
2471 "The subread package contains the following tools: subread aligner, a
2472 general-purpose read aligner; subjunc aligner: detecting exon-exon junctions
2473 and mapping RNA-seq reads; featureCounts: counting mapped reads for genomic
2474 features; exactSNP: a SNP caller that discovers SNPs by testing signals
2475 against local background noises.")
2476 (license license:gpl3+)))
2478 (define-public shogun
2486 "ftp://shogun-toolbox.org/shogun/releases/"
2487 (version-major+minor version)
2488 "/sources/shogun-" version ".tar.bz2"))
2491 "159nlijnb7mnrv9za80wnm1shwvy45hgrqzn51hxy7gw4z6d6fdb"))
2492 (modules '((guix build utils)
2496 ;; Remove non-free sources and files referencing them
2497 (for-each delete-file
2498 (find-files "src/shogun/classifier/svm/"
2499 "SVMLight\\.(cpp|h)"))
2500 (for-each delete-file
2501 (find-files "examples/undocumented/libshogun/"
2503 "(classifier_.*svmlight.*|"
2504 "evaluation_cross_validation_locked_comparison).cpp")))
2505 ;; Remove non-free functions.
2506 (define (delete-ifdefs file)
2507 (with-atomic-file-replacement file
2509 (let loop ((line (read-line in 'concat))
2511 (if (eof-object? line)
2515 (not (string-prefix?
2516 "#endif //USE_SVMLIGHT" line)))
2518 "#ifdef USE_SVMLIGHT" line))))
2519 (when (or (not skipping?)
2520 (and skipping? (not skip-next?)))
2522 (loop (read-line in 'concat) skip-next?)))))))
2523 (for-each delete-ifdefs (find-files "src/shogun/kernel/"
2524 "^Kernel\\.(cpp|h)"))))))
2525 (build-system cmake-build-system)
2527 '(#:tests? #f ;no check target
2530 'unpack 'delete-broken-symlinks
2532 (for-each delete-file '("applications/arts/data"
2533 "applications/asp/data"
2534 "applications/easysvm/data"
2535 "applications/msplicer/data"
2536 "applications/ocr/data"
2537 "examples/documented/data"
2538 "examples/documented/matlab_static"
2539 "examples/documented/octave_static"
2540 "examples/undocumented/data"
2541 "examples/undocumented/matlab_static"
2542 "examples/undocumented/octave_static"
2543 "tests/integration/data"
2544 "tests/integration/matlab_static"
2545 "tests/integration/octave_static"
2546 "tests/integration/python_modular/tests"))
2549 'unpack 'change-R-target-path
2550 (lambda* (#:key outputs #:allow-other-keys)
2551 (substitute* '("src/interfaces/r_modular/CMakeLists.txt"
2552 "src/interfaces/r_static/CMakeLists.txt"
2553 "examples/undocumented/r_modular/CMakeLists.txt")
2554 (("\\$\\{R_COMPONENT_LIB_PATH\\}")
2555 (string-append (assoc-ref outputs "out")
2556 "/lib/R/library/")))
2559 'unpack 'fix-octave-modules
2560 (lambda* (#:key outputs #:allow-other-keys)
2561 (substitute* '("src/interfaces/octave_modular/CMakeLists.txt"
2562 "src/interfaces/octave_static/CMakeLists.txt")
2563 (("^include_directories\\(\\$\\{OCTAVE_INCLUDE_DIRS\\}")
2564 "include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLUDE_DIRS}/octave"))
2566 ;; change target directory
2567 (substitute* "src/interfaces/octave_modular/CMakeLists.txt"
2568 (("\\$\\{OCTAVE_OCT_LOCAL_API_FILE_DIR\\}")
2569 (string-append (assoc-ref outputs "out")
2570 "/share/octave/packages")))
2574 ;; $HOME needs to be set at some point during the build phase
2575 (lambda _ (setenv "HOME" "/tmp") #t)
2576 %standard-phases))))
2578 (list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
2579 "-DUSE_SVMLIGHT=OFF" ;disable proprietary SVMLIGHT
2580 ;;"-DJavaModular=ON" ;requires unpackaged jblas
2581 ;;"-DRubyModular=ON" ;requires unpackaged ruby-narray
2582 ;;"-DPerlModular=ON" ;"FindPerlLibs" does not exist
2583 ;;"-DLuaModular=ON" ;fails because lua doesn't build pkgconfig file
2584 "-DOctaveModular=ON"
2586 "-DPythonModular=ON"
2590 "-DCmdLineStatic=ON")))
2592 `(("python" ,python)
2593 ("numpy" ,python-numpy)
2599 ("arpack" ,arpack-ng)
2602 ("libxml2" ,libxml2)
2606 `(("pkg-config" ,pkg-config)))
2607 (home-page "http://shogun-toolbox.org/")
2608 (synopsis "Machine learning toolbox")
2610 "The Shogun Machine learning toolbox provides a wide range of unified and
2611 efficient Machine Learning (ML) methods. The toolbox seamlessly allows to
2612 combine multiple data representations, algorithm classes, and general purpose
2613 tools. This enables both rapid prototyping of data pipelines and extensibility
2614 in terms of new algorithms.")
2615 (license license:gpl3+)))
2617 (define-public vcftools
2624 "mirror://sourceforge/vcftools/vcftools_"
2628 "148al9h7f8g8my2qdnpax51kdd2yjrivlx6frvakf4lz5r8j88wx"))))
2629 (build-system gnu-build-system)
2631 `(#:tests? #f ; no "check" target
2633 "CFLAGS=-O2" ; override "-m64" flag
2634 (string-append "PREFIX=" (assoc-ref %outputs "out"))
2635 (string-append "MANDIR=" (assoc-ref %outputs "out")
2639 'unpack 'patch-manpage-install
2641 (substitute* "Makefile"
2642 (("cp \\$\\{PREFIX\\}/cpp/vcftools.1") "cp ./cpp/vcftools.1")))
2643 (alist-delete 'configure %standard-phases))))
2647 (home-page "http://vcftools.sourceforge.net/")
2648 (synopsis "Tools for working with VCF files")
2650 "VCFtools is a program package designed for working with VCF files, such
2651 as those generated by the 1000 Genomes Project. The aim of VCFtools is to
2652 provide easily accessible methods for working with complex genetic variation
2653 data in the form of VCF files.")
2654 ;; The license is declared as LGPLv3 in the README and
2655 ;; at http://vcftools.sourceforge.net/license.html
2656 (license license:lgpl3)))