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 bamtools
64 "https://github.com/pezmaster31/bamtools/archive/v"
66 (file-name (string-append name "-" version ".tar.gz"))
69 "1brry29bw2xr2l9pqn240rkqwayg85b8qq78zk2zs6nlspk4d018"))))
70 (build-system cmake-build-system)
72 `(#:tests? #f ;no "check" target
74 (modify-phases %standard-phases
76 'configure 'set-ldflags
77 (lambda* (#:key outputs #:allow-other-keys)
81 (assoc-ref outputs "out") "/lib/bamtools")))))))
82 (inputs `(("zlib" ,zlib)))
83 (home-page "https://github.com/pezmaster31/bamtools")
84 (synopsis "C++ API and command-line toolkit for working with BAM data")
86 "BamTools provides both a C++ API and a command-line toolkit for handling
88 (license license:expat)))
96 (uri (string-append "https://github.com/bedops/bedops/archive/v"
98 (file-name (string-append name "-" version ".tar.gz"))
101 "1kqbac547wyqma81cyky9n7mkgikjpsfd3nnmcm6hpqwanqgh10v"))))
102 (build-system gnu-build-system)
105 #:make-flags (list (string-append "BINDIR=" %output "/bin"))
108 'unpack 'unpack-tarballs
110 ;; FIXME: Bedops includes tarballs of minimally patched upstream
111 ;; libraries jansson, zlib, and bzip2. We cannot just use stock
112 ;; libraries because at least one of the libraries (zlib) is
113 ;; patched to add a C++ function definition (deflateInit2cpp).
114 ;; Until the Bedops developers offer a way to link against system
115 ;; libraries we have to build the in-tree copies of these three
118 ;; See upstream discussion:
119 ;; https://github.com/bedops/bedops/issues/124
121 ;; Unpack the tarballs to benefit from shebang patching.
122 (with-directory-excursion "third-party"
123 (and (zero? (system* "tar" "xvf" "jansson-2.6.tar.bz2"))
124 (zero? (system* "tar" "xvf" "zlib-1.2.7.tar.bz2"))
125 (zero? (system* "tar" "xvf" "bzip2-1.0.6.tar.bz2"))))
126 ;; Disable unpacking of tarballs in Makefile.
127 (substitute* "system.mk/Makefile.linux"
128 (("^\tbzcat .*") "\t@echo \"not unpacking\"\n")
129 (("\\./configure") "CONFIG_SHELL=bash ./configure"))
130 (substitute* "third-party/zlib-1.2.7/Makefile.in"
131 (("^SHELL=.*$") "SHELL=bash\n")))
132 (alist-delete 'configure %standard-phases))))
133 (home-page "https://github.com/bedops/bedops")
134 (synopsis "Tools for high-performance genomic feature operations")
136 "BEDOPS is a suite of tools to address common questions raised in genomic
137 studies---mostly with regard to overlap and proximity relationships between
138 data sets. It aims to be scalable and flexible, facilitating the efficient
139 and accurate analysis and management of large-scale genomic data.
141 BEDOPS provides tools that perform highly efficient and scalable Boolean and
142 other set operations, statistical calculations, archiving, conversion and
143 other management of genomic data of arbitrary scale. Tasks can be easily
144 split by chromosome for distributing whole-genome analyses across a
145 computational cluster.")
146 (license license:gpl2+)))
148 (define-public bedtools
154 (uri (string-append "https://github.com/arq5x/bedtools2/archive/v"
156 (file-name (string-append name "-" version ".tar.gz"))
159 "16aq0w3dmbd0853j32xk9jin4vb6v6fgakfyvrsmsjizzbn3fpfl"))))
160 (build-system gnu-build-system)
161 (native-inputs `(("python" ,python-2)))
162 (inputs `(("samtools" ,samtools)
165 '(#:test-target "test"
168 'unpack 'patch-makefile-SHELL-definition
170 ;; patch-makefile-SHELL cannot be used here as it does not
171 ;; yet patch definitions with `:='. Since changes to
172 ;; patch-makefile-SHELL result in a full rebuild, features
173 ;; of patch-makefile-SHELL are reimplemented here.
174 (substitute* "Makefile"
175 (("^SHELL := .*$") (string-append "SHELL := " (which "bash") " -e \n"))))
180 (lambda* (#:key outputs #:allow-other-keys)
181 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
183 (for-each (lambda (file)
184 (copy-file file (string-append bin (basename file))))
185 (find-files "bin" ".*"))))
186 %standard-phases)))))
187 (home-page "https://github.com/arq5x/bedtools2")
188 (synopsis "Tools for genome analysis and arithmetic")
190 "Collectively, the bedtools utilities are a swiss-army knife of tools for
191 a wide-range of genomics analysis tasks. The most widely-used tools enable
192 genome arithmetic: that is, set theory on the genome. For example, bedtools
193 allows one to intersect, merge, count, complement, and shuffle genomic
194 intervals from multiple files in widely-used genomic file formats such as BAM,
196 (license license:gpl2)))
198 (define-public python2-pybedtools
200 (name "python2-pybedtools")
205 "https://pypi.python.org/packages/source/p/pybedtools/pybedtools-"
209 "1ldzdxw1p4y3g2ignmggsdypvqkcwqwzhdha4rbgpih048z5p4an"))))
210 (build-system python-build-system)
211 (arguments `(#:python ,python-2)) ; no Python 3 support
213 `(("python-cython" ,python2-cython)
214 ("python-matplotlib" ,python2-matplotlib)))
216 `(("bedtools" ,bedtools)
217 ("samtools" ,samtools)))
219 `(("python-pyyaml" ,python2-pyyaml)
220 ("python-nose" ,python2-nose)
221 ("python-setuptools" ,python2-setuptools)))
222 (home-page "https://pythonhosted.org/pybedtools/")
223 (synopsis "Python wrapper for BEDtools programs")
225 "pybedtools is a Python wrapper for Aaron Quinlan's BEDtools programs,
226 which are widely used for genomic interval manipulation or \"genome algebra\".
227 pybedtools extends BEDTools by offering feature-level manipulations from with
229 (license license:gpl2+)))
231 (define-public python-biopython
233 (name "python-biopython")
238 "http://biopython.org/DIST/biopython-"
242 "13m8s9jkrw40zvdp1rl709n6lmgdh4f52aann7gzr6sfp0fwhg26"))))
243 (build-system python-build-system)
245 `(("python-numpy" ,python-numpy)))
247 `(("python-setuptools" ,python2-setuptools)))
248 (home-page "http://biopython.org/")
249 (synopsis "Tools for biological computation in Python")
251 "Biopython is a set of tools for biological computation including parsers
252 for bioinformatics files into Python data structures; interfaces to common
253 bioinformatics programs; a standard sequence class and tools for performing
254 common operations on them; code to perform data classification; code for
255 dealing with alignments; code making it easy to split up parallelizable tasks
256 into separate processes; and more.")
257 (license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE"))))
259 (define-public python2-biopython
260 (package (inherit (package-with-python2 python-biopython))
262 `(("python2-numpy" ,python2-numpy)))))
264 (define-public blast+
271 "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/"
272 version "/ncbi-blast-" version "+-src.tar.gz"))
275 "19gq6as4k1jrgsd26158ads6h7v4jca3h4r5dzg1y0m6ya50x5ph"))
276 (modules '((guix build utils)))
279 ;; Remove bundled bzip2 and zlib
280 (delete-file-recursively "c++/src/util/compress/bzip2")
281 (delete-file-recursively "c++/src/util/compress/zlib")
282 (substitute* "c++/src/util/compress/Makefile.in"
283 (("bzip2 zlib api") "api"))
284 ;; Remove useless msbuild directory
285 (delete-file-recursively
286 "c++/src/build-system/project_tree_builder/msbuild")
288 (build-system gnu-build-system)
290 `(;; There are three(!) tests for this massive library, and all fail with
291 ;; "unparsable timing stats".
292 ;; ERR [127] -- [util/regexp] test_pcre.sh (unparsable timing stats)
293 ;; ERR [127] -- [serial/datatool] datatool.sh (unparsable timing stats)
294 ;; ERR [127] -- [serial/datatool] datatool_xml.sh (unparsable timing stats)
297 #:parallel-build? #f ; not supported
299 (modify-phases %standard-phases
302 ;; $HOME needs to be set at some point during the configure phase
303 (lambda _ (setenv "HOME" "/tmp") #t))
306 (lambda _ (chdir "c++") #t))
308 'enter-dir 'fix-build-system
311 (cond ((string=? cmd "date")
312 ;; make call to "date" deterministic
317 (format (current-error-port)
318 "WARNING: Unable to find absolute path for ~s~%"
322 ;; Rewrite hardcoded paths to various tools
323 (substitute* (append '("src/build-system/configure.ac"
324 "src/build-system/configure"
325 "scripts/common/impl/if_diff.sh"
326 "scripts/common/impl/run_with_lock.sh"
327 "src/build-system/Makefile.configurables.real"
328 "src/build-system/Makefile.in.top"
329 "src/build-system/Makefile.meta.gmake=no"
330 "src/build-system/Makefile.meta.in"
331 "src/build-system/Makefile.meta_l"
332 "src/build-system/Makefile.meta_p"
333 "src/build-system/Makefile.meta_r"
334 "src/build-system/Makefile.mk.in"
335 "src/build-system/Makefile.requirements"
336 "src/build-system/Makefile.rules_with_autodep.in")
337 (find-files "scripts/common/check" "\\.sh$"))
338 (("(/usr/bin/|/bin/)([a-z][-_.a-z]*)" all dir cmd)
339 (or (which* cmd) all)))
341 (substitute* (find-files "src/build-system" "^config.*")
342 (("LN_S=/bin/\\$LN_S") (string-append "LN_S=" (which "ln")))
345 ;; rewrite "/var/tmp" in check script
346 (substitute* "scripts/common/check/check_make_unix.sh"
347 (("/var/tmp") "/tmp"))
350 (substitute* (find-files "scripts/common/impl/" "\\.sh$")
352 (("action=/bin/") "action=")
353 (("export PATH") ":"))
357 (lambda* (#:key inputs outputs #:allow-other-keys)
358 (let ((out (assoc-ref outputs "out"))
359 (lib (string-append (assoc-ref outputs "lib") "/lib"))
360 (include (string-append (assoc-ref outputs "include")
361 "/include/ncbi-tools++")))
362 ;; The 'configure' script doesn't recognize things like
363 ;; '--enable-fast-install'.
364 (zero? (system* "./configure.orig"
365 (string-append "--with-build-root=" (getcwd) "/build")
366 (string-append "--prefix=" out)
367 (string-append "--libdir=" lib)
368 (string-append "--includedir=" include)
369 (string-append "--with-bz2="
370 (assoc-ref inputs "bzip2"))
371 (string-append "--with-z="
372 (assoc-ref inputs "zlib"))
373 ;; Each library is built twice by default, once
374 ;; with "-static" in its name, and again
378 (outputs '("out" ; 19 MB
386 (home-page "http://blast.ncbi.nlm.nih.gov")
387 (synopsis "Basic local alignment search tool")
389 "BLAST is a popular method of performing a DNA or protein sequence
390 similarity search, using heuristics to produce results quickly. It also
391 calculates an “expect value” that estimates how many matches would have
392 occurred at a given score by chance, which can aid a user in judging how much
393 confidence to have in an alignment.")
394 ;; Most of the sources are in the public domain, with the following
397 ;; * ./c++/include/util/bitset/
398 ;; * ./c++/src/html/ncbi_menu*.js
400 ;; * ./c++/include/util/impl/floating_point_comparison.hpp
402 ;; * ./c++/include/dbapi/driver/odbc/unix_odbc/
404 ;; * ./c++/src/corelib/teamcity_*
405 (license (list license:public-domain
411 (define-public bowtie
417 (uri (string-append "https://github.com/BenLangmead/bowtie2/archive/v"
419 (file-name (string-append name "-" version ".tar.gz"))
422 "15dnbqippwvhyh9zqjhaxkabk7lm1xbh1nvar1x4b5kwm117zijn"))
423 (modules '((guix build utils)))
425 '(substitute* "Makefile"
426 (("^CC = .*$") "CC = gcc")
427 (("^CPP = .*$") "CPP = g++")
428 ;; replace BUILD_HOST and BUILD_TIME for deterministic build
429 (("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
430 (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\"")))
431 (patches (list (search-patch "bowtie-fix-makefile.patch")))))
432 (build-system gnu-build-system)
433 (inputs `(("perl" ,perl)
434 ("perl-clone" ,perl-clone)
435 ("perl-test-deep" ,perl-test-deep)
436 ("perl-test-simple" ,perl-test-simple)
437 ("python" ,python-2)))
439 '(#:make-flags '("allall")
445 (lambda* (#:key outputs #:allow-other-keys)
446 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
448 (for-each (lambda (file)
449 (copy-file file (string-append bin file)))
450 (find-files "." "bowtie2.*"))))
453 (lambda* (#:key outputs #:allow-other-keys)
455 "scripts/test/simple_tests.pl"
456 "--bowtie2=./bowtie2"
457 "--bowtie2-build=./bowtie2-build"))
458 %standard-phases)))))
459 (home-page "http://bowtie-bio.sourceforge.net/bowtie2/index.shtml")
460 (synopsis "Fast and sensitive nucleotide sequence read aligner")
462 "Bowtie 2 is a fast and memory-efficient tool for aligning sequencing
463 reads to long reference sequences. It is particularly good at aligning reads
464 of about 50 up to 100s or 1,000s of characters, and particularly good at
465 aligning to relatively long (e.g. mammalian) genomes. Bowtie 2 indexes the
466 genome with an FM Index to keep its memory footprint small: for the human
467 genome, its memory footprint is typically around 3.2 GB. Bowtie 2 supports
468 gapped, local, and paired-end alignment modes.")
469 (supported-systems '("x86_64-linux"))
470 (license license:gpl3+)))
478 (uri (string-append "mirror://sourceforge/bio-bwa/bwa-"
482 "1330dpqncv0px3pbhjzz1gwgg39kkcv2r9qp2xs0sixf8z8wl7bh"))))
483 (build-system gnu-build-system)
485 '(#:tests? #f ;no "check" target
489 (lambda* (#:key outputs #:allow-other-keys)
490 (let ((bin (string-append
491 (assoc-ref outputs "out") "/bin"))
493 (assoc-ref outputs "out") "/share/doc/bwa"))
495 (assoc-ref outputs "out") "/share/man/man1")))
499 (copy-file "bwa" (string-append bin "/bwa"))
500 (copy-file "README.md" (string-append doc "/README.md"))
501 (copy-file "bwa.1" (string-append man "/bwa.1"))))
502 ;; no "configure" script
503 (alist-delete 'configure %standard-phases))))
504 (inputs `(("zlib" ,zlib)))
505 (home-page "http://bio-bwa.sourceforge.net/")
506 (synopsis "Burrows-Wheeler sequence aligner")
508 "BWA is a software package for mapping low-divergent sequences against a
509 large reference genome, such as the human genome. It consists of three
510 algorithms: BWA-backtrack, BWA-SW and BWA-MEM. The first algorithm is
511 designed for Illumina sequence reads up to 100bp, while the rest two for
512 longer sequences ranged from 70bp to 1Mbp. BWA-MEM and BWA-SW share similar
513 features such as long-read support and split alignment, but BWA-MEM, which is
514 the latest, is generally recommended for high-quality queries as it is faster
515 and more accurate. BWA-MEM also has better performance than BWA-backtrack for
516 70-100bp Illumina reads.")
517 (license license:gpl3+)))
519 (define-public python2-bx-python
521 (name "python2-bx-python")
526 "https://pypi.python.org/packages/source/b/bx-python/bx-python-"
530 "0ld49idhc5zjdvbhvjq1a2qmpjj7h5v58rqr25dzmfq7g34b50xh"))
531 (modules '((guix build utils)))
533 '(substitute* "setup.py"
534 ;; remove dependency on outdated "distribute" module
535 (("^from distribute_setup import use_setuptools") "")
536 (("^use_setuptools\\(\\)") "")))))
537 (build-system python-build-system)
539 `(#:tests? #f ;tests fail because test data are not included
542 `(("python-numpy" ,python2-numpy)
545 `(("python-nose" ,python2-nose)
546 ("python-setuptools" ,python2-setuptools)))
547 (home-page "http://bitbucket.org/james_taylor/bx-python/")
548 (synopsis "Tools for manipulating biological data")
550 "bx-python provides tools for manipulating biological data, particularly
551 multiple sequence alignments.")
552 (license license:expat)))
554 (define-public clipper
561 "https://github.com/YeoLab/clipper/archive/"
565 "1q7jpimsqln7ic44i8v2rx2haj5wvik8hc1s2syd31zcn0xk1iyq"))
566 (modules '((guix build utils)))
568 ;; remove unnecessary setup dependency
569 '(substitute* "setup.py"
570 (("setup_requires = .*") "")))))
571 (build-system python-build-system)
572 (arguments `(#:python ,python-2)) ; only Python 2 is supported
575 ("python-pybedtools" ,python2-pybedtools)
576 ("python-cython" ,python2-cython)
577 ("python-scikit-learn" ,python2-scikit-learn)
578 ("python-matplotlib" ,python2-matplotlib)
579 ("python-pysam" ,python2-pysam)
580 ("python-numpy" ,python2-numpy)
581 ("python-scipy" ,python2-scipy)))
583 `(("python-mock" ,python2-mock) ; for tests
584 ("python-pytz" ,python2-pytz) ; for tests
585 ("python-setuptools" ,python2-setuptools)))
586 (home-page "https://github.com/YeoLab/clipper")
587 (synopsis "CLIP peak enrichment recognition")
589 "CLIPper is a tool to define peaks in CLIP-seq datasets.")
590 (license license:gpl2)))
592 (define-public couger
599 "http://couger.oit.duke.edu/static/assets/COUGER"
603 "04p2b14nmhzxw5h72mpzdhalv21bx4w9b87z0wpw0xzxpysyncmq"))))
604 (build-system gnu-build-system)
608 (modify-phases %standard-phases
613 (lambda* (#:key outputs #:allow-other-keys)
614 (let ((out (assoc-ref outputs "out")))
615 (copy-recursively "src" (string-append out "/src"))
616 (mkdir (string-append out "/bin"))
617 ;; Add "src" directory to module lookup path.
618 (substitute* "couger"
620 (string-append "import sys\nsys.path.append(\""
621 out "\")\nfrom argparse")))
622 (copy-file "couger" (string-append out "/bin/couger")))
625 'install 'wrap-program
626 (lambda* (#:key inputs outputs #:allow-other-keys)
627 ;; Make sure 'couger' runs with the correct PYTHONPATH.
628 (let* ((out (assoc-ref outputs "out"))
629 (path (getenv "PYTHONPATH")))
630 (wrap-program (string-append out "/bin/couger")
631 `("PYTHONPATH" ":" prefix (,path))))
634 `(("python" ,python-2)
635 ("python2-pillow" ,python2-pillow)
636 ("python2-numpy" ,python2-numpy)
637 ("python2-scipy" ,python2-scipy)
638 ("python2-matplotlib" ,python2-matplotlib)))
642 ("randomjungle" ,randomjungle)))
645 (home-page "http://couger.oit.duke.edu")
646 (synopsis "Identify co-factors in sets of genomic regions")
648 "COUGER can be applied to any two sets of genomic regions bound by
649 paralogous TFs (e.g., regions derived from ChIP-seq experiments) to identify
650 putative co-factors that provide specificity to each TF. The framework
651 determines the genomic targets uniquely-bound by each TF, and identifies a
652 small set of co-factors that best explain the in vivo binding differences
655 COUGER uses classification algorithms (support vector machines and random
656 forests) with features that reflect the DNA binding specificities of putative
657 co-factors. The features are generated either from high-throughput TF-DNA
658 binding data (from protein binding microarray experiments), or from large
659 collections of DNA motifs.")
660 (license license:gpl3+)))
662 (define-public clustal-omega
664 (name "clustal-omega")
669 "http://www.clustal.org/omega/clustal-omega-"
673 "02ibkx0m0iwz8nscg998bh41gg251y56cgh86bvyrii5m8kjgwqf"))))
674 (build-system gnu-build-system)
676 `(("argtable" ,argtable)))
677 (home-page "http://www.clustal.org/omega/")
678 (synopsis "Multiple sequence aligner for protein and DNA/RNA")
680 "Clustal-Omega is a general purpose multiple sequence alignment (MSA)
681 program for protein and DNA/RNA. It produces high quality MSAs and is capable
682 of handling data-sets of hundreds of thousands of sequences in reasonable
684 (license license:gpl2+)))
686 (define-public crossmap
692 (uri (string-append "mirror://sourceforge/crossmap/CrossMap-"
696 "163hi5gjgij6cndxlvbkp5jjwr0k4wbm9im6d2210278q7k9kpnp"))
697 ;; patch has been sent upstream already
699 (search-patch "crossmap-allow-system-pysam.patch")))
700 (modules '((guix build utils)))
701 ;; remove bundled copy of pysam
703 '(delete-file-recursively "lib/pysam"))))
704 (build-system python-build-system)
710 (lambda _ (setenv "CROSSMAP_USE_SYSTEM_PYSAM" "1"))
713 `(("python-numpy" ,python2-numpy)
714 ("python-pysam" ,python2-pysam)
717 `(("python-cython" ,python2-cython)
718 ("python-nose" ,python2-nose)
719 ("python-setuptools" ,python2-setuptools)))
720 (home-page "http://crossmap.sourceforge.net/")
721 (synopsis "Convert genome coordinates between assemblies")
723 "CrossMap is a program for conversion of genome coordinates or annotation
724 files between different genome assemblies. It supports most commonly used
725 file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.")
726 (license license:gpl2+)))
728 (define-public cutadapt
735 "https://github.com/marcelm/cutadapt/archive/v"
737 (file-name (string-append name "-" version ".tar.gz"))
740 "161bp87y6gd6r5bmvjpn2b1k942i3fizfpa139f0jn6jv1wcp5h5"))))
741 (build-system python-build-system)
743 ;; tests must be run after install
744 `(#:phases (alist-cons-after
746 (lambda* (#:key inputs outputs #:allow-other-keys)
749 (getenv "PYTHONPATH")
750 ":" (assoc-ref outputs "out")
752 (string-take (string-take-right
753 (assoc-ref inputs "python") 5) 3)
755 (zero? (system* "nosetests" "-P" "tests")))
756 (alist-delete 'check %standard-phases))))
758 `(("python-cython" ,python-cython)
759 ("python-nose" ,python-nose)
760 ("python-setuptools" ,python-setuptools)))
761 (home-page "https://code.google.com/p/cutadapt/")
762 (synopsis "Remove adapter sequences from nucleotide sequencing reads")
764 "Cutadapt finds and removes adapter sequences, primers, poly-A tails and
765 other types of unwanted sequence from high-throughput sequencing reads.")
766 (license license:expat)))
768 (define-public diamond
775 "https://github.com/bbuchfink/diamond/archive/v"
777 (file-name (string-append name "-" version ".tar.gz"))
780 "0hfkcfv9f76h5brbyw9fyvmc0l9cmbsxrcdqk0fa9xv82zj47p15"))
782 (delete-file "bin/diamond")
784 (build-system gnu-build-system)
786 '(#:tests? #f ;no "check" target
788 (modify-phases %standard-phases
789 (add-after 'unpack 'enter-source-dir
795 (lambda* (#:key outputs #:allow-other-keys)
796 (let ((bin (string-append (assoc-ref outputs "out")
799 (copy-file "../bin/diamond"
800 (string-append bin "/diamond"))
807 (home-page "https://github.com/bbuchfink/diamond")
808 (synopsis "Accelerated BLAST compatible local sequence aligner")
810 "DIAMOND is a BLAST-compatible local aligner for mapping protein and
811 translated DNA query sequences against a protein reference database (BLASTP
812 and BLASTX alignment mode). The speedup over BLAST is up to 20,000 on short
813 reads at a typical sensitivity of 90-99% relative to BLAST depending on the
815 (license (license:non-copyleft "file://src/COPYING"
816 "See src/COPYING in the distribution."))))
818 (define-public edirect
824 ;; Note: older versions are not retained.
825 (uri "ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/edirect.zip")
828 "08afhz2ph66h8h381hl1mqyxkdi5nbvzsyj9gfw3jfbdijnpi4qj"))))
829 (build-system perl-build-system)
831 `(#:tests? #f ;no "check" target
833 (modify-phases %standard-phases
837 (lambda* (#:key outputs #:allow-other-keys)
838 (let ((target (string-append (assoc-ref outputs "out")
841 (copy-file "edirect.pl"
842 (string-append target "/edirect.pl"))
845 'install 'wrap-program
846 (lambda* (#:key inputs outputs #:allow-other-keys)
847 ;; Make sure 'edirect.pl' finds all perl inputs at runtime.
848 (let* ((out (assoc-ref outputs "out"))
849 (path (getenv "PERL5LIB")))
850 (wrap-program (string-append out "/bin/edirect.pl")
851 `("PERL5LIB" ":" prefix (,path)))))))))
853 `(("perl-html-parser" ,perl-html-parser)
854 ("perl-encode-locale" ,perl-encode-locale)
855 ("perl-file-listing" ,perl-file-listing)
856 ("perl-html-tagset" ,perl-html-tagset)
857 ("perl-html-tree" ,perl-html-tree)
858 ("perl-http-cookies" ,perl-http-cookies)
859 ("perl-http-date" ,perl-http-date)
860 ("perl-http-message" ,perl-http-message)
861 ("perl-http-negotiate" ,perl-http-negotiate)
862 ("perl-lwp-mediatypes" ,perl-lwp-mediatypes)
863 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
864 ("perl-net-http" ,perl-net-http)
865 ("perl-uri" ,perl-uri)
866 ("perl-www-robotrules" ,perl-www-robotrules)
870 (home-page "http://www.ncbi.nlm.nih.gov/books/NBK179288")
871 (synopsis "Tools for accessing the NCBI's set of databases")
873 "Entrez Direct (EDirect) is a method for accessing the National Center
874 for Biotechnology Information's (NCBI) set of interconnected
875 databases (publication, sequence, structure, gene, variation, expression,
876 etc.) from a terminal. Functions take search terms from command-line
877 arguments. Individual operations are combined to build multi-step queries.
878 Record retrieval and formatting normally complete the process.
880 EDirect also provides an argument-driven function that simplifies the
881 extraction of data from document summaries or other results that are returned
882 in structured XML format. This can eliminate the need for writing custom
883 software to answer ad hoc questions.")
884 (license license:public-domain)))
886 (define-public express
894 "http://bio.math.berkeley.edu/eXpress/downloads/express-"
895 version "/express-" version "-src.tgz"))
898 "03rczxd0gjp2l1jxcmjfmf5j94j77zqyxa6x063zsc585nj40n0c"))))
899 (build-system cmake-build-system)
901 `(#:tests? #f ;no "check" target
904 'unpack 'use-shared-boost-libs-and-set-bamtools-paths
905 (lambda* (#:key inputs #:allow-other-keys)
906 (substitute* "CMakeLists.txt"
907 (("set\\(Boost_USE_STATIC_LIBS ON\\)")
908 "set(Boost_USE_STATIC_LIBS OFF)")
909 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/bamtools/include")
910 (string-append (assoc-ref inputs "bamtools") "/include/bamtools")))
911 (substitute* "src/CMakeLists.txt"
912 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/\\.\\./bamtools/lib")
913 (string-append (assoc-ref inputs "bamtools") "/lib/bamtools")))
918 ("bamtools" ,bamtools)
919 ("protobuf" ,protobuf)
921 (home-page "http://bio.math.berkeley.edu/eXpress")
922 (synopsis "Streaming quantification for high-throughput genomic sequencing")
924 "eXpress is a streaming tool for quantifying the abundances of a set of
925 target sequences from sampled subsequences. Example applications include
926 transcript-level RNA-Seq quantification, allele-specific/haplotype expression
927 analysis (from RNA-Seq), transcription factor binding quantification in
928 ChIP-Seq, and analysis of metagenomic data.")
929 (license license:artistic2.0)))
931 (define-public fasttree
938 "http://www.microbesonline.org/fasttree/FastTree-"
942 "0dzqc9vr9iiiw21y159xfjl2z90vw0y7r4x6456pcaxiy5hd2wmi"))))
943 (build-system gnu-build-system)
945 `(#:tests? #f ; no "check" target
947 (modify-phases %standard-phases
951 (lambda* (#:key source #:allow-other-keys)
952 (and (zero? (system* "gcc"
961 (zero? (system* "gcc"
973 (lambda* (#:key outputs #:allow-other-keys)
974 (let ((bin (string-append (assoc-ref outputs "out")
977 (copy-file "FastTree"
978 (string-append bin "/FastTree"))
979 (copy-file "FastTreeMP"
980 (string-append bin "/FastTreeMP"))
982 (home-page "http://www.microbesonline.org/fasttree")
983 (synopsis "Infers approximately-maximum-likelihood phylogenetic trees")
985 "FastTree can handle alignments with up to a million of sequences in a
986 reasonable amount of time and memory. For large alignments, FastTree is
987 100-1,000 times faster than PhyML 3.0 or RAxML 7.")
988 (license license:gpl2+)))
990 (define-public fastx-toolkit
992 (name "fastx-toolkit")
998 "https://github.com/agordon/fastx_toolkit/releases/download/"
999 version "/fastx_toolkit-" version ".tar.bz2"))
1002 "01jqzw386873sr0pjp1wr4rn8fsga2vxs1qfmicvx1pjr72007wy"))))
1003 (build-system gnu-build-system)
1005 `(("libgtextutils" ,libgtextutils)))
1007 `(("pkg-config" ,pkg-config)))
1008 (home-page "http://hannonlab.cshl.edu/fastx_toolkit/")
1009 (synopsis "Tools for FASTA/FASTQ file preprocessing")
1011 "The FASTX-Toolkit is a collection of command line tools for Short-Reads
1012 FASTA/FASTQ files preprocessing.
1014 Next-Generation sequencing machines usually produce FASTA or FASTQ files,
1015 containing multiple short-reads sequences. The main processing of such
1016 FASTA/FASTQ files is mapping the sequences to reference genomes. However, it
1017 is sometimes more productive to preprocess the files before mapping the
1018 sequences to the genome---manipulating the sequences to produce better mapping
1019 results. The FASTX-Toolkit tools perform some of these preprocessing tasks.")
1020 (license license:agpl3+)))
1022 (define-public flexbar
1029 (string-append "mirror://sourceforge/flexbar/"
1030 version "/flexbar_v" version "_src.tgz"))
1033 "13jaykc3y1x8y5nn9j8ljnb79s5y51kyxz46hdmvvjj6qhyympmf"))))
1034 (build-system cmake-build-system)
1036 `(#:configure-flags (list
1037 (string-append "-DFLEXBAR_BINARY_DIR="
1038 (assoc-ref %outputs "out")
1043 (lambda* (#:key outputs #:allow-other-keys)
1044 (setenv "PATH" (string-append
1045 (assoc-ref outputs "out") "/bin:"
1047 (chdir "../flexbar_v2.5_src/test")
1048 (zero? (system* "bash" "flexbar_validate.sh")))
1049 (alist-delete 'install %standard-phases))))
1054 `(("pkg-config" ,pkg-config)
1056 (home-page "http://flexbar.sourceforge.net")
1057 (synopsis "Barcode and adapter removal tool for sequencing platforms")
1059 "Flexbar preprocesses high-throughput nucleotide sequencing data
1060 efficiently. It demultiplexes barcoded runs and removes adapter sequences.
1061 Moreover, trimming and filtering features are provided. Flexbar increases
1062 read mapping rates and improves genome and transcriptome assemblies. It
1063 supports next-generation sequencing data in fasta/q and csfasta/q format from
1064 Illumina, Roche 454, and the SOLiD platform.")
1065 (license license:gpl3)))
1074 "https://github.com/nboley/grit/archive/"
1076 (file-name (string-append name "-" version ".tar.gz"))
1079 "157in84dj70wimbind3x7sy1whs3h57qfgcnj2s6lrd38fbrb7mj"))))
1080 (build-system python-build-system)
1082 `(#:python ,python-2
1085 'unpack 'generate-from-cython-sources
1086 (lambda* (#:key inputs outputs #:allow-other-keys)
1087 ;; Delete these C files to force fresh generation from pyx sources.
1088 (delete-file "grit/sparsify_support_fns.c")
1089 (delete-file "grit/call_peaks_support_fns.c")
1090 (substitute* "setup.py"
1091 (("Cython.Setup") "Cython.Build")
1092 ;; Add numpy include path to fix compilation
1094 (string-append "pyx\", ], include_dirs = ['"
1095 (assoc-ref inputs "python-numpy")
1096 "/lib/python2.7/site-packages/numpy/core/include/"
1100 `(("python-scipy" ,python2-scipy)
1101 ("python-numpy" ,python2-numpy)
1102 ("python-pysam" ,python2-pysam)
1103 ("python-networkx" ,python2-networkx)))
1105 `(("python-cython" ,python2-cython)
1106 ("python-setuptools" ,python2-setuptools)))
1107 (home-page "http://grit-bio.org")
1108 (synopsis "Tool for integrative analysis of RNA-seq type assays")
1110 "GRIT is designed to use RNA-seq, TES, and TSS data to build and quantify
1111 full length transcript models. When none of these data sources are available,
1112 GRIT can be run by providing a candidate set of TES or TSS sites. In
1113 addition, GRIT can merge in reference junctions and gene boundaries. GRIT can
1114 also be run in quantification mode, where it uses a provided GTF file and just
1115 estimates transcript expression.")
1116 (license license:gpl3+)))
1118 (define-public hisat
1125 "http://ccb.jhu.edu/software/hisat/downloads/hisat-"
1126 version "-beta-source.zip"))
1129 "1k381ydranqxp09yf2y7w1d0chz5d59vb6jchi89hbb0prq19lk5"))))
1130 (build-system gnu-build-system)
1132 `(#:tests? #f ;no check target
1133 #:make-flags '("allall"
1134 ;; Disable unsupported `popcnt' instructions on
1135 ;; architectures other than x86_64
1136 ,@(if (string-prefix? "x86_64"
1137 (or (%current-target-system)
1140 '("POPCNT_CAPABILITY=0")))
1143 'unpack 'patch-sources
1145 ;; XXX Cannot use snippet because zip files are not supported
1146 (substitute* "Makefile"
1147 (("^CC = .*$") "CC = gcc")
1148 (("^CPP = .*$") "CPP = g++")
1149 ;; replace BUILD_HOST and BUILD_TIME for deterministic build
1150 (("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
1151 (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))
1152 (substitute* '("hisat-build" "hisat-inspect")
1153 (("/usr/bin/env") (which "env"))))
1156 (lambda* (#:key outputs #:allow-other-keys)
1157 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
1161 (copy-file file (string-append bin file)))
1164 "hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$"))))
1165 (alist-delete 'configure %standard-phases)))))
1167 `(("unzip" ,unzip)))
1172 (home-page "http://ccb.jhu.edu/software/hisat/index.shtml")
1173 (synopsis "Hierarchical indexing for spliced alignment of transcripts")
1175 "HISAT is a fast and sensitive spliced alignment program for mapping
1176 RNA-seq reads. In addition to one global FM index that represents a whole
1177 genome, HISAT uses a large set of small FM indexes that collectively cover the
1178 whole genome. These small indexes (called local indexes) combined with
1179 several alignment strategies enable effective alignment of RNA-seq reads, in
1180 particular, reads spanning multiple exons.")
1181 (license license:gpl3+)))
1183 (define-public hmmer
1190 "http://selab.janelia.org/software/hmmer"
1191 (version-prefix version 1) "/"
1192 version "/hmmer-" version ".tar.gz"))
1195 "0djmgc0pfli0jilfx8hql1axhwhqxqb8rxg2r5rg07aw73sfs5nx"))))
1196 (build-system gnu-build-system)
1197 (native-inputs `(("perl", perl)))
1198 (home-page "http://hmmer.janelia.org")
1199 (synopsis "Biosequence analysis using profile hidden Markov models")
1201 "HMMER is used for searching sequence databases for homologs of protein
1202 sequences, and for making protein sequence alignments. It implements methods
1203 using probabilistic models called profile hidden Markov models (profile
1205 (license (list license:gpl3+
1206 ;; The bundled library 'easel' is distributed
1207 ;; under The Janelia Farm Software License.
1208 (license:non-copyleft
1209 "file://easel/LICENSE"
1210 "See easel/LICENSE in the distribution.")))))
1212 (define-public htseq
1219 "https://pypi.python.org/packages/source/H/HTSeq/HTSeq-"
1223 "1i85ppf2j2lj12m0x690qq5nn17xxk23pbbx2c83r8ayb5wngzwv"))))
1224 (build-system python-build-system)
1225 (arguments `(#:python ,python-2)) ; only Python 2 is supported
1227 `(("python-numpy" ,python2-numpy)
1228 ("python-setuptools" ,python2-setuptools)))
1229 (home-page "http://www-huber.embl.de/users/anders/HTSeq/")
1230 (synopsis "Analysing high-throughput sequencing data with Python")
1232 "HTSeq is a Python package that provides infrastructure to process data
1233 from high-throughput sequencing assays.")
1234 (license license:gpl3+)))
1236 (define-public htsjdk
1243 "https://github.com/samtools/htsjdk/archive/"
1245 (file-name (string-append name "-" version ".tar.gz"))
1248 "0asdk9b8jx2ij7yd6apg9qx03li8q7z3ml0qy2r2qczkra79y6fw"))
1249 (modules '((guix build utils)))
1250 ;; remove build dependency on git
1251 (snippet '(substitute* "build.xml"
1252 (("failifexecutionfails=\"true\"")
1253 "failifexecutionfails=\"false\"")))))
1254 (build-system gnu-build-system)
1256 `(#:modules ((srfi srfi-1)
1257 (guix build gnu-build-system)
1259 #:phases (alist-replace
1262 (setenv "JAVA_HOME" (assoc-ref %build-inputs "jdk"))
1263 (zero? (system* "ant" "all"
1264 (string-append "-Ddist="
1265 (assoc-ref %outputs "out")
1266 "/share/java/htsjdk/"))))
1267 (fold alist-delete %standard-phases
1268 '(configure install check)))))
1271 ("jdk" ,icedtea6 "jdk")))
1272 (home-page "http://samtools.github.io/htsjdk/")
1273 (synopsis "Java API for high-throughput sequencing data (HTS) formats")
1275 "HTSJDK is an implementation of a unified Java library for accessing
1276 common file formats, such as SAM and VCF, used for high-throughput
1277 sequencing (HTS) data. There are also an number of useful utilities for
1278 manipulating HTS data.")
1279 (license license:expat)))
1281 (define-public htslib
1288 "https://github.com/samtools/htslib/releases/download/"
1289 version "/htslib-" version ".tar.bz2"))
1292 "1c32ssscbnjwfw3dra140fq7riarp2x990qxybh34nr1p5r17nxx"))))
1293 (build-system gnu-build-system)
1296 (modify-phases %standard-phases
1298 'unpack 'patch-tests
1300 (substitute* "test/test.pl"
1301 (("/bin/bash") (which "bash")))
1307 (home-page "http://www.htslib.org")
1308 (synopsis "C library for reading/writing high-throughput sequencing data")
1310 "HTSlib is a C library for reading/writing high-throughput sequencing
1311 data. It also provides the bgzip, htsfile, and tabix utilities.")
1312 ;; Files under cram/ are released under the modified BSD license;
1313 ;; the rest is released under the Expat license
1314 (license (list license:expat license:bsd-3))))
1323 "https://github.com/nboley/idr/archive/"
1325 (file-name (string-append name "-" version ".tar.gz"))
1328 "1k3x44biak00aiv3hpm1yd6nn4hhp7n0qnbs3zh2q9sw7qr1qj5r"))))
1329 (build-system python-build-system)
1332 (modify-phases %standard-phases
1334 'install 'wrap-program
1335 (lambda* (#:key inputs outputs #:allow-other-keys)
1336 (let* ((out (assoc-ref outputs "out"))
1337 (python-version (string-take (string-take-right
1338 (assoc-ref inputs "python") 5) 3))
1341 (string-append (assoc-ref inputs name)
1342 "/lib/python" python-version
1346 "python-matplotlib"))
1348 (wrap-program (string-append out "/bin/idr")
1349 `("PYTHONPATH" ":" prefix (,path))))
1352 `(("python-scipy" ,python-scipy)
1353 ("python-numpy" ,python-numpy)
1354 ("python-matplotlib" ,python-matplotlib)))
1356 `(("python-cython" ,python-cython)
1357 ("python-setuptools" ,python-setuptools)))
1358 (home-page "https://github.com/nboley/idr")
1359 (synopsis "Tool to measure the irreproducible discovery rate (IDR)")
1361 "The IDR (Irreproducible Discovery Rate) framework is a unified approach
1362 to measure the reproducibility of findings identified from replicate
1363 experiments and provide highly stable thresholds based on reproducibility.")
1364 (license license:gpl3+)))
1369 (version "2.1.0.20140616")
1373 "https://pypi.python.org/packages/source/M/MACS2/MACS2-"
1377 "11lmiw6avqhwn75sn59g4lfkrr2kk20r3rgfbx9xfqb8rg9mi2n6"))))
1378 (build-system python-build-system)
1380 `(#:python ,python-2 ; only compatible with Python 2.7
1381 #:tests? #f)) ; no test target
1383 `(("python-numpy" ,python2-numpy)))
1385 `(("python-setuptools" ,python2-setuptools)))
1386 (home-page "http://github.com/taoliu/MACS/")
1387 (synopsis "Model based analysis for ChIP-Seq data")
1389 "MACS is an implementation of a ChIP-Seq analysis algorithm for
1390 identifying transcript factor binding sites named Model-based Analysis of
1391 ChIP-Seq (MACS). MACS captures the influence of genome complexity to evaluate
1392 the significance of enriched ChIP regions and it improves the spatial
1393 resolution of binding sites through combining the information of both
1394 sequencing tag position and orientation.")
1395 (license license:bsd-3)))
1398 (define-public metabat
1405 "https://bitbucket.org/berkeleylab/metabat/get/"
1406 version ".tar.bz2"))
1407 (file-name (string-append name "-" version ".tar.bz2"))
1410 "0vgrhbaxg4dkxyax2kbigak7w0arhqvw0szwp6gd9wmyilc44kfa"))))
1411 (build-system gnu-build-system)
1414 (modify-phases %standard-phases
1415 (add-after 'unpack 'fix-includes
1417 (substitute* "SConstruct"
1418 (("/include/bam/bam.h")
1419 "/include/samtools/bam.h"))
1420 (substitute* "src/BamUtils.h"
1421 (("^#include \"bam/bam\\.h\"")
1422 "#include \"samtools/bam.h\"")
1423 (("^#include \"bam/sam\\.h\"")
1424 "#include \"samtools/sam.h\""))
1425 (substitute* "src/KseqReader.h"
1426 (("^#include \"bam/kseq\\.h\"")
1427 "#include \"samtools/kseq.h\""))
1429 (add-after 'unpack 'fix-scons
1431 (substitute* "SConstruct" ; Do not distribute README
1432 (("^env\\.Install\\(idir_prefix, 'README\\.md'\\)")
1437 (lambda* (#:key inputs outputs #:allow-other-keys)
1438 (mkdir (assoc-ref outputs "out"))
1439 (zero? (system* "scons"
1442 (assoc-ref outputs "out"))
1445 (assoc-ref inputs "htslib"))
1448 (assoc-ref inputs "samtools"))
1451 (assoc-ref inputs "boost"))
1453 ;; check and install carried out during build phase
1455 (delete 'install))))
1459 ("samtools" ,samtools)
1463 `(("scons" ,scons)))
1464 (home-page "https://bitbucket.org/berkeleylab/metabat")
1466 "Reconstruction of single genomes from complex microbial communities")
1468 "Grouping large genomic fragments assembled from shotgun metagenomic
1469 sequences to deconvolute complex microbial communities, or metagenome binning,
1470 enables the study of individual organisms and their interactions. MetaBAT is
1471 an automated metagenome binning software, which integrates empirical
1472 probabilistic distances of genome abundance and tetranucleotide frequency.")
1473 (license (license:non-copyleft "file://license.txt"
1474 "See license.txt in the distribution."))))
1483 "https://pypi.python.org/packages/source/m/misopy/misopy-"
1487 "0x446867az8ir0z8c1vjqffkp0ma37wm4sylixnkhgawllzx8v5w"))
1488 (modules '((guix build utils)))
1490 '(substitute* "setup.py"
1491 ;; Use setuptools, or else the executables are not
1493 (("distutils.core") "setuptools")
1494 ;; use "gcc" instead of "cc" for compilation
1496 "cc.set_executables(
1500 linker_so='gcc -shared'); defines")))))
1501 (build-system python-build-system)
1503 `(#:python ,python-2 ; only Python 2 is supported
1504 #:tests? #f)) ; no "test" target
1506 `(("samtools" ,samtools)
1507 ("python-numpy" ,python2-numpy)
1508 ("python-pysam" ,python2-pysam)
1509 ("python-scipy" ,python2-scipy)
1510 ("python-matplotlib" ,python2-matplotlib)))
1512 `(("python-mock" ,python2-mock) ;for tests
1513 ("python-pytz" ,python2-pytz) ;for tests
1514 ("python-setuptools" ,python2-setuptools)))
1515 (home-page "http://genes.mit.edu/burgelab/miso/index.html")
1516 (synopsis "Mixture of Isoforms model for RNA-Seq isoform quantitation")
1518 "MISO (Mixture-of-Isoforms) is a probabilistic framework that quantitates
1519 the expression level of alternatively spliced genes from RNA-Seq data, and
1520 identifies differentially regulated isoforms or exons across samples. By
1521 modeling the generative process by which reads are produced from isoforms in
1522 RNA-Seq, the MISO model uses Bayesian inference to compute the probability
1523 that a read originated from a particular isoform.")
1524 (license license:gpl2)))
1533 "https://github.com/wwood/OrfM/releases/download/v"
1534 version "/orfm-" version ".tar.gz"))
1537 "05fmw145snk646ly076zby0fjav0k7ysbclck5d4s9pmgcfpijc2"))))
1538 (build-system gnu-build-system)
1539 (inputs `(("zlib" ,zlib)))
1540 (synopsis "Simple and not slow open reading frame (ORF) caller")
1542 "An ORF caller finds stretches of DNA that when translated are not
1543 interrupted by stop codons. OrfM finds and prints these ORFs.")
1544 (home-page "https://github.com/wwood/OrfM")
1545 (license license:lgpl3+)))
1547 (define-public python2-pbcore
1549 (name "python2-pbcore")
1554 "https://github.com/PacificBiosciences/pbcore/archive/"
1556 (file-name (string-append name "-" version ".tar.gz"))
1559 "1z46rwjac93jm87cbj2zgjg6qvsgs65140wkbbxsvxps7ai4pm09"))))
1560 (build-system python-build-system)
1561 (arguments `(#:python ,python-2)) ; pbcore requires Python 2.7
1563 `(("python-cython" ,python2-cython)
1564 ("python-numpy" ,python2-numpy)
1565 ("python-pysam" ,python2-pysam)
1566 ("python-h5py" ,python2-h5py)))
1568 `(("python-setuptools" ,python2-setuptools)))
1569 (home-page "http://pacificbiosciences.github.io/pbcore/")
1570 (synopsis "Library for reading and writing PacBio data files")
1572 "The pbcore package provides Python APIs for interacting with PacBio data
1573 files and writing bioinformatics applications.")
1574 (license license:bsd-3)))
1576 (define-public python2-warpedlmm
1578 (name "python2-warpedlmm")
1584 "https://pypi.python.org/packages/source/W/WarpedLMM/WarpedLMM-"
1588 "1agfz6zqa8nc6cw47yh0s3y14gkpa9wqazwcj7mwwj3ffnw39p3j"))))
1589 (build-system python-build-system)
1591 `(#:python ,python-2 ; requires Python 2.7
1593 (modify-phases %standard-phases
1595 'install 'remove-bin-directory
1596 (lambda* (#:key outputs #:allow-other-keys)
1597 ;; The "bin" directory only contains wrappers for running
1598 ;; the module tests. They are not needed after the
1600 (delete-file-recursively
1601 (string-append (assoc-ref outputs "out") "/bin"))
1604 `(("python-scipy" ,python2-scipy)
1605 ("python-numpy" ,python2-numpy)
1606 ("python-matplotlib" ,python2-matplotlib)
1607 ("python-fastlmm" ,python2-fastlmm)
1608 ("python-pandas" ,python2-pandas)
1609 ("python-pysnptools" ,python2-pysnptools)))
1611 `(("python-setuptools" ,python2-setuptools)
1612 ("python-mock" ,python2-mock)
1613 ("python-nose" ,python2-nose)
1615 (home-page "https://github.com/PMBio/warpedLMM")
1616 (synopsis "Implementation of warped linear mixed models")
1618 "WarpedLMM is a Python implementation of the warped linear mixed model,
1619 which automatically learns an optimal warping function (or transformation) for
1620 the phenotype as it models the data.")
1621 (license license:asl2.0)))
1623 (define-public pbtranscript-tofu
1624 (let ((commit "c7bbd5472"))
1626 (name "pbtranscript-tofu")
1627 (version (string-append "0.4.1." commit))
1631 (url "https://github.com/PacificBiosciences/cDNA_primer.git")
1633 (file-name (string-append name "-" version ".tar.gz"))
1636 "148xkzi689c49g6fdhckp6mnmj2qhjdf1j4wifm6ja7ij95d7fxx"))))
1637 (build-system python-build-system)
1639 `(#:python ,python-2
1640 ;; With standard flags, the install phase attempts to create a zip'd
1641 ;; egg file, and fails with an error: 'ZIP does not support timestamps
1643 #:configure-flags '("--single-version-externally-managed"
1644 "--record=pbtranscript-tofu.txt")
1647 'unpack 'enter-directory-and-clean-up
1649 (chdir "pbtranscript-tofu/pbtranscript/")
1651 (delete-file-recursively "dist/")
1652 (delete-file-recursively "build/")
1653 (delete-file-recursively "setuptools_cython-0.2.1-py2.6.egg/")
1654 (delete-file-recursively "pbtools.pbtranscript.egg-info")
1655 (delete-file "Cython-0.20.1.tar.gz")
1656 (delete-file "setuptools_cython-0.2.1-py2.7.egg")
1657 (delete-file "setuptools_cython-0.2.1.tar.gz")
1658 (delete-file "setup.cfg")
1659 (for-each delete-file
1660 (find-files "." "\\.so$"))
1661 ;; files should be writable for install phase
1662 (for-each (lambda (f) (chmod f #o755))
1663 (find-files "." "\\.py$")))
1666 `(("python-cython" ,python2-cython)
1667 ("python-numpy" ,python2-numpy)
1668 ("python-bx-python" ,python2-bx-python)
1669 ("python-networkx" ,python2-networkx)
1670 ("python-scipy" ,python2-scipy)
1671 ("python-pbcore" ,python2-pbcore)))
1673 `(("python-nose" ,python2-nose)
1674 ("python-setuptools" ,python2-setuptools)))
1675 (home-page "https://github.com/PacificBiosciences/cDNA_primer")
1676 (synopsis "Analyze transcriptome data generated with the Iso-Seq protocol")
1678 "pbtranscript-tofu contains scripts to analyze transcriptome data
1679 generated using the PacBio Iso-Seq protocol.")
1680 (license license:bsd-3))))
1682 (define-public prodigal
1689 "https://github.com/hyattpd/Prodigal/archive/v"
1691 (file-name (string-append name "-" version ".tar.gz"))
1694 "0m8sb0fg6lmxrlpzna0am6svbnlmd3dckrhgzxxgb3gxr5fyj284"))))
1695 (build-system gnu-build-system)
1697 `(#:tests? #f ;no check target
1698 #:make-flags (list (string-append "INSTALLDIR="
1699 (assoc-ref %outputs "out")
1702 (modify-phases %standard-phases
1703 (delete 'configure))))
1704 (home-page "http://prodigal.ornl.gov")
1705 (synopsis "Protein-coding gene prediction for Archaea and Bacteria")
1707 "Prodigal runs smoothly on finished genomes, draft genomes, and
1708 metagenomes, providing gene predictions in GFF3, Genbank, or Sequin table
1709 format. It runs quickly, in an unsupervised fashion, handles gaps, handles
1710 partial genes, and identifies translation initiation sites.")
1711 (license license:gpl3+)))
1721 (string-append "http://deweylab.biostat.wisc.edu/rsem/src/rsem-"
1724 (base32 "0nzdc0j0hjllhsd5f2xli95dafm3nawskigs140xzvjk67xh0r9q"))
1725 (patches (list (search-patch "rsem-makefile.patch")))
1726 (modules '((guix build utils)))
1729 ;; remove bundled copy of boost
1730 (delete-file-recursively "boost")
1732 (build-system gnu-build-system)
1734 `(#:tests? #f ;no "check" target
1736 (modify-phases %standard-phases
1737 ;; No "configure" script.
1738 ;; Do not build bundled samtools library.
1741 (substitute* "Makefile"
1742 (("^all : sam/libbam.a") "all : "))
1745 (lambda* (#:key outputs #:allow-other-keys)
1746 (let* ((out (string-append (assoc-ref outputs "out")))
1747 (bin (string-append out "/bin/"))
1748 (perl (string-append out "/lib/perl5/site_perl")))
1751 (for-each (lambda (file)
1753 (string-append bin (basename file))))
1754 (find-files "." "rsem-.*"))
1755 (copy-file "rsem_perl_utils.pm"
1756 (string-append perl "/rsem_perl_utils.pm")))
1759 'install 'wrap-program
1760 (lambda* (#:key outputs #:allow-other-keys)
1761 (let ((out (assoc-ref outputs "out")))
1762 (for-each (lambda (prog)
1763 (wrap-program (string-append out "/bin/" prog)
1764 `("PERL5LIB" ":" prefix
1765 (,(string-append out "/lib/perl5/site_perl")))))
1766 '("rsem-plot-transcript-wiggles"
1767 "rsem-calculate-expression"
1768 "rsem-generate-ngvector"
1770 "rsem-prepare-reference")))
1774 ("ncurses" ,ncurses)
1777 ("samtools" ,samtools-0.1)
1779 (home-page "http://deweylab.biostat.wisc.edu/rsem/")
1780 (synopsis "Estimate gene expression levels from RNA-Seq data")
1782 "RSEM is a software package for estimating gene and isoform expression
1783 levels from RNA-Seq data. The RSEM package provides a user-friendly
1784 interface, supports threads for parallel computation of the EM algorithm,
1785 single-end and paired-end read data, quality scores, variable-length reads and
1786 RSPD estimation. In addition, it provides posterior mean and 95% credibility
1787 interval estimates for expression levels. For visualization, it can generate
1788 BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.")
1789 (license license:gpl3+)))
1791 (define-public rseqc
1799 (string-append "mirror://sourceforge/rseqc/"
1800 version "/RSeQC-" version ".tar.gz"))
1802 (base32 "15ly0254yi032qzkdplg00q144qfdsd986gh62829rl5bkxhj330"))
1803 (modules '((guix build utils)))
1806 ;; remove bundled copy of pysam
1807 (delete-file-recursively "lib/pysam")
1808 (substitute* "setup.py"
1809 ;; remove dependency on outdated "distribute" module
1810 (("^from distribute_setup import use_setuptools") "")
1811 (("^use_setuptools\\(\\)") "")
1812 ;; do not use bundled copy of pysam
1813 (("^have_pysam = False") "have_pysam = True"))))))
1814 (build-system python-build-system)
1815 (arguments `(#:python ,python-2))
1817 `(("python-cython" ,python2-cython)
1818 ("python-pysam" ,python2-pysam)
1819 ("python-numpy" ,python2-numpy)
1820 ("python-setuptools" ,python2-setuptools)
1823 `(("python-nose" ,python2-nose)))
1824 (home-page "http://rseqc.sourceforge.net/")
1825 (synopsis "RNA-seq quality control package")
1827 "RSeQC provides a number of modules that can comprehensively evaluate
1828 high throughput sequence data, especially RNA-seq data. Some basic modules
1829 inspect sequence quality, nucleotide composition bias, PCR bias and GC bias,
1830 while RNA-seq specific modules evaluate sequencing saturation, mapped reads
1831 distribution, coverage uniformity, strand specificity, etc.")
1832 (license license:gpl3+)))
1834 (define-public samtools
1842 (string-append "mirror://sourceforge/samtools/"
1843 version "/samtools-" version ".tar.bz2"))
1846 "1akdqb685pk9xk1nb6sa9aq8xssjjhvvc06kp4cpdqvz2157l3j2"))))
1847 (build-system gnu-build-system)
1849 `(;; There are 87 test failures when building on non-64-bit architectures
1850 ;; due to invalid test data. This has since been fixed upstream (see
1851 ;; <https://github.com/samtools/samtools/pull/307>), but as there has
1852 ;; not been a new release we disable the tests for all non-64-bit
1854 #:tests? ,(string=? (or (%current-system) (%current-target-system))
1856 #:modules ((ice-9 ftw)
1858 (guix build gnu-build-system)
1860 #:make-flags (list "LIBCURSES=-lncurses"
1861 (string-append "prefix=" (assoc-ref %outputs "out")))
1866 (lambda* (#:key inputs #:allow-other-keys)
1867 (let ((bash (assoc-ref inputs "bash")))
1868 (substitute* "test/test.pl"
1869 ;; The test script calls out to /bin/bash
1871 (string-append bash "/bin/bash"))
1872 ;; There are two failing tests upstream relating to the "stats"
1873 ;; subcommand in test_usage_subcommand ("did not have Usage"
1874 ;; and "usage did not mention samtools stats"), so we disable
1876 (("(test_usage_subcommand\\(.*\\);)" cmd)
1877 (string-append "unless ($subcommand eq 'stats') {" cmd "};")))))
1879 'install 'install-library
1880 (lambda* (#:key outputs #:allow-other-keys)
1881 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
1883 (copy-file "libbam.a" (string-append lib "/libbam.a"))))
1885 'install 'install-headers
1886 (lambda* (#:key outputs #:allow-other-keys)
1887 (let ((include (string-append (assoc-ref outputs "out")
1888 "/include/samtools/")))
1890 (for-each (lambda (file)
1891 (copy-file file (string-append include
1893 (scandir "." (lambda (name) (string-match "\\.h$" name))))
1895 (alist-delete 'configure %standard-phases))))))
1896 (native-inputs `(("pkg-config" ,pkg-config)))
1897 (inputs `(("ncurses" ,ncurses)
1901 (home-page "http://samtools.sourceforge.net")
1902 (synopsis "Utilities to efficiently manipulate nucleotide sequence alignments")
1904 "Samtools implements various utilities for post-processing nucleotide
1905 sequence alignments in the SAM, BAM, and CRAM formats, including indexing,
1906 variant calling (in conjunction with bcftools), and a simple alignment
1908 (license license:expat)))
1910 (define-public samtools-0.1
1911 ;; This is the most recent version of the 0.1 line of samtools. The input
1912 ;; and output formats differ greatly from that used and produced by samtools
1913 ;; 1.x and is still used in many bioinformatics pipelines.
1914 (package (inherit samtools)
1920 (string-append "mirror://sourceforge/samtools/"
1921 version "/samtools-" version ".tar.bz2"))
1923 (base32 "1m33xsfwz0s8qi45lylagfllqg7fphf4dr0780rsvw75av9wk06h"))))
1925 (substitute-keyword-arguments (package-arguments samtools)
1926 ((#:tests? tests) #f) ;no "check" target
1928 `(modify-phases ,phases
1930 (lambda* (#:key outputs #:allow-other-keys)
1931 (let ((bin (string-append
1932 (assoc-ref outputs "out") "/bin")))
1934 (copy-file "samtools"
1935 (string-append bin "/samtools")))))
1936 (delete 'patch-tests)))))))
1938 (define-public ngs-sdk
1946 (string-append "https://github.com/ncbi/ngs/archive/"
1948 (file-name (string-append name "-" version ".tar.gz"))
1951 "1x58gpm574n0xmk2a98gmikbgycq78ia0bvnb42k5ck34fmd5v8y"))))
1952 (build-system gnu-build-system)
1954 `(#:parallel-build? #f ; not supported
1955 #:tests? #f ; no "check" target
1959 (lambda* (#:key outputs #:allow-other-keys)
1960 (let ((out (assoc-ref outputs "out")))
1961 ;; The 'configure' script doesn't recognize things like
1962 ;; '--enable-fast-install'.
1963 (zero? (system* "./configure"
1964 (string-append "--build-prefix=" (getcwd) "/build")
1965 (string-append "--prefix=" out)))))
1968 (lambda _ (chdir "ngs-sdk") #t)
1969 %standard-phases))))
1970 (native-inputs `(("perl" ,perl)))
1971 (home-page "https://github.com/ncbi/ngs")
1972 (synopsis "API for accessing Next Generation Sequencing data")
1974 "NGS is a domain-specific API for accessing reads, alignments and pileups
1975 produced from Next Generation Sequencing. The API itself is independent from
1976 any particular back-end implementation, and supports use of multiple back-ends
1978 (license license:public-domain)))
1980 (define-public ngs-java
1981 (package (inherit ngs-sdk)
1984 `(,@(substitute-keyword-arguments
1985 `(#:modules ((guix build gnu-build-system)
1989 ,@(package-arguments ngs-sdk))
1992 'enter-dir 'fix-java-symlink-installation
1994 ;; Only replace the version suffix, not the version number in
1995 ;; the directory name. Reported here:
1996 ;; https://github.com/ncbi/ngs/pull/4
1997 (substitute* "Makefile.java"
1998 (((string-append "\\$\\(subst "
1999 "(\\$\\(VERSION[^\\)]*\\)),"
2000 "(\\$\\([^\\)]+\\)),"
2001 "(\\$\\([^\\)]+\\)|\\$\\@)"
2003 _ pattern replacement target)
2004 (string-append "$(patsubst "
2009 'enter-dir (lambda _ (chdir "ngs-java") #t)
2012 `(("jdk" ,icedtea6 "jdk")
2013 ("ngs-sdk" ,ngs-sdk)))
2014 (synopsis "Java bindings for NGS SDK")))
2016 (define-public ncbi-vdb
2024 (string-append "https://github.com/ncbi/ncbi-vdb/archive/"
2026 (file-name (string-append name "-" version ".tar.gz"))
2029 "1cj8nk6if8sqagv20vx36v566fdvhcaadf0x1ycnbgql6chbs6vy"))))
2030 (build-system gnu-build-system)
2032 `(#:parallel-build? #f ; not supported
2033 #:tests? #f ; no "check" target
2037 (lambda* (#:key inputs outputs #:allow-other-keys)
2038 (let ((out (assoc-ref outputs "out")))
2039 ;; Only replace the version suffix, not the version number in the
2040 ;; directory name; fixed in commit 4dbba5c6a809 (no release yet).
2041 (substitute* "setup/konfigure.perl"
2042 (((string-append "\\$\\(subst "
2043 "(\\$\\(VERSION[^\\)]*\\)),"
2044 "(\\$\\([^\\)]+\\)),"
2045 "(\\$\\([^\\)]+\\)|\\$\\@)"
2047 _ pattern replacement target)
2048 (string-append "$(patsubst "
2053 ;; Override include path for libmagic
2054 (substitute* "setup/package.prl"
2055 (("name => 'magic', Include => '/usr/include'")
2056 (string-append "name=> 'magic', Include => '"
2057 (assoc-ref inputs "libmagic")
2060 ;; Install kdf5 library (needed by sra-tools)
2061 (substitute* "build/Makefile.install"
2062 (("LIBRARIES_TO_INSTALL =")
2063 "LIBRARIES_TO_INSTALL = kdf5.$(VERSION_LIBX) kdf5.$(VERSION_SHLX)"))
2065 ;; The 'configure' script doesn't recognize things like
2066 ;; '--enable-fast-install'.
2069 (string-append "--build-prefix=" (getcwd) "/build")
2070 (string-append "--prefix=" (assoc-ref outputs "out"))
2071 (string-append "--debug")
2072 (string-append "--with-xml2-prefix="
2073 (assoc-ref inputs "libxml2"))
2074 (string-append "--with-ngs-sdk-prefix="
2075 (assoc-ref inputs "ngs-sdk"))
2076 (string-append "--with-ngs-java-prefix="
2077 (assoc-ref inputs "ngs-java"))
2078 (string-append "--with-hdf5-prefix="
2079 (assoc-ref inputs "hdf5"))))))
2081 'install 'install-interfaces
2082 (lambda* (#:key outputs #:allow-other-keys)
2083 ;; Install interface libraries. On i686 the interface libraries
2084 ;; are installed to "linux/gcc/i386", so we need to use the Linux
2085 ;; architecture name ("i386") instead of the target system prefix
2087 (mkdir (string-append (assoc-ref outputs "out") "/ilib"))
2088 (copy-recursively (string-append "build/ncbi-vdb/linux/gcc/"
2089 ,(system->linux-architecture
2090 (or (%current-target-system)
2093 (string-append (assoc-ref outputs "out")
2095 ;; Install interface headers
2096 (copy-recursively "interfaces"
2097 (string-append (assoc-ref outputs "out")
2099 %standard-phases))))
2101 `(("libxml2" ,libxml2)
2102 ("ngs-sdk" ,ngs-sdk)
2103 ("ngs-java" ,ngs-java)
2106 (native-inputs `(("perl" ,perl)))
2107 (home-page "https://github.com/ncbi/ncbi-vdb")
2108 (synopsis "Database engine for genetic information")
2110 "The NCBI-VDB library implements a highly compressed columnar data
2111 warehousing engine that is most often used to store genetic information.
2112 Databases are stored in a portable image within the file system, and can be
2113 accessed/downloaded on demand across HTTP.")
2114 (license license:public-domain)))
2116 (define-public plink
2124 "http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-"
2125 version "-src.zip"))
2127 (base32 "0as8gxm4pjyc8dxmm1sl873rrd7wn5qs0l29nqfnl31x8i467xaa"))
2128 (patches (list (search-patch "plink-1.07-unclobber-i.patch")))))
2129 (build-system gnu-build-system)
2131 '(#:tests? #f ;no "check" target
2132 #:make-flags (list (string-append "LIB_LAPACK="
2133 (assoc-ref %build-inputs "lapack")
2134 "/lib/liblapack.so")
2137 ;; disable phoning home
2140 (modify-phases %standard-phases
2141 ;; no "configure" script
2144 (lambda* (#:key outputs #:allow-other-keys)
2145 (let ((bin (string-append (assoc-ref outputs "out")
2148 (copy-file "plink" (string-append bin "plink"))
2152 ("lapack" ,lapack)))
2154 `(("unzip" ,unzip)))
2155 (home-page "http://pngu.mgh.harvard.edu/~purcell/plink/")
2156 (synopsis "Whole genome association analysis toolset")
2158 "PLINK is a whole genome association analysis toolset, designed to
2159 perform a range of basic, large-scale analyses in a computationally efficient
2160 manner. The focus of PLINK is purely on analysis of genotype/phenotype data,
2161 so there is no support for steps prior to this (e.g. study design and
2162 planning, generating genotype or CNV calls from raw data). Through
2163 integration with gPLINK and Haploview, there is some support for the
2164 subsequent visualization, annotation and storage of results.")
2165 ;; Code is released under GPLv2, except for fisher.h, which is under
2167 (license (list license:gpl2 license:lgpl2.1+))))
2169 (define-public preseq
2176 (string-append "http://smithlabresearch.org/downloads/preseq-"
2177 version ".tar.bz2"))
2179 (base32 "0r7sw07p6nv8ygvc17gd78lisbw5336v3vhs86b5wv8mw3pwqksc"))
2180 (patches (list (search-patch "preseq-1.0.2-install-to-PREFIX.patch")
2181 (search-patch "preseq-1.0.2-link-with-libbam.patch")))
2182 (modules '((guix build utils)))
2184 ;; Remove bundled samtools.
2185 '(delete-file-recursively "preseq-master/samtools"))))
2186 (build-system gnu-build-system)
2188 `(#:tests? #f ;no "check" target
2190 (modify-phases %standard-phases
2194 (chdir "preseq-master")
2197 'enter-dir 'use-samtools-headers
2199 (substitute* '("smithlab_cpp/SAM.cpp"
2200 "smithlab_cpp/SAM.hpp")
2201 (("sam.h") "samtools/sam.h"))
2203 (delete 'configure))
2204 #:make-flags (list (string-append "PREFIX="
2205 (assoc-ref %outputs "out"))
2206 (string-append "LIBBAM="
2207 (assoc-ref %build-inputs "samtools")
2211 ("samtools" ,samtools-0.1)
2213 (home-page "http://smithlabresearch.org/software/preseq/")
2214 (synopsis "Program for analyzing library complexity")
2216 "The preseq package is aimed at predicting and estimating the complexity
2217 of a genomic sequencing library, equivalent to predicting and estimating the
2218 number of redundant reads from a given sequencing depth and how many will be
2219 expected from additional sequencing using an initial sequencing experiment.
2220 The estimates can then be used to examine the utility of further sequencing,
2221 optimize the sequencing depth, or to screen multiple libraries to avoid low
2222 complexity samples.")
2223 (license license:gpl3+)))
2225 (define-public sra-tools
2233 (string-append "https://github.com/ncbi/sra-tools/archive/"
2235 (file-name (string-append name "-" version ".tar.gz"))
2238 "11nrnvz7a012f4iryf0wiwrid0h111grsfxbxa9j51h3f2xbvgns"))))
2239 (build-system gnu-build-system)
2241 `(#:parallel-build? #f ; not supported
2242 #:tests? #f ; no "check" target
2246 (lambda* (#:key inputs outputs #:allow-other-keys)
2247 ;; The build system expects a directory containing the sources and
2248 ;; raw build output of ncbi-vdb, including files that are not
2249 ;; installed. Since we are building against an installed version of
2250 ;; ncbi-vdb, the following modifications are needed.
2251 (substitute* "setup/konfigure.perl"
2252 ;; Make the configure script look for the "ilib" directory of
2253 ;; "ncbi-vdb" without first checking for the existence of a
2254 ;; matching library in its "lib" directory.
2255 (("^ my \\$f = File::Spec->catdir\\(\\$libdir, \\$lib\\);")
2256 "my $f = File::Spec->catdir($ilibdir, $ilib);")
2257 ;; Look for interface libraries in ncbi-vdb's "ilib" directory.
2258 (("my \\$ilibdir = File::Spec->catdir\\(\\$builddir, 'ilib'\\);")
2259 "my $ilibdir = File::Spec->catdir($dir, 'ilib');"))
2261 ;; The 'configure' script doesn't recognize things like
2262 ;; '--enable-fast-install'.
2265 (string-append "--build-prefix=" (getcwd) "/build")
2266 (string-append "--prefix=" (assoc-ref outputs "out"))
2267 (string-append "--debug")
2268 (string-append "--with-fuse-prefix="
2269 (assoc-ref inputs "fuse"))
2270 (string-append "--with-magic-prefix="
2271 (assoc-ref inputs "libmagic"))
2272 ;; TODO: building with libxml2 fails with linker errors
2273 ;; (string-append "--with-xml2-prefix="
2274 ;; (assoc-ref inputs "libxml2"))
2275 (string-append "--with-ncbi-vdb-sources="
2276 (assoc-ref inputs "ncbi-vdb"))
2277 (string-append "--with-ncbi-vdb-build="
2278 (assoc-ref inputs "ncbi-vdb"))
2279 (string-append "--with-ngs-sdk-prefix="
2280 (assoc-ref inputs "ngs-sdk"))
2281 (string-append "--with-hdf5-prefix="
2282 (assoc-ref inputs "hdf5")))))
2284 (native-inputs `(("perl" ,perl)))
2286 `(("ngs-sdk" ,ngs-sdk)
2287 ("ncbi-vdb" ,ncbi-vdb)
2292 (home-page "http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software")
2293 (synopsis "Tools and libraries for reading and writing sequencing data")
2295 "The SRA Toolkit from NCBI is a collection of tools and libraries for
2296 reading of sequencing files from the Sequence Read Archive (SRA) database and
2297 writing files into the .sra format.")
2298 (license license:public-domain)))
2300 (define-public seqan
2306 (uri (string-append "http://packages.seqan.de/seqan-library/"
2307 "seqan-library-" version ".tar.bz2"))
2310 "05s3wrrwn50f81aklfm65i4a749zag1vr8z03k21xm0pdxy47yvp"))))
2311 ;; The documentation is 7.8MB and the includes are 3.6MB heavy, so it
2312 ;; makes sense to split the outputs.
2313 (outputs '("out" "doc"))
2314 (build-system trivial-build-system)
2316 `(#:modules ((guix build utils))
2319 (use-modules (guix build utils))
2320 (let ((tar (assoc-ref %build-inputs "tar"))
2321 (bzip (assoc-ref %build-inputs "bzip2"))
2322 (out (assoc-ref %outputs "out"))
2323 (doc (assoc-ref %outputs "doc")))
2324 (setenv "PATH" (string-append tar "/bin:" bzip "/bin"))
2325 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
2326 (chdir (string-append "seqan-library-" ,version))
2327 (copy-recursively "include" (string-append out "/include"))
2328 (copy-recursively "share" (string-append doc "/share"))))))
2330 `(("source" ,source)
2333 (home-page "http://www.seqan.de")
2334 (synopsis "Library for nucleotide sequence analysis")
2336 "SeqAn is a C++ library of efficient algorithms and data structures for
2337 the analysis of sequences with the focus on biological data. It contains
2338 algorithms and data structures for string representation and their
2339 manipulation, online and indexed string search, efficient I/O of
2340 bioinformatics file formats, sequence alignment, and more.")
2341 (license license:bsd-3)))
2350 "https://github.com/alexdobin/STAR/archive/STAR_"
2354 "1c3rnm7r5l0kl3d04gl1g7938xqf1c2l0mla87rlplqg1hcns5mc"))
2355 (modules '((guix build utils)))
2357 '(substitute* "source/Makefile"
2358 (("/bin/rm") "rm")))))
2359 (build-system gnu-build-system)
2361 '(#:tests? #f ;no check target
2362 #:make-flags '("STAR")
2365 'unpack 'enter-source-dir (lambda _ (chdir "source"))
2368 (lambda* (#:key outputs #:allow-other-keys)
2369 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
2371 (copy-file "STAR" (string-append bin "STAR"))))
2373 'configure %standard-phases)))))
2375 `(("vim" ,vim))) ; for xxd
2378 (home-page "https://github.com/alexdobin/STAR")
2379 (synopsis "Universal RNA-seq aligner")
2381 "The Spliced Transcripts Alignment to a Reference (STAR) software is
2382 based on a previously undescribed RNA-seq alignment algorithm that uses
2383 sequential maximum mappable seed search in uncompressed suffix arrays followed
2384 by seed clustering and stitching procedure. In addition to unbiased de novo
2385 detection of canonical junctions, STAR can discover non-canonical splices and
2386 chimeric (fusion) transcripts, and is also capable of mapping full-length RNA
2388 ;; STAR is licensed under GPLv3 or later; htslib is MIT-licensed.
2389 (license license:gpl3+)))
2391 (define-public subread
2394 (version "1.4.6-p2")
2398 "mirror://sourceforge/subread/subread-"
2399 version "-source.tar.gz"))
2402 "06sv9mpcsdj6p68y15d6gi70lca3lxmzk0dn61hg0kfsa7rxmsr3"))))
2403 (build-system gnu-build-system)
2405 `(#:tests? #f ;no "check" target
2406 #:make-flags '("-f" "Makefile.Linux")
2410 (lambda _ (chdir "src") #t)
2413 (lambda* (#:key outputs #:allow-other-keys)
2414 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
2416 (copy-recursively "../bin" bin)))
2417 ;; no "configure" script
2418 (alist-delete 'configure %standard-phases)))))
2419 (inputs `(("zlib" ,zlib)))
2420 (home-page "http://bioinf.wehi.edu.au/subread-package/")
2421 (synopsis "Tool kit for processing next-gen sequencing data")
2423 "The subread package contains the following tools: subread aligner, a
2424 general-purpose read aligner; subjunc aligner: detecting exon-exon junctions
2425 and mapping RNA-seq reads; featureCounts: counting mapped reads for genomic
2426 features; exactSNP: a SNP caller that discovers SNPs by testing signals
2427 against local background noises.")
2428 (license license:gpl3+)))
2430 (define-public shogun
2438 "ftp://shogun-toolbox.org/shogun/releases/"
2439 (version-major+minor version)
2440 "/sources/shogun-" version ".tar.bz2"))
2443 "159nlijnb7mnrv9za80wnm1shwvy45hgrqzn51hxy7gw4z6d6fdb"))
2444 (modules '((guix build utils)
2448 ;; Remove non-free sources and files referencing them
2449 (for-each delete-file
2450 (find-files "src/shogun/classifier/svm/"
2451 "SVMLight\\.(cpp|h)"))
2452 (for-each delete-file
2453 (find-files "examples/undocumented/libshogun/"
2455 "(classifier_.*svmlight.*|"
2456 "evaluation_cross_validation_locked_comparison).cpp")))
2457 ;; Remove non-free functions.
2458 (define (delete-ifdefs file)
2459 (with-atomic-file-replacement file
2461 (let loop ((line (read-line in 'concat))
2463 (if (eof-object? line)
2467 (not (string-prefix?
2468 "#endif //USE_SVMLIGHT" line)))
2470 "#ifdef USE_SVMLIGHT" line))))
2471 (when (or (not skipping?)
2472 (and skipping? (not skip-next?)))
2474 (loop (read-line in 'concat) skip-next?)))))))
2475 (for-each delete-ifdefs (find-files "src/shogun/kernel/"
2476 "^Kernel\\.(cpp|h)"))))))
2477 (build-system cmake-build-system)
2479 '(#:tests? #f ;no check target
2482 'unpack 'delete-broken-symlinks
2484 (for-each delete-file '("applications/arts/data"
2485 "applications/asp/data"
2486 "applications/easysvm/data"
2487 "applications/msplicer/data"
2488 "applications/ocr/data"
2489 "examples/documented/data"
2490 "examples/documented/matlab_static"
2491 "examples/documented/octave_static"
2492 "examples/undocumented/data"
2493 "examples/undocumented/matlab_static"
2494 "examples/undocumented/octave_static"
2495 "tests/integration/data"
2496 "tests/integration/matlab_static"
2497 "tests/integration/octave_static"
2498 "tests/integration/python_modular/tests"))
2501 'unpack 'change-R-target-path
2502 (lambda* (#:key outputs #:allow-other-keys)
2503 (substitute* '("src/interfaces/r_modular/CMakeLists.txt"
2504 "src/interfaces/r_static/CMakeLists.txt"
2505 "examples/undocumented/r_modular/CMakeLists.txt")
2506 (("\\$\\{R_COMPONENT_LIB_PATH\\}")
2507 (string-append (assoc-ref outputs "out")
2508 "/lib/R/library/")))
2511 'unpack 'fix-octave-modules
2512 (lambda* (#:key outputs #:allow-other-keys)
2513 (substitute* '("src/interfaces/octave_modular/CMakeLists.txt"
2514 "src/interfaces/octave_static/CMakeLists.txt")
2515 (("^include_directories\\(\\$\\{OCTAVE_INCLUDE_DIRS\\}")
2516 "include_directories(${OCTAVE_INCLUDE_DIRS} ${OCTAVE_INCLUDE_DIRS}/octave"))
2518 ;; change target directory
2519 (substitute* "src/interfaces/octave_modular/CMakeLists.txt"
2520 (("\\$\\{OCTAVE_OCT_LOCAL_API_FILE_DIR\\}")
2521 (string-append (assoc-ref outputs "out")
2522 "/share/octave/packages")))
2526 ;; $HOME needs to be set at some point during the build phase
2527 (lambda _ (setenv "HOME" "/tmp") #t)
2528 %standard-phases))))
2530 (list "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
2531 "-DUSE_SVMLIGHT=OFF" ;disable proprietary SVMLIGHT
2532 ;;"-DJavaModular=ON" ;requires unpackaged jblas
2533 ;;"-DRubyModular=ON" ;requires unpackaged ruby-narray
2534 ;;"-DPerlModular=ON" ;"FindPerlLibs" does not exist
2535 ;;"-DLuaModular=ON" ;fails because lua doesn't build pkgconfig file
2536 "-DOctaveModular=ON"
2538 "-DPythonModular=ON"
2542 "-DCmdLineStatic=ON")))
2544 `(("python" ,python)
2545 ("numpy" ,python-numpy)
2551 ("arpack" ,arpack-ng)
2554 ("libxml2" ,libxml2)
2558 `(("pkg-config" ,pkg-config)))
2559 (home-page "http://shogun-toolbox.org/")
2560 (synopsis "Machine learning toolbox")
2562 "The Shogun Machine learning toolbox provides a wide range of unified and
2563 efficient Machine Learning (ML) methods. The toolbox seamlessly allows to
2564 combine multiple data representations, algorithm classes, and general purpose
2565 tools. This enables both rapid prototyping of data pipelines and extensibility
2566 in terms of new algorithms.")
2567 (license license:gpl3+)))
2569 (define-public vcftools
2576 "mirror://sourceforge/vcftools/vcftools_"
2580 "148al9h7f8g8my2qdnpax51kdd2yjrivlx6frvakf4lz5r8j88wx"))))
2581 (build-system gnu-build-system)
2583 `(#:tests? #f ; no "check" target
2585 "CFLAGS=-O2" ; override "-m64" flag
2586 (string-append "PREFIX=" (assoc-ref %outputs "out"))
2587 (string-append "MANDIR=" (assoc-ref %outputs "out")
2591 'unpack 'patch-manpage-install
2593 (substitute* "Makefile"
2594 (("cp \\$\\{PREFIX\\}/cpp/vcftools.1") "cp ./cpp/vcftools.1")))
2595 (alist-delete 'configure %standard-phases))))
2599 (home-page "http://vcftools.sourceforge.net/")
2600 (synopsis "Tools for working with VCF files")
2602 "VCFtools is a program package designed for working with VCF files, such
2603 as those generated by the 1000 Genomes Project. The aim of VCFtools is to
2604 provide easily accessible methods for working with complex genetic variation
2605 data in the form of VCF files.")
2606 ;; The license is declared as LGPLv3 in the README and
2607 ;; at http://vcftools.sourceforge.net/license.html
2608 (license license:lgpl3)))