gnu: htseq: Propagate numpy.
[jackhill/guix/guix.git] / gnu / packages / bioinformatics.scm
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>
4 ;;; Copyright © 2015 Pjotr Prins <pjotr.guix@thebird.nl>
5 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
6 ;;;
7 ;;; This file is part of GNU Guix.
8 ;;;
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
13 ;;;
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
18 ;;;
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21
22 (define-module (gnu packages bioinformatics)
23 #:use-module ((guix licenses) #:prefix license:)
24 #:use-module (guix packages)
25 #:use-module (guix utils)
26 #:use-module (guix download)
27 #:use-module (guix git-download)
28 #:use-module (guix build-system gnu)
29 #:use-module (guix build-system cmake)
30 #:use-module (guix build-system perl)
31 #:use-module (guix build-system python)
32 #:use-module (guix build-system r)
33 #:use-module (guix build-system ruby)
34 #:use-module (guix build-system trivial)
35 #:use-module (gnu packages)
36 #:use-module (gnu packages autotools)
37 #:use-module (gnu packages algebra)
38 #:use-module (gnu packages base)
39 #:use-module (gnu packages boost)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages cpio)
42 #:use-module (gnu packages file)
43 #:use-module (gnu packages java)
44 #:use-module (gnu packages linux)
45 #:use-module (gnu packages machine-learning)
46 #:use-module (gnu packages maths)
47 #:use-module (gnu packages mpi)
48 #:use-module (gnu packages ncurses)
49 #:use-module (gnu packages perl)
50 #:use-module (gnu packages pkg-config)
51 #:use-module (gnu packages popt)
52 #:use-module (gnu packages protobuf)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages ruby)
55 #:use-module (gnu packages statistics)
56 #:use-module (gnu packages tbb)
57 #:use-module (gnu packages textutils)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages vim)
60 #:use-module (gnu packages web)
61 #:use-module (gnu packages xml)
62 #:use-module (gnu packages zip)
63 #:use-module (srfi srfi-1))
64
65 (define-public aragorn
66 (package
67 (name "aragorn")
68 (version "1.2.36")
69 (source (origin
70 (method url-fetch)
71 (uri (string-append
72 "http://mbio-serv2.mbioekol.lu.se/ARAGORN/Downloads/aragorn"
73 version ".tgz"))
74 (sha256
75 (base32
76 "1dg7jlz1qpqy88igjxd6ncs11ccsirb36qv1z01a0np4i4jh61mb"))))
77 (build-system gnu-build-system)
78 (arguments
79 `(#:tests? #f ; there are no tests
80 #:phases
81 (modify-phases %standard-phases
82 (delete 'configure)
83 (replace 'build
84 (lambda _
85 (zero? (system* "gcc"
86 "-O3"
87 "-ffast-math"
88 "-finline-functions"
89 "-o"
90 "aragorn"
91 (string-append "aragorn" ,version ".c")))))
92 (replace 'install
93 (lambda* (#:key outputs #:allow-other-keys)
94 (let* ((out (assoc-ref outputs "out"))
95 (bin (string-append out "/bin"))
96 (man (string-append out "/share/man/man1")))
97 (mkdir-p bin)
98 (copy-file "aragorn"
99 (string-append bin "/aragorn"))
100 (mkdir-p man)
101 (copy-file "aragorn.1"
102 (string-append man "/aragorn.1")))
103 #t)))))
104 (home-page "http://mbio-serv2.mbioekol.lu.se/ARAGORN")
105 (synopsis "Detect tRNA, mtRNA and tmRNA genes in nucleotide sequences")
106 (description
107 "Aragorn identifies transfer RNA, mitochondrial RNA and
108 transfer-messenger RNA from nucleotide sequences, based on homology to known
109 tRNA consensus sequences and RNA structure. It also outputs the secondary
110 structure of the predicted RNA.")
111 (license license:gpl2)))
112
113 (define-public bamtools
114 (package
115 (name "bamtools")
116 (version "2.3.0")
117 (source (origin
118 (method url-fetch)
119 (uri (string-append
120 "https://github.com/pezmaster31/bamtools/archive/v"
121 version ".tar.gz"))
122 (file-name (string-append name "-" version ".tar.gz"))
123 (sha256
124 (base32
125 "1brry29bw2xr2l9pqn240rkqwayg85b8qq78zk2zs6nlspk4d018"))))
126 (build-system cmake-build-system)
127 (arguments
128 `(#:tests? #f ;no "check" target
129 #:phases
130 (modify-phases %standard-phases
131 (add-before
132 'configure 'set-ldflags
133 (lambda* (#:key outputs #:allow-other-keys)
134 (setenv "LDFLAGS"
135 (string-append
136 "-Wl,-rpath="
137 (assoc-ref outputs "out") "/lib/bamtools")))))))
138 (inputs `(("zlib" ,zlib)))
139 (home-page "https://github.com/pezmaster31/bamtools")
140 (synopsis "C++ API and command-line toolkit for working with BAM data")
141 (description
142 "BamTools provides both a C++ API and a command-line toolkit for handling
143 BAM files.")
144 (license license:expat)))
145
146 (define-public bedops
147 (package
148 (name "bedops")
149 (version "2.4.14")
150 (source (origin
151 (method url-fetch)
152 (uri (string-append "https://github.com/bedops/bedops/archive/v"
153 version ".tar.gz"))
154 (file-name (string-append name "-" version ".tar.gz"))
155 (sha256
156 (base32
157 "1kqbac547wyqma81cyky9n7mkgikjpsfd3nnmcm6hpqwanqgh10v"))))
158 (build-system gnu-build-system)
159 (arguments
160 '(#:tests? #f
161 #:make-flags (list (string-append "BINDIR=" %output "/bin"))
162 #:phases
163 (alist-cons-after
164 'unpack 'unpack-tarballs
165 (lambda _
166 ;; FIXME: Bedops includes tarballs of minimally patched upstream
167 ;; libraries jansson, zlib, and bzip2. We cannot just use stock
168 ;; libraries because at least one of the libraries (zlib) is
169 ;; patched to add a C++ function definition (deflateInit2cpp).
170 ;; Until the Bedops developers offer a way to link against system
171 ;; libraries we have to build the in-tree copies of these three
172 ;; libraries.
173
174 ;; See upstream discussion:
175 ;; https://github.com/bedops/bedops/issues/124
176
177 ;; Unpack the tarballs to benefit from shebang patching.
178 (with-directory-excursion "third-party"
179 (and (zero? (system* "tar" "xvf" "jansson-2.6.tar.bz2"))
180 (zero? (system* "tar" "xvf" "zlib-1.2.7.tar.bz2"))
181 (zero? (system* "tar" "xvf" "bzip2-1.0.6.tar.bz2"))))
182 ;; Disable unpacking of tarballs in Makefile.
183 (substitute* "system.mk/Makefile.linux"
184 (("^\tbzcat .*") "\t@echo \"not unpacking\"\n")
185 (("\\./configure") "CONFIG_SHELL=bash ./configure"))
186 (substitute* "third-party/zlib-1.2.7/Makefile.in"
187 (("^SHELL=.*$") "SHELL=bash\n")))
188 (alist-delete 'configure %standard-phases))))
189 (home-page "https://github.com/bedops/bedops")
190 (synopsis "Tools for high-performance genomic feature operations")
191 (description
192 "BEDOPS is a suite of tools to address common questions raised in genomic
193 studies---mostly with regard to overlap and proximity relationships between
194 data sets. It aims to be scalable and flexible, facilitating the efficient
195 and accurate analysis and management of large-scale genomic data.
196
197 BEDOPS provides tools that perform highly efficient and scalable Boolean and
198 other set operations, statistical calculations, archiving, conversion and
199 other management of genomic data of arbitrary scale. Tasks can be easily
200 split by chromosome for distributing whole-genome analyses across a
201 computational cluster.")
202 (license license:gpl2+)))
203
204 (define-public bedtools
205 (package
206 (name "bedtools")
207 (version "2.24.0")
208 (source (origin
209 (method url-fetch)
210 (uri (string-append "https://github.com/arq5x/bedtools2/archive/v"
211 version ".tar.gz"))
212 (file-name (string-append name "-" version ".tar.gz"))
213 (sha256
214 (base32
215 "0lnxrjvs3nnmb4bmskag1wg3h2hd80przz5q3xd0bvs7vyxrvpbl"))
216 (patches (list (search-patch "bedtools-32bit-compilation.patch")))))
217 (build-system gnu-build-system)
218 (native-inputs `(("python" ,python-2)))
219 (inputs `(("samtools" ,samtools)
220 ("zlib" ,zlib)))
221 (arguments
222 '(#:test-target "test"
223 #:phases
224 (alist-cons-after
225 'unpack 'patch-makefile-SHELL-definition
226 (lambda _
227 ;; patch-makefile-SHELL cannot be used here as it does not
228 ;; yet patch definitions with `:='. Since changes to
229 ;; patch-makefile-SHELL result in a full rebuild, features
230 ;; of patch-makefile-SHELL are reimplemented here.
231 (substitute* "Makefile"
232 (("^SHELL := .*$") (string-append "SHELL := " (which "bash") " -e \n"))))
233 (alist-delete
234 'configure
235 (alist-replace
236 'install
237 (lambda* (#:key outputs #:allow-other-keys)
238 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
239 (for-each (lambda (file)
240 (install-file file bin))
241 (find-files "bin" ".*"))))
242 %standard-phases)))))
243 (home-page "https://github.com/arq5x/bedtools2")
244 (synopsis "Tools for genome analysis and arithmetic")
245 (description
246 "Collectively, the bedtools utilities are a swiss-army knife of tools for
247 a wide-range of genomics analysis tasks. The most widely-used tools enable
248 genome arithmetic: that is, set theory on the genome. For example, bedtools
249 allows one to intersect, merge, count, complement, and shuffle genomic
250 intervals from multiple files in widely-used genomic file formats such as BAM,
251 BED, GFF/GTF, VCF.")
252 (license license:gpl2)))
253
254 (define-public python2-pybedtools
255 (package
256 (name "python2-pybedtools")
257 (version "0.6.9")
258 (source (origin
259 (method url-fetch)
260 (uri (string-append
261 "https://pypi.python.org/packages/source/p/pybedtools/pybedtools-"
262 version ".tar.gz"))
263 (sha256
264 (base32
265 "1ldzdxw1p4y3g2ignmggsdypvqkcwqwzhdha4rbgpih048z5p4an"))))
266 (build-system python-build-system)
267 (arguments `(#:python ,python-2)) ; no Python 3 support
268 (inputs
269 `(("python-cython" ,python2-cython)
270 ("python-matplotlib" ,python2-matplotlib)))
271 (propagated-inputs
272 `(("bedtools" ,bedtools)
273 ("samtools" ,samtools)))
274 (native-inputs
275 `(("python-pyyaml" ,python2-pyyaml)
276 ("python-nose" ,python2-nose)
277 ("python-setuptools" ,python2-setuptools)))
278 (home-page "https://pythonhosted.org/pybedtools/")
279 (synopsis "Python wrapper for BEDtools programs")
280 (description
281 "pybedtools is a Python wrapper for Aaron Quinlan's BEDtools programs,
282 which are widely used for genomic interval manipulation or \"genome algebra\".
283 pybedtools extends BEDTools by offering feature-level manipulations from with
284 Python.")
285 (license license:gpl2+)))
286
287 (define-public bioperl-minimal
288 (let* ((inputs `(("perl-module-build" ,perl-module-build)
289 ("perl-data-stag" ,perl-data-stag)
290 ("perl-libwww" ,perl-libwww)
291 ("perl-uri" ,perl-uri)))
292 (transitive-inputs
293 (map (compose package-name cadr)
294 (delete-duplicates
295 (concatenate
296 (map (compose package-transitive-target-inputs cadr) inputs))))))
297 (package
298 (name "bioperl-minimal")
299 (version "1.6.924")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (string-append "mirror://cpan/authors/id/C/CJ/CJFIELDS/BioPerl-"
304 version ".tar.gz"))
305 (sha256
306 (base32
307 "1l3npcvvvwjlhkna9dndpfv1hklhrgva013kw96m0n1wpd37ask1"))))
308 (build-system perl-build-system)
309 (arguments
310 `(#:phases
311 (modify-phases %standard-phases
312 (add-after
313 'install 'wrap-programs
314 (lambda* (#:key outputs #:allow-other-keys)
315 ;; Make sure all executables in "bin" find the required Perl
316 ;; modules at runtime. As the PERL5LIB variable contains also
317 ;; the paths of native inputs, we pick the transitive target
318 ;; inputs from %build-inputs.
319 (let* ((out (assoc-ref outputs "out"))
320 (bin (string-append out "/bin/"))
321 (path (string-join
322 (cons (string-append out "/lib/perl5/site_perl")
323 (map (lambda (name)
324 (assoc-ref %build-inputs name))
325 ',transitive-inputs))
326 ":")))
327 (for-each (lambda (file)
328 (wrap-program file
329 `("PERL5LIB" ":" prefix (,path))))
330 (find-files bin "\\.pl$"))
331 #t))))))
332 (inputs inputs)
333 (native-inputs
334 `(("perl-test-most" ,perl-test-most)))
335 (home-page "http://search.cpan.org/dist/BioPerl")
336 (synopsis "Bioinformatics toolkit")
337 (description
338 "BioPerl is the product of a community effort to produce Perl code which
339 is useful in biology. Examples include Sequence objects, Alignment objects
340 and database searching objects. These objects not only do what they are
341 advertised to do in the documentation, but they also interact - Alignment
342 objects are made from the Sequence objects, Sequence objects have access to
343 Annotation and SeqFeature objects and databases, Blast objects can be
344 converted to Alignment objects, and so on. This means that the objects
345 provide a coordinated and extensible framework to do computational biology.")
346 (license (package-license perl)))))
347
348 (define-public python-biopython
349 (package
350 (name "python-biopython")
351 (version "1.65")
352 (source (origin
353 (method url-fetch)
354 (uri (string-append
355 "http://biopython.org/DIST/biopython-"
356 version ".tar.gz"))
357 (sha256
358 (base32
359 "13m8s9jkrw40zvdp1rl709n6lmgdh4f52aann7gzr6sfp0fwhg26"))))
360 (build-system python-build-system)
361 (inputs
362 `(("python-numpy" ,python-numpy)))
363 (native-inputs
364 `(("python-setuptools" ,python2-setuptools)))
365 (home-page "http://biopython.org/")
366 (synopsis "Tools for biological computation in Python")
367 (description
368 "Biopython is a set of tools for biological computation including parsers
369 for bioinformatics files into Python data structures; interfaces to common
370 bioinformatics programs; a standard sequence class and tools for performing
371 common operations on them; code to perform data classification; code for
372 dealing with alignments; code making it easy to split up parallelizable tasks
373 into separate processes; and more.")
374 (license (license:non-copyleft "http://www.biopython.org/DIST/LICENSE"))))
375
376 (define-public python2-biopython
377 (package (inherit (package-with-python2 python-biopython))
378 (inputs
379 `(("python2-numpy" ,python2-numpy)))))
380
381 (define-public blast+
382 (package
383 (name "blast+")
384 (version "2.2.31")
385 (source (origin
386 (method url-fetch)
387 (uri (string-append
388 "ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/"
389 version "/ncbi-blast-" version "+-src.tar.gz"))
390 (sha256
391 (base32
392 "19gq6as4k1jrgsd26158ads6h7v4jca3h4r5dzg1y0m6ya50x5ph"))
393 (modules '((guix build utils)))
394 (snippet
395 '(begin
396 ;; Remove bundled bzip2 and zlib
397 (delete-file-recursively "c++/src/util/compress/bzip2")
398 (delete-file-recursively "c++/src/util/compress/zlib")
399 (substitute* "c++/src/util/compress/Makefile.in"
400 (("bzip2 zlib api") "api"))
401 ;; Remove useless msbuild directory
402 (delete-file-recursively
403 "c++/src/build-system/project_tree_builder/msbuild")
404 #t))))
405 (build-system gnu-build-system)
406 (arguments
407 `(;; There are three(!) tests for this massive library, and all fail with
408 ;; "unparsable timing stats".
409 ;; ERR [127] -- [util/regexp] test_pcre.sh (unparsable timing stats)
410 ;; ERR [127] -- [serial/datatool] datatool.sh (unparsable timing stats)
411 ;; ERR [127] -- [serial/datatool] datatool_xml.sh (unparsable timing stats)
412 #:tests? #f
413 #:out-of-source? #t
414 #:parallel-build? #f ; not supported
415 #:phases
416 (modify-phases %standard-phases
417 (add-before
418 'configure 'set-HOME
419 ;; $HOME needs to be set at some point during the configure phase
420 (lambda _ (setenv "HOME" "/tmp") #t))
421 (add-after
422 'unpack 'enter-dir
423 (lambda _ (chdir "c++") #t))
424 (add-after
425 'enter-dir 'fix-build-system
426 (lambda _
427 (define (which* cmd)
428 (cond ((string=? cmd "date")
429 ;; make call to "date" deterministic
430 "date -d @0")
431 ((which cmd)
432 => identity)
433 (else
434 (format (current-error-port)
435 "WARNING: Unable to find absolute path for ~s~%"
436 cmd)
437 #f)))
438
439 ;; Rewrite hardcoded paths to various tools
440 (substitute* (append '("src/build-system/configure.ac"
441 "src/build-system/configure"
442 "scripts/common/impl/if_diff.sh"
443 "scripts/common/impl/run_with_lock.sh"
444 "src/build-system/Makefile.configurables.real"
445 "src/build-system/Makefile.in.top"
446 "src/build-system/Makefile.meta.gmake=no"
447 "src/build-system/Makefile.meta.in"
448 "src/build-system/Makefile.meta_l"
449 "src/build-system/Makefile.meta_p"
450 "src/build-system/Makefile.meta_r"
451 "src/build-system/Makefile.mk.in"
452 "src/build-system/Makefile.requirements"
453 "src/build-system/Makefile.rules_with_autodep.in")
454 (find-files "scripts/common/check" "\\.sh$"))
455 (("(/usr/bin/|/bin/)([a-z][-_.a-z]*)" all dir cmd)
456 (or (which* cmd) all)))
457
458 (substitute* (find-files "src/build-system" "^config.*")
459 (("LN_S=/bin/\\$LN_S") (string-append "LN_S=" (which "ln")))
460 (("^PATH=.*") ""))
461
462 ;; rewrite "/var/tmp" in check script
463 (substitute* "scripts/common/check/check_make_unix.sh"
464 (("/var/tmp") "/tmp"))
465
466 ;; do not reset PATH
467 (substitute* (find-files "scripts/common/impl/" "\\.sh$")
468 (("^ *PATH=.*") "")
469 (("action=/bin/") "action=")
470 (("export PATH") ":"))
471 #t))
472 (replace
473 'configure
474 (lambda* (#:key inputs outputs #:allow-other-keys)
475 (let ((out (assoc-ref outputs "out"))
476 (lib (string-append (assoc-ref outputs "lib") "/lib"))
477 (include (string-append (assoc-ref outputs "include")
478 "/include/ncbi-tools++")))
479 ;; The 'configure' script doesn't recognize things like
480 ;; '--enable-fast-install'.
481 (zero? (system* "./configure.orig"
482 (string-append "--with-build-root=" (getcwd) "/build")
483 (string-append "--prefix=" out)
484 (string-append "--libdir=" lib)
485 (string-append "--includedir=" include)
486 (string-append "--with-bz2="
487 (assoc-ref inputs "bzip2"))
488 (string-append "--with-z="
489 (assoc-ref inputs "zlib"))
490 ;; Each library is built twice by default, once
491 ;; with "-static" in its name, and again
492 ;; without.
493 "--without-static"
494 "--with-dll"))))))))
495 (outputs '("out" ; 19 MB
496 "lib" ; 203 MB
497 "include")) ; 32 MB
498 (inputs
499 `(("bzip2" ,bzip2)
500 ("zlib" ,zlib)))
501 (native-inputs
502 `(("cpio" ,cpio)))
503 (home-page "http://blast.ncbi.nlm.nih.gov")
504 (synopsis "Basic local alignment search tool")
505 (description
506 "BLAST is a popular method of performing a DNA or protein sequence
507 similarity search, using heuristics to produce results quickly. It also
508 calculates an “expect value” that estimates how many matches would have
509 occurred at a given score by chance, which can aid a user in judging how much
510 confidence to have in an alignment.")
511 ;; Most of the sources are in the public domain, with the following
512 ;; exceptions:
513 ;; * Expat:
514 ;; * ./c++/include/util/bitset/
515 ;; * ./c++/src/html/ncbi_menu*.js
516 ;; * Boost license:
517 ;; * ./c++/include/util/impl/floating_point_comparison.hpp
518 ;; * LGPL 2+:
519 ;; * ./c++/include/dbapi/driver/odbc/unix_odbc/
520 ;; * ASL 2.0:
521 ;; * ./c++/src/corelib/teamcity_*
522 (license (list license:public-domain
523 license:expat
524 license:boost1.0
525 license:lgpl2.0+
526 license:asl2.0))))
527
528 (define-public bless
529 (package
530 (name "bless")
531 (version "1p02")
532 (source (origin
533 (method url-fetch)
534 (uri (string-append "mirror://sourceforge/bless-ec/bless.v"
535 version ".tgz"))
536 (sha256
537 (base32
538 "0rm0gw2s18dqwzzpl3c2x1z05ni2v0xz5dmfk3d33j6g4cgrlrdd"))
539 (modules '((guix build utils)))
540 (snippet
541 `(begin
542 ;; Remove bundled boost, pigz, zlib, and .git directory
543 ;; FIXME: also remove bundled sources for google-sparsehash,
544 ;; murmurhash3, kmc once packaged.
545 (delete-file-recursively "boost")
546 (delete-file-recursively "pigz")
547 (delete-file-recursively "zlib")
548 (delete-file-recursively ".git")
549 #t))))
550 (build-system gnu-build-system)
551 (arguments
552 '(#:tests? #f ;no "check" target
553 #:make-flags
554 (list (string-append "ZLIB="
555 (assoc-ref %build-inputs "zlib")
556 "/lib/libz.a")
557 (string-append "LDFLAGS="
558 (string-join '("-lboost_filesystem"
559 "-lboost_system"
560 "-lboost_iostreams"
561 "-lz"
562 "-fopenmp"
563 "-std=c++11"))))
564 #:phases
565 (modify-phases %standard-phases
566 (add-after 'unpack 'do-not-build-bundled-pigz
567 (lambda* (#:key inputs outputs #:allow-other-keys)
568 (substitute* "Makefile"
569 (("cd pigz/pigz-2.3.3; make") ""))
570 #t))
571 (add-after 'unpack 'patch-paths-to-executables
572 (lambda* (#:key inputs outputs #:allow-other-keys)
573 (substitute* "parse_args.cpp"
574 (("kmc_binary = .*")
575 (string-append "kmc_binary = \""
576 (assoc-ref outputs "out")
577 "/bin/kmc\";"))
578 (("pigz_binary = .*")
579 (string-append "pigz_binary = \""
580 (assoc-ref inputs "pigz")
581 "/bin/pigz\";")))
582 #t))
583 (replace 'install
584 (lambda* (#:key outputs #:allow-other-keys)
585 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
586 (for-each (lambda (file)
587 (install-file file bin))
588 '("bless" "kmc/bin/kmc"))
589 #t)))
590 (delete 'configure))))
591 (native-inputs
592 `(("perl" ,perl)))
593 (inputs
594 `(("openmpi" ,openmpi)
595 ("boost" ,boost)
596 ("pigz" ,pigz)
597 ("zlib" ,zlib)))
598 (home-page "http://sourceforge.net/p/bless-ec/wiki/Home/")
599 (synopsis "Bloom-filter-based error correction tool for NGS reads")
600 (description
601 "@dfn{Bloom-filter-based error correction solution for high-throughput
602 sequencing reads} (BLESS) uses a single minimum-sized bloom filter is a
603 correction tool for genomic reads produced by @dfn{Next-generation
604 sequencing} (NGS). BLESS produces accurate correction results with much less
605 memory compared with previous solutions and is also able to tolerate a higher
606 false-positive rate. BLESS can extend reads like DNA assemblers to correct
607 errors at the end of reads.")
608 (license license:gpl3+)))
609
610 (define-public bowtie
611 (package
612 (name "bowtie")
613 (version "2.2.4")
614 (source (origin
615 (method url-fetch)
616 (uri (string-append "https://github.com/BenLangmead/bowtie2/archive/v"
617 version ".tar.gz"))
618 (file-name (string-append name "-" version ".tar.gz"))
619 (sha256
620 (base32
621 "15dnbqippwvhyh9zqjhaxkabk7lm1xbh1nvar1x4b5kwm117zijn"))
622 (modules '((guix build utils)))
623 (snippet
624 '(substitute* "Makefile"
625 (("^CC = .*$") "CC = gcc")
626 (("^CPP = .*$") "CPP = g++")
627 ;; replace BUILD_HOST and BUILD_TIME for deterministic build
628 (("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
629 (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\"")))
630 (patches (list (search-patch "bowtie-fix-makefile.patch")))))
631 (build-system gnu-build-system)
632 (inputs `(("perl" ,perl)
633 ("perl-clone" ,perl-clone)
634 ("perl-test-deep" ,perl-test-deep)
635 ("perl-test-simple" ,perl-test-simple)
636 ("python" ,python-2)))
637 (arguments
638 '(#:make-flags '("allall")
639 #:phases
640 (alist-delete
641 'configure
642 (alist-replace
643 'install
644 (lambda* (#:key outputs #:allow-other-keys)
645 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
646 (for-each (lambda (file)
647 (install-file file bin))
648 (find-files "." "bowtie2.*"))))
649 (alist-replace
650 'check
651 (lambda* (#:key outputs #:allow-other-keys)
652 (system* "perl"
653 "scripts/test/simple_tests.pl"
654 "--bowtie2=./bowtie2"
655 "--bowtie2-build=./bowtie2-build"))
656 %standard-phases)))))
657 (home-page "http://bowtie-bio.sourceforge.net/bowtie2/index.shtml")
658 (synopsis "Fast and sensitive nucleotide sequence read aligner")
659 (description
660 "Bowtie 2 is a fast and memory-efficient tool for aligning sequencing
661 reads to long reference sequences. It is particularly good at aligning reads
662 of about 50 up to 100s or 1,000s of characters, and particularly good at
663 aligning to relatively long (e.g. mammalian) genomes. Bowtie 2 indexes the
664 genome with an FM Index to keep its memory footprint small: for the human
665 genome, its memory footprint is typically around 3.2 GB. Bowtie 2 supports
666 gapped, local, and paired-end alignment modes.")
667 (supported-systems '("x86_64-linux"))
668 (license license:gpl3+)))
669
670 (define-public bwa
671 (package
672 (name "bwa")
673 (version "0.7.12")
674 (source (origin
675 (method url-fetch)
676 (uri (string-append "mirror://sourceforge/bio-bwa/bwa-"
677 version ".tar.bz2"))
678 (sha256
679 (base32
680 "1330dpqncv0px3pbhjzz1gwgg39kkcv2r9qp2xs0sixf8z8wl7bh"))))
681 (build-system gnu-build-system)
682 (arguments
683 '(#:tests? #f ;no "check" target
684 #:phases
685 (alist-replace
686 'install
687 (lambda* (#:key outputs #:allow-other-keys)
688 (let ((bin (string-append
689 (assoc-ref outputs "out") "/bin"))
690 (doc (string-append
691 (assoc-ref outputs "out") "/share/doc/bwa"))
692 (man (string-append
693 (assoc-ref outputs "out") "/share/man/man1")))
694 (mkdir-p bin)
695 (mkdir-p doc)
696 (mkdir-p man)
697 (install-file "bwa" bin)
698 (install-file "README.md" doc)
699 (install-file "bwa.1" man)))
700 ;; no "configure" script
701 (alist-delete 'configure %standard-phases))))
702 (inputs `(("zlib" ,zlib)))
703 ;; Non-portable SSE instructions are used so building fails on platforms
704 ;; other than x86_64.
705 (supported-systems '("x86_64-linux"))
706 (home-page "http://bio-bwa.sourceforge.net/")
707 (synopsis "Burrows-Wheeler sequence aligner")
708 (description
709 "BWA is a software package for mapping low-divergent sequences against a
710 large reference genome, such as the human genome. It consists of three
711 algorithms: BWA-backtrack, BWA-SW and BWA-MEM. The first algorithm is
712 designed for Illumina sequence reads up to 100bp, while the rest two for
713 longer sequences ranged from 70bp to 1Mbp. BWA-MEM and BWA-SW share similar
714 features such as long-read support and split alignment, but BWA-MEM, which is
715 the latest, is generally recommended for high-quality queries as it is faster
716 and more accurate. BWA-MEM also has better performance than BWA-backtrack for
717 70-100bp Illumina reads.")
718 (license license:gpl3+)))
719
720 (define-public python2-bx-python
721 (package
722 (name "python2-bx-python")
723 (version "0.7.2")
724 (source (origin
725 (method url-fetch)
726 (uri (string-append
727 "https://pypi.python.org/packages/source/b/bx-python/bx-python-"
728 version ".tar.gz"))
729 (sha256
730 (base32
731 "0ld49idhc5zjdvbhvjq1a2qmpjj7h5v58rqr25dzmfq7g34b50xh"))
732 (modules '((guix build utils)))
733 (snippet
734 '(substitute* "setup.py"
735 ;; remove dependency on outdated "distribute" module
736 (("^from distribute_setup import use_setuptools") "")
737 (("^use_setuptools\\(\\)") "")))))
738 (build-system python-build-system)
739 (arguments
740 `(#:tests? #f ;tests fail because test data are not included
741 #:python ,python-2))
742 (inputs
743 `(("python-numpy" ,python2-numpy)
744 ("zlib" ,zlib)))
745 (native-inputs
746 `(("python-nose" ,python2-nose)
747 ("python-setuptools" ,python2-setuptools)))
748 (home-page "http://bitbucket.org/james_taylor/bx-python/")
749 (synopsis "Tools for manipulating biological data")
750 (description
751 "bx-python provides tools for manipulating biological data, particularly
752 multiple sequence alignments.")
753 (license license:expat)))
754
755 (define-public clipper
756 (package
757 (name "clipper")
758 (version "0.3.0")
759 (source (origin
760 (method url-fetch)
761 (uri (string-append
762 "https://github.com/YeoLab/clipper/archive/"
763 version ".tar.gz"))
764 (file-name (string-append name "-" version ".tar.gz"))
765 (sha256
766 (base32
767 "1q7jpimsqln7ic44i8v2rx2haj5wvik8hc1s2syd31zcn0xk1iyq"))
768 (modules '((guix build utils)))
769 (snippet
770 ;; remove unnecessary setup dependency
771 '(substitute* "setup.py"
772 (("setup_requires = .*") "")))))
773 (build-system python-build-system)
774 (arguments `(#:python ,python-2)) ; only Python 2 is supported
775 (inputs
776 `(("htseq" ,htseq)
777 ("python-pybedtools" ,python2-pybedtools)
778 ("python-cython" ,python2-cython)
779 ("python-scikit-learn" ,python2-scikit-learn)
780 ("python-matplotlib" ,python2-matplotlib)
781 ("python-pysam" ,python2-pysam)
782 ("python-numpy" ,python2-numpy)
783 ("python-scipy" ,python2-scipy)))
784 (native-inputs
785 `(("python-mock" ,python2-mock) ; for tests
786 ("python-pytz" ,python2-pytz) ; for tests
787 ("python-setuptools" ,python2-setuptools)))
788 (home-page "https://github.com/YeoLab/clipper")
789 (synopsis "CLIP peak enrichment recognition")
790 (description
791 "CLIPper is a tool to define peaks in CLIP-seq datasets.")
792 (license license:gpl2)))
793
794 (define-public couger
795 (package
796 (name "couger")
797 (version "1.8.2")
798 (source (origin
799 (method url-fetch)
800 (uri (string-append
801 "http://couger.oit.duke.edu/static/assets/COUGER"
802 version ".zip"))
803 (sha256
804 (base32
805 "04p2b14nmhzxw5h72mpzdhalv21bx4w9b87z0wpw0xzxpysyncmq"))))
806 (build-system gnu-build-system)
807 (arguments
808 `(#:tests? #f
809 #:phases
810 (modify-phases %standard-phases
811 (delete 'configure)
812 (delete 'build)
813 (replace
814 'install
815 (lambda* (#:key outputs #:allow-other-keys)
816 (let ((out (assoc-ref outputs "out")))
817 (copy-recursively "src" (string-append out "/src"))
818 (mkdir (string-append out "/bin"))
819 ;; Add "src" directory to module lookup path.
820 (substitute* "couger"
821 (("from argparse")
822 (string-append "import sys\nsys.path.append(\""
823 out "\")\nfrom argparse")))
824 (copy-file "couger" (string-append out "/bin/couger")))
825 #t))
826 (add-after
827 'install 'wrap-program
828 (lambda* (#:key inputs outputs #:allow-other-keys)
829 ;; Make sure 'couger' runs with the correct PYTHONPATH.
830 (let* ((out (assoc-ref outputs "out"))
831 (path (getenv "PYTHONPATH")))
832 (wrap-program (string-append out "/bin/couger")
833 `("PYTHONPATH" ":" prefix (,path))))
834 #t)))))
835 (inputs
836 `(("python" ,python-2)
837 ("python2-pillow" ,python2-pillow)
838 ("python2-numpy" ,python2-numpy)
839 ("python2-scipy" ,python2-scipy)
840 ("python2-matplotlib" ,python2-matplotlib)))
841 (propagated-inputs
842 `(("r" ,r)
843 ("libsvm" ,libsvm)
844 ("randomjungle" ,randomjungle)))
845 (native-inputs
846 `(("unzip" ,unzip)))
847 (home-page "http://couger.oit.duke.edu")
848 (synopsis "Identify co-factors in sets of genomic regions")
849 (description
850 "COUGER can be applied to any two sets of genomic regions bound by
851 paralogous TFs (e.g., regions derived from ChIP-seq experiments) to identify
852 putative co-factors that provide specificity to each TF. The framework
853 determines the genomic targets uniquely-bound by each TF, and identifies a
854 small set of co-factors that best explain the in vivo binding differences
855 between the two TFs.
856
857 COUGER uses classification algorithms (support vector machines and random
858 forests) with features that reflect the DNA binding specificities of putative
859 co-factors. The features are generated either from high-throughput TF-DNA
860 binding data (from protein binding microarray experiments), or from large
861 collections of DNA motifs.")
862 (license license:gpl3+)))
863
864 (define-public clustal-omega
865 (package
866 (name "clustal-omega")
867 (version "1.2.1")
868 (source (origin
869 (method url-fetch)
870 (uri (string-append
871 "http://www.clustal.org/omega/clustal-omega-"
872 version ".tar.gz"))
873 (sha256
874 (base32
875 "02ibkx0m0iwz8nscg998bh41gg251y56cgh86bvyrii5m8kjgwqf"))))
876 (build-system gnu-build-system)
877 (inputs
878 `(("argtable" ,argtable)))
879 (home-page "http://www.clustal.org/omega/")
880 (synopsis "Multiple sequence aligner for protein and DNA/RNA")
881 (description
882 "Clustal-Omega is a general purpose multiple sequence alignment (MSA)
883 program for protein and DNA/RNA. It produces high quality MSAs and is capable
884 of handling data-sets of hundreds of thousands of sequences in reasonable
885 time.")
886 (license license:gpl2+)))
887
888 (define-public crossmap
889 (package
890 (name "crossmap")
891 (version "0.2.1")
892 (source (origin
893 (method url-fetch)
894 (uri (string-append "mirror://sourceforge/crossmap/CrossMap-"
895 version ".tar.gz"))
896 (sha256
897 (base32
898 "07y179f63d7qnzdvkqcziwk9bs3k4zhp81q392fp1hwszjdvy22f"))
899 ;; This patch has been sent upstream already and is available
900 ;; for download from Sourceforge, but it has not been merged.
901 (patches (list
902 (search-patch "crossmap-allow-system-pysam.patch")))
903 (modules '((guix build utils)))
904 ;; remove bundled copy of pysam
905 (snippet
906 '(delete-file-recursively "lib/pysam"))))
907 (build-system python-build-system)
908 (arguments
909 `(#:python ,python-2
910 #:phases
911 (alist-cons-after
912 'unpack 'set-env
913 (lambda _ (setenv "CROSSMAP_USE_SYSTEM_PYSAM" "1"))
914 %standard-phases)))
915 (inputs
916 `(("python-numpy" ,python2-numpy)
917 ("python-pysam" ,python2-pysam)
918 ("zlib" ,zlib)))
919 (native-inputs
920 `(("python-cython" ,python2-cython)
921 ("python-nose" ,python2-nose)
922 ("python-setuptools" ,python2-setuptools)))
923 (home-page "http://crossmap.sourceforge.net/")
924 (synopsis "Convert genome coordinates between assemblies")
925 (description
926 "CrossMap is a program for conversion of genome coordinates or annotation
927 files between different genome assemblies. It supports most commonly used
928 file formats including SAM/BAM, Wiggle/BigWig, BED, GFF/GTF, VCF.")
929 (license license:gpl2+)))
930
931 (define-public cutadapt
932 (package
933 (name "cutadapt")
934 (version "1.8")
935 (source (origin
936 (method url-fetch)
937 (uri (string-append
938 "https://github.com/marcelm/cutadapt/archive/v"
939 version ".tar.gz"))
940 (file-name (string-append name "-" version ".tar.gz"))
941 (sha256
942 (base32
943 "161bp87y6gd6r5bmvjpn2b1k942i3fizfpa139f0jn6jv1wcp5h5"))))
944 (build-system python-build-system)
945 (arguments
946 ;; tests must be run after install
947 `(#:phases (alist-cons-after
948 'install 'check
949 (lambda* (#:key inputs outputs #:allow-other-keys)
950 (setenv "PYTHONPATH"
951 (string-append
952 (getenv "PYTHONPATH")
953 ":" (assoc-ref outputs "out")
954 "/lib/python"
955 (string-take (string-take-right
956 (assoc-ref inputs "python") 5) 3)
957 "/site-packages"))
958 (zero? (system* "nosetests" "-P" "tests")))
959 (alist-delete 'check %standard-phases))))
960 (native-inputs
961 `(("python-cython" ,python-cython)
962 ("python-nose" ,python-nose)
963 ("python-setuptools" ,python-setuptools)))
964 (home-page "https://code.google.com/p/cutadapt/")
965 (synopsis "Remove adapter sequences from nucleotide sequencing reads")
966 (description
967 "Cutadapt finds and removes adapter sequences, primers, poly-A tails and
968 other types of unwanted sequence from high-throughput sequencing reads.")
969 (license license:expat)))
970
971 (define-public deeptools
972 (package
973 (name "deeptools")
974 (version "1.5.11")
975 (source (origin
976 (method url-fetch)
977 (uri (string-append
978 "https://github.com/fidelram/deepTools/archive/"
979 version ".tar.gz"))
980 (file-name (string-append name "-" version ".tar.gz"))
981 (sha256
982 (base32
983 "1kaagygcbvjs9sxd9cqmskd02wcfp9imvb735r087w7hwqpvz6fs"))))
984 (build-system python-build-system)
985 (arguments
986 `(#:python ,python-2))
987 (propagated-inputs
988 `(("python-scipy" ,python2-scipy)
989 ("python-numpy" ,python2-numpy)
990 ("python-matplotlib" ,python2-matplotlib)
991 ("python-bx-python" ,python2-bx-python)
992 ("python-pysam" ,python2-pysam)))
993 (native-inputs
994 `(("python-mock" ,python2-mock) ;for tests
995 ("python-pytz" ,python2-pytz) ;for tests
996 ("python-setuptools" ,python2-setuptools)))
997 (home-page "https://github.com/fidelram/deepTools")
998 (synopsis "Tools for normalizing and visualizing deep-sequencing data")
999 (description
1000 "DeepTools addresses the challenge of handling the large amounts of data
1001 that are now routinely generated from DNA sequencing centers. To do so,
1002 deepTools contains useful modules to process the mapped reads data to create
1003 coverage files in standard bedGraph and bigWig file formats. By doing so,
1004 deepTools allows the creation of normalized coverage files or the comparison
1005 between two files (for example, treatment and control). Finally, using such
1006 normalized and standardized files, multiple visualizations can be created to
1007 identify enrichments with functional annotations of the genome.")
1008 (license license:gpl3+)))
1009
1010 (define-public diamond
1011 (package
1012 (name "diamond")
1013 (version "0.7.9")
1014 (source (origin
1015 (method url-fetch)
1016 (uri (string-append
1017 "https://github.com/bbuchfink/diamond/archive/v"
1018 version ".tar.gz"))
1019 (file-name (string-append name "-" version ".tar.gz"))
1020 (sha256
1021 (base32
1022 "0hfkcfv9f76h5brbyw9fyvmc0l9cmbsxrcdqk0fa9xv82zj47p15"))
1023 (snippet '(begin
1024 (delete-file "bin/diamond")
1025 #t))))
1026 (build-system gnu-build-system)
1027 (arguments
1028 '(#:tests? #f ;no "check" target
1029 #:phases
1030 (modify-phases %standard-phases
1031 (add-after 'unpack 'enter-source-dir
1032 (lambda _
1033 (chdir "src")
1034 #t))
1035 (delete 'configure)
1036 (replace 'install
1037 (lambda* (#:key outputs #:allow-other-keys)
1038 (let ((bin (string-append (assoc-ref outputs "out")
1039 "/bin")))
1040 (mkdir-p bin)
1041 (copy-file "../bin/diamond"
1042 (string-append bin "/diamond"))
1043 #t))))))
1044 (native-inputs
1045 `(("bc" ,bc)))
1046 (inputs
1047 `(("boost" ,boost)
1048 ("zlib" ,zlib)))
1049 (home-page "https://github.com/bbuchfink/diamond")
1050 (synopsis "Accelerated BLAST compatible local sequence aligner")
1051 (description
1052 "DIAMOND is a BLAST-compatible local aligner for mapping protein and
1053 translated DNA query sequences against a protein reference database (BLASTP
1054 and BLASTX alignment mode). The speedup over BLAST is up to 20,000 on short
1055 reads at a typical sensitivity of 90-99% relative to BLAST depending on the
1056 data and settings.")
1057 ;; diamond fails to build on other platforms
1058 ;; https://github.com/bbuchfink/diamond/issues/18
1059 (supported-systems '("x86_64-linux"))
1060 (license (license:non-copyleft "file://src/COPYING"
1061 "See src/COPYING in the distribution."))))
1062
1063 (define-public edirect
1064 (package
1065 (name "edirect")
1066 (version "2.50")
1067 (source (origin
1068 (method url-fetch)
1069 ;; Note: older versions are not retained.
1070 (uri "ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/edirect.zip")
1071 (sha256
1072 (base32
1073 "08afhz2ph66h8h381hl1mqyxkdi5nbvzsyj9gfw3jfbdijnpi4qj"))))
1074 (build-system perl-build-system)
1075 (arguments
1076 `(#:tests? #f ;no "check" target
1077 #:phases
1078 (modify-phases %standard-phases
1079 (delete 'configure)
1080 (delete 'build)
1081 (replace 'install
1082 (lambda* (#:key outputs #:allow-other-keys)
1083 (let ((target (string-append (assoc-ref outputs "out")
1084 "/bin")))
1085 (mkdir-p target)
1086 (copy-file "edirect.pl"
1087 (string-append target "/edirect.pl"))
1088 #t)))
1089 (add-after
1090 'install 'wrap-program
1091 (lambda* (#:key inputs outputs #:allow-other-keys)
1092 ;; Make sure 'edirect.pl' finds all perl inputs at runtime.
1093 (let* ((out (assoc-ref outputs "out"))
1094 (path (getenv "PERL5LIB")))
1095 (wrap-program (string-append out "/bin/edirect.pl")
1096 `("PERL5LIB" ":" prefix (,path)))))))))
1097 (inputs
1098 `(("perl-html-parser" ,perl-html-parser)
1099 ("perl-encode-locale" ,perl-encode-locale)
1100 ("perl-file-listing" ,perl-file-listing)
1101 ("perl-html-tagset" ,perl-html-tagset)
1102 ("perl-html-tree" ,perl-html-tree)
1103 ("perl-http-cookies" ,perl-http-cookies)
1104 ("perl-http-date" ,perl-http-date)
1105 ("perl-http-message" ,perl-http-message)
1106 ("perl-http-negotiate" ,perl-http-negotiate)
1107 ("perl-lwp-mediatypes" ,perl-lwp-mediatypes)
1108 ("perl-lwp-protocol-https" ,perl-lwp-protocol-https)
1109 ("perl-net-http" ,perl-net-http)
1110 ("perl-uri" ,perl-uri)
1111 ("perl-www-robotrules" ,perl-www-robotrules)
1112 ("perl" ,perl)))
1113 (native-inputs
1114 `(("unzip" ,unzip)))
1115 (home-page "http://www.ncbi.nlm.nih.gov/books/NBK179288")
1116 (synopsis "Tools for accessing the NCBI's set of databases")
1117 (description
1118 "Entrez Direct (EDirect) is a method for accessing the National Center
1119 for Biotechnology Information's (NCBI) set of interconnected
1120 databases (publication, sequence, structure, gene, variation, expression,
1121 etc.) from a terminal. Functions take search terms from command-line
1122 arguments. Individual operations are combined to build multi-step queries.
1123 Record retrieval and formatting normally complete the process.
1124
1125 EDirect also provides an argument-driven function that simplifies the
1126 extraction of data from document summaries or other results that are returned
1127 in structured XML format. This can eliminate the need for writing custom
1128 software to answer ad hoc questions.")
1129 (license license:public-domain)))
1130
1131 (define-public express
1132 (package
1133 (name "express")
1134 (version "1.5.1")
1135 (source (origin
1136 (method url-fetch)
1137 (uri
1138 (string-append
1139 "http://bio.math.berkeley.edu/eXpress/downloads/express-"
1140 version "/express-" version "-src.tgz"))
1141 (sha256
1142 (base32
1143 "03rczxd0gjp2l1jxcmjfmf5j94j77zqyxa6x063zsc585nj40n0c"))))
1144 (build-system cmake-build-system)
1145 (arguments
1146 `(#:tests? #f ;no "check" target
1147 #:phases
1148 (alist-cons-after
1149 'unpack 'use-shared-boost-libs-and-set-bamtools-paths
1150 (lambda* (#:key inputs #:allow-other-keys)
1151 (substitute* "CMakeLists.txt"
1152 (("set\\(Boost_USE_STATIC_LIBS ON\\)")
1153 "set(Boost_USE_STATIC_LIBS OFF)")
1154 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/bamtools/include")
1155 (string-append (assoc-ref inputs "bamtools") "/include/bamtools")))
1156 (substitute* "src/CMakeLists.txt"
1157 (("\\$\\{CMAKE_CURRENT_SOURCE_DIR\\}/\\.\\./bamtools/lib")
1158 (string-append (assoc-ref inputs "bamtools") "/lib/bamtools")))
1159 #t)
1160 %standard-phases)))
1161 (inputs
1162 `(("boost" ,boost)
1163 ("bamtools" ,bamtools)
1164 ("protobuf" ,protobuf)
1165 ("zlib" ,zlib)))
1166 (home-page "http://bio.math.berkeley.edu/eXpress")
1167 (synopsis "Streaming quantification for high-throughput genomic sequencing")
1168 (description
1169 "eXpress is a streaming tool for quantifying the abundances of a set of
1170 target sequences from sampled subsequences. Example applications include
1171 transcript-level RNA-Seq quantification, allele-specific/haplotype expression
1172 analysis (from RNA-Seq), transcription factor binding quantification in
1173 ChIP-Seq, and analysis of metagenomic data.")
1174 (license license:artistic2.0)))
1175
1176 (define-public express-beta-diversity
1177 (package
1178 (name "express-beta-diversity")
1179 (version "1.0.7")
1180 (source (origin
1181 (method url-fetch)
1182 (uri
1183 (string-append
1184 "https://github.com/dparks1134/ExpressBetaDiversity/archive/v"
1185 version ".tar.gz"))
1186 (file-name (string-append name "-" version ".tar.gz"))
1187 (sha256
1188 (base32
1189 "1djvdlmqvjf6h0zq7w36y8cl5cli6rgj86x65znl48agnwmzxfxr"))))
1190 (build-system gnu-build-system)
1191 (arguments
1192 `(#:phases
1193 (modify-phases %standard-phases
1194 (delete 'configure)
1195 (add-before 'build 'enter-source (lambda _ (chdir "source") #t))
1196 (replace 'check
1197 (lambda _ (zero? (system* "../bin/ExpressBetaDiversity"
1198 "-u"))))
1199 (add-after 'check 'exit-source (lambda _ (chdir "..") #t))
1200 (replace 'install
1201 (lambda* (#:key outputs #:allow-other-keys)
1202 (let ((bin (string-append (assoc-ref outputs "out")
1203 "/bin")))
1204 (mkdir-p bin)
1205 (copy-file "scripts/convertToEBD.py"
1206 (string-append bin "/convertToEBD.py"))
1207 (copy-file "bin/ExpressBetaDiversity"
1208 (string-append bin "/ExpressBetaDiversity"))
1209 #t))))))
1210 (inputs
1211 `(("python" ,python-2)))
1212 (home-page "http://kiwi.cs.dal.ca/Software/ExpressBetaDiversity")
1213 (synopsis "Taxon- and phylogenetic-based beta diversity measures")
1214 (description
1215 "Express Beta Diversity (EBD) calculates ecological beta diversity
1216 (dissimilarity) measures between biological communities. EBD implements a
1217 variety of diversity measures including those that make use of phylogenetic
1218 similarity of community members.")
1219 (license license:gpl3+)))
1220
1221 (define-public fasttree
1222 (package
1223 (name "fasttree")
1224 (version "2.1.8")
1225 (source (origin
1226 (method url-fetch)
1227 (uri (string-append
1228 "http://www.microbesonline.org/fasttree/FastTree-"
1229 version ".c"))
1230 (sha256
1231 (base32
1232 "0dzqc9vr9iiiw21y159xfjl2z90vw0y7r4x6456pcaxiy5hd2wmi"))))
1233 (build-system gnu-build-system)
1234 (arguments
1235 `(#:tests? #f ; no "check" target
1236 #:phases
1237 (modify-phases %standard-phases
1238 (delete 'unpack)
1239 (delete 'configure)
1240 (replace 'build
1241 (lambda* (#:key source #:allow-other-keys)
1242 (and (zero? (system* "gcc"
1243 "-O3"
1244 "-finline-functions"
1245 "-funroll-loops"
1246 "-Wall"
1247 "-o"
1248 "FastTree"
1249 source
1250 "-lm"))
1251 (zero? (system* "gcc"
1252 "-DOPENMP"
1253 "-fopenmp"
1254 "-O3"
1255 "-finline-functions"
1256 "-funroll-loops"
1257 "-Wall"
1258 "-o"
1259 "FastTreeMP"
1260 source
1261 "-lm")))))
1262 (replace 'install
1263 (lambda* (#:key outputs #:allow-other-keys)
1264 (let ((bin (string-append (assoc-ref outputs "out")
1265 "/bin")))
1266 (mkdir-p bin)
1267 (copy-file "FastTree"
1268 (string-append bin "/FastTree"))
1269 (copy-file "FastTreeMP"
1270 (string-append bin "/FastTreeMP"))
1271 #t))))))
1272 (home-page "http://www.microbesonline.org/fasttree")
1273 (synopsis "Infers approximately-maximum-likelihood phylogenetic trees")
1274 (description
1275 "FastTree can handle alignments with up to a million of sequences in a
1276 reasonable amount of time and memory. For large alignments, FastTree is
1277 100-1,000 times faster than PhyML 3.0 or RAxML 7.")
1278 (license license:gpl2+)))
1279
1280 (define-public fastx-toolkit
1281 (package
1282 (name "fastx-toolkit")
1283 (version "0.0.14")
1284 (source (origin
1285 (method url-fetch)
1286 (uri
1287 (string-append
1288 "https://github.com/agordon/fastx_toolkit/releases/download/"
1289 version "/fastx_toolkit-" version ".tar.bz2"))
1290 (sha256
1291 (base32
1292 "01jqzw386873sr0pjp1wr4rn8fsga2vxs1qfmicvx1pjr72007wy"))))
1293 (build-system gnu-build-system)
1294 (inputs
1295 `(("libgtextutils" ,libgtextutils)))
1296 (native-inputs
1297 `(("pkg-config" ,pkg-config)))
1298 (home-page "http://hannonlab.cshl.edu/fastx_toolkit/")
1299 (synopsis "Tools for FASTA/FASTQ file preprocessing")
1300 (description
1301 "The FASTX-Toolkit is a collection of command line tools for Short-Reads
1302 FASTA/FASTQ files preprocessing.
1303
1304 Next-Generation sequencing machines usually produce FASTA or FASTQ files,
1305 containing multiple short-reads sequences. The main processing of such
1306 FASTA/FASTQ files is mapping the sequences to reference genomes. However, it
1307 is sometimes more productive to preprocess the files before mapping the
1308 sequences to the genome---manipulating the sequences to produce better mapping
1309 results. The FASTX-Toolkit tools perform some of these preprocessing tasks.")
1310 (license license:agpl3+)))
1311
1312 (define-public flexbar
1313 (package
1314 (name "flexbar")
1315 (version "2.5")
1316 (source (origin
1317 (method url-fetch)
1318 (uri
1319 (string-append "mirror://sourceforge/flexbar/"
1320 version "/flexbar_v" version "_src.tgz"))
1321 (sha256
1322 (base32
1323 "13jaykc3y1x8y5nn9j8ljnb79s5y51kyxz46hdmvvjj6qhyympmf"))))
1324 (build-system cmake-build-system)
1325 (arguments
1326 `(#:configure-flags (list
1327 (string-append "-DFLEXBAR_BINARY_DIR="
1328 (assoc-ref %outputs "out")
1329 "/bin/"))
1330 #:phases
1331 (alist-replace
1332 'check
1333 (lambda* (#:key outputs #:allow-other-keys)
1334 (setenv "PATH" (string-append
1335 (assoc-ref outputs "out") "/bin:"
1336 (getenv "PATH")))
1337 (chdir "../flexbar_v2.5_src/test")
1338 (zero? (system* "bash" "flexbar_validate.sh")))
1339 (alist-delete 'install %standard-phases))))
1340 (inputs
1341 `(("tbb" ,tbb)
1342 ("zlib" ,zlib)))
1343 (native-inputs
1344 `(("pkg-config" ,pkg-config)
1345 ("seqan" ,seqan)))
1346 (home-page "http://flexbar.sourceforge.net")
1347 (synopsis "Barcode and adapter removal tool for sequencing platforms")
1348 (description
1349 "Flexbar preprocesses high-throughput nucleotide sequencing data
1350 efficiently. It demultiplexes barcoded runs and removes adapter sequences.
1351 Moreover, trimming and filtering features are provided. Flexbar increases
1352 read mapping rates and improves genome and transcriptome assemblies. It
1353 supports next-generation sequencing data in fasta/q and csfasta/q format from
1354 Illumina, Roche 454, and the SOLiD platform.")
1355 (license license:gpl3)))
1356
1357 (define-public grit
1358 (package
1359 (name "grit")
1360 (version "2.0.2")
1361 (source (origin
1362 (method url-fetch)
1363 (uri (string-append
1364 "https://github.com/nboley/grit/archive/"
1365 version ".tar.gz"))
1366 (file-name (string-append name "-" version ".tar.gz"))
1367 (sha256
1368 (base32
1369 "157in84dj70wimbind3x7sy1whs3h57qfgcnj2s6lrd38fbrb7mj"))))
1370 (build-system python-build-system)
1371 (arguments
1372 `(#:python ,python-2
1373 #:phases
1374 (alist-cons-after
1375 'unpack 'generate-from-cython-sources
1376 (lambda* (#:key inputs outputs #:allow-other-keys)
1377 ;; Delete these C files to force fresh generation from pyx sources.
1378 (delete-file "grit/sparsify_support_fns.c")
1379 (delete-file "grit/call_peaks_support_fns.c")
1380 (substitute* "setup.py"
1381 (("Cython.Setup") "Cython.Build")
1382 ;; Add numpy include path to fix compilation
1383 (("pyx\", \\]")
1384 (string-append "pyx\", ], include_dirs = ['"
1385 (assoc-ref inputs "python-numpy")
1386 "/lib/python2.7/site-packages/numpy/core/include/"
1387 "']"))) #t)
1388 %standard-phases)))
1389 (inputs
1390 `(("python-scipy" ,python2-scipy)
1391 ("python-numpy" ,python2-numpy)
1392 ("python-pysam" ,python2-pysam)
1393 ("python-networkx" ,python2-networkx)))
1394 (native-inputs
1395 `(("python-cython" ,python2-cython)
1396 ("python-setuptools" ,python2-setuptools)))
1397 (home-page "http://grit-bio.org")
1398 (synopsis "Tool for integrative analysis of RNA-seq type assays")
1399 (description
1400 "GRIT is designed to use RNA-seq, TES, and TSS data to build and quantify
1401 full length transcript models. When none of these data sources are available,
1402 GRIT can be run by providing a candidate set of TES or TSS sites. In
1403 addition, GRIT can merge in reference junctions and gene boundaries. GRIT can
1404 also be run in quantification mode, where it uses a provided GTF file and just
1405 estimates transcript expression.")
1406 (license license:gpl3+)))
1407
1408 (define-public hisat
1409 (package
1410 (name "hisat")
1411 (version "0.1.4")
1412 (source (origin
1413 (method url-fetch)
1414 (uri (string-append
1415 "http://ccb.jhu.edu/software/hisat/downloads/hisat-"
1416 version "-beta-source.zip"))
1417 (sha256
1418 (base32
1419 "1k381ydranqxp09yf2y7w1d0chz5d59vb6jchi89hbb0prq19lk5"))))
1420 (build-system gnu-build-system)
1421 (arguments
1422 `(#:tests? #f ;no check target
1423 #:make-flags '("allall"
1424 ;; Disable unsupported `popcnt' instructions on
1425 ;; architectures other than x86_64
1426 ,@(if (string-prefix? "x86_64"
1427 (or (%current-target-system)
1428 (%current-system)))
1429 '()
1430 '("POPCNT_CAPABILITY=0")))
1431 #:phases
1432 (alist-cons-after
1433 'unpack 'patch-sources
1434 (lambda _
1435 ;; XXX Cannot use snippet because zip files are not supported
1436 (substitute* "Makefile"
1437 (("^CC = .*$") "CC = gcc")
1438 (("^CPP = .*$") "CPP = g++")
1439 ;; replace BUILD_HOST and BUILD_TIME for deterministic build
1440 (("-DBUILD_HOST=.*") "-DBUILD_HOST=\"\\\"guix\\\"\"")
1441 (("-DBUILD_TIME=.*") "-DBUILD_TIME=\"\\\"0\\\"\""))
1442 (substitute* '("hisat-build" "hisat-inspect")
1443 (("/usr/bin/env") (which "env"))))
1444 (alist-replace
1445 'install
1446 (lambda* (#:key outputs #:allow-other-keys)
1447 (let ((bin (string-append (assoc-ref outputs "out") "/bi/")))
1448 (for-each (lambda (file)
1449 (install-file file bin))
1450 (find-files
1451 "."
1452 "hisat(-(build|align|inspect)(-(s|l)(-debug)*)*)*$"))))
1453 (alist-delete 'configure %standard-phases)))))
1454 (native-inputs
1455 `(("unzip" ,unzip)))
1456 (inputs
1457 `(("perl" ,perl)
1458 ("python" ,python)
1459 ("zlib" ,zlib)))
1460 ;; Non-portable SSE instructions are used so building fails on platforms
1461 ;; other than x86_64.
1462 (supported-systems '("x86_64-linux"))
1463 (home-page "http://ccb.jhu.edu/software/hisat/index.shtml")
1464 (synopsis "Hierarchical indexing for spliced alignment of transcripts")
1465 (description
1466 "HISAT is a fast and sensitive spliced alignment program for mapping
1467 RNA-seq reads. In addition to one global FM index that represents a whole
1468 genome, HISAT uses a large set of small FM indexes that collectively cover the
1469 whole genome. These small indexes (called local indexes) combined with
1470 several alignment strategies enable effective alignment of RNA-seq reads, in
1471 particular, reads spanning multiple exons.")
1472 (license license:gpl3+)))
1473
1474 (define-public hmmer
1475 (package
1476 (name "hmmer")
1477 (version "3.1b2")
1478 (source (origin
1479 (method url-fetch)
1480 (uri (string-append
1481 "http://selab.janelia.org/software/hmmer"
1482 (version-prefix version 1) "/"
1483 version "/hmmer-" version ".tar.gz"))
1484 (sha256
1485 (base32
1486 "0djmgc0pfli0jilfx8hql1axhwhqxqb8rxg2r5rg07aw73sfs5nx"))))
1487 (build-system gnu-build-system)
1488 (native-inputs `(("perl", perl)))
1489 (home-page "http://hmmer.janelia.org")
1490 (synopsis "Biosequence analysis using profile hidden Markov models")
1491 (description
1492 "HMMER is used for searching sequence databases for homologs of protein
1493 sequences, and for making protein sequence alignments. It implements methods
1494 using probabilistic models called profile hidden Markov models (profile
1495 HMMs).")
1496 (license (list license:gpl3+
1497 ;; The bundled library 'easel' is distributed
1498 ;; under The Janelia Farm Software License.
1499 (license:non-copyleft
1500 "file://easel/LICENSE"
1501 "See easel/LICENSE in the distribution.")))))
1502
1503 (define-public htseq
1504 (package
1505 (name "htseq")
1506 (version "0.6.1")
1507 (source (origin
1508 (method url-fetch)
1509 (uri (string-append
1510 "https://pypi.python.org/packages/source/H/HTSeq/HTSeq-"
1511 version ".tar.gz"))
1512 (sha256
1513 (base32
1514 "1i85ppf2j2lj12m0x690qq5nn17xxk23pbbx2c83r8ayb5wngzwv"))))
1515 (build-system python-build-system)
1516 (arguments `(#:python ,python-2)) ; only Python 2 is supported
1517 ;; Numpy needs to be propagated when htseq is used as a Python library.
1518 (propagated-inputs
1519 `(("python-numpy" ,python2-numpy)))
1520 (native-inputs
1521 `(("python-setuptools" ,python2-setuptools)))
1522 (home-page "http://www-huber.embl.de/users/anders/HTSeq/")
1523 (synopsis "Analysing high-throughput sequencing data with Python")
1524 (description
1525 "HTSeq is a Python package that provides infrastructure to process data
1526 from high-throughput sequencing assays.")
1527 (license license:gpl3+)))
1528
1529 (define-public htsjdk
1530 (package
1531 (name "htsjdk")
1532 (version "1.129")
1533 (source (origin
1534 (method url-fetch)
1535 (uri (string-append
1536 "https://github.com/samtools/htsjdk/archive/"
1537 version ".tar.gz"))
1538 (file-name (string-append name "-" version ".tar.gz"))
1539 (sha256
1540 (base32
1541 "0asdk9b8jx2ij7yd6apg9qx03li8q7z3ml0qy2r2qczkra79y6fw"))
1542 (modules '((guix build utils)))
1543 ;; remove build dependency on git
1544 (snippet '(substitute* "build.xml"
1545 (("failifexecutionfails=\"true\"")
1546 "failifexecutionfails=\"false\"")))))
1547 (build-system gnu-build-system)
1548 (arguments
1549 `(#:modules ((srfi srfi-1)
1550 (guix build gnu-build-system)
1551 (guix build utils))
1552 #:phases (alist-replace
1553 'build
1554 (lambda _
1555 (setenv "JAVA_HOME" (assoc-ref %build-inputs "jdk"))
1556 (zero? (system* "ant" "all"
1557 (string-append "-Ddist="
1558 (assoc-ref %outputs "out")
1559 "/share/java/htsjdk/"))))
1560 (fold alist-delete %standard-phases
1561 '(configure install check)))))
1562 (native-inputs
1563 `(("ant" ,ant)
1564 ("jdk" ,icedtea6 "jdk")))
1565 (home-page "http://samtools.github.io/htsjdk/")
1566 (synopsis "Java API for high-throughput sequencing data (HTS) formats")
1567 (description
1568 "HTSJDK is an implementation of a unified Java library for accessing
1569 common file formats, such as SAM and VCF, used for high-throughput
1570 sequencing (HTS) data. There are also an number of useful utilities for
1571 manipulating HTS data.")
1572 (license license:expat)))
1573
1574 (define-public htslib
1575 (package
1576 (name "htslib")
1577 (version "1.2.1")
1578 (source (origin
1579 (method url-fetch)
1580 (uri (string-append
1581 "https://github.com/samtools/htslib/releases/download/"
1582 version "/htslib-" version ".tar.bz2"))
1583 (sha256
1584 (base32
1585 "1c32ssscbnjwfw3dra140fq7riarp2x990qxybh34nr1p5r17nxx"))))
1586 (build-system gnu-build-system)
1587 (arguments
1588 `(#:phases
1589 (modify-phases %standard-phases
1590 (add-after
1591 'unpack 'patch-tests
1592 (lambda _
1593 (substitute* "test/test.pl"
1594 (("/bin/bash") (which "bash")))
1595 #t)))))
1596 (inputs
1597 `(("zlib" ,zlib)))
1598 (native-inputs
1599 `(("perl" ,perl)))
1600 (home-page "http://www.htslib.org")
1601 (synopsis "C library for reading/writing high-throughput sequencing data")
1602 (description
1603 "HTSlib is a C library for reading/writing high-throughput sequencing
1604 data. It also provides the bgzip, htsfile, and tabix utilities.")
1605 ;; Files under cram/ are released under the modified BSD license;
1606 ;; the rest is released under the Expat license
1607 (license (list license:expat license:bsd-3))))
1608
1609 (define-public idr
1610 (package
1611 (name "idr")
1612 (version "2.0.0")
1613 (source (origin
1614 (method url-fetch)
1615 (uri (string-append
1616 "https://github.com/nboley/idr/archive/"
1617 version ".tar.gz"))
1618 (file-name (string-append name "-" version ".tar.gz"))
1619 (sha256
1620 (base32
1621 "1k3x44biak00aiv3hpm1yd6nn4hhp7n0qnbs3zh2q9sw7qr1qj5r"))))
1622 (build-system python-build-system)
1623 (arguments
1624 `(#:phases
1625 (modify-phases %standard-phases
1626 (add-after
1627 'install 'wrap-program
1628 (lambda* (#:key inputs outputs #:allow-other-keys)
1629 (let* ((out (assoc-ref outputs "out"))
1630 (python-version (string-take (string-take-right
1631 (assoc-ref inputs "python") 5) 3))
1632 (path (string-join
1633 (map (lambda (name)
1634 (string-append (assoc-ref inputs name)
1635 "/lib/python" python-version
1636 "/site-packages"))
1637 '("python-scipy"
1638 "python-numpy"
1639 "python-matplotlib"))
1640 ":")))
1641 (wrap-program (string-append out "/bin/idr")
1642 `("PYTHONPATH" ":" prefix (,path))))
1643 #t)))))
1644 (inputs
1645 `(("python-scipy" ,python-scipy)
1646 ("python-numpy" ,python-numpy)
1647 ("python-matplotlib" ,python-matplotlib)))
1648 (native-inputs
1649 `(("python-cython" ,python-cython)
1650 ("python-setuptools" ,python-setuptools)))
1651 (home-page "https://github.com/nboley/idr")
1652 (synopsis "Tool to measure the irreproducible discovery rate (IDR)")
1653 (description
1654 "The IDR (Irreproducible Discovery Rate) framework is a unified approach
1655 to measure the reproducibility of findings identified from replicate
1656 experiments and provide highly stable thresholds based on reproducibility.")
1657 (license license:gpl3+)))
1658
1659 (define-public macs
1660 (package
1661 (name "macs")
1662 (version "2.1.0.20140616")
1663 (source (origin
1664 (method url-fetch)
1665 (uri (string-append
1666 "https://pypi.python.org/packages/source/M/MACS2/MACS2-"
1667 version ".tar.gz"))
1668 (sha256
1669 (base32
1670 "11lmiw6avqhwn75sn59g4lfkrr2kk20r3rgfbx9xfqb8rg9mi2n6"))))
1671 (build-system python-build-system)
1672 (arguments
1673 `(#:python ,python-2 ; only compatible with Python 2.7
1674 #:tests? #f)) ; no test target
1675 (inputs
1676 `(("python-numpy" ,python2-numpy)))
1677 (native-inputs
1678 `(("python-setuptools" ,python2-setuptools)))
1679 (home-page "http://github.com/taoliu/MACS/")
1680 (synopsis "Model based analysis for ChIP-Seq data")
1681 (description
1682 "MACS is an implementation of a ChIP-Seq analysis algorithm for
1683 identifying transcript factor binding sites named Model-based Analysis of
1684 ChIP-Seq (MACS). MACS captures the influence of genome complexity to evaluate
1685 the significance of enriched ChIP regions and it improves the spatial
1686 resolution of binding sites through combining the information of both
1687 sequencing tag position and orientation.")
1688 (license license:bsd-3)))
1689
1690 (define-public mafft
1691 (package
1692 (name "mafft")
1693 (version "7.221")
1694 (source (origin
1695 (method url-fetch)
1696 (uri (string-append
1697 "http://mafft.cbrc.jp/alignment/software/mafft-" version
1698 "-without-extensions-src.tgz"))
1699 (file-name (string-append name "-" version ".tgz"))
1700 (sha256
1701 (base32
1702 "0xi7klbsgi049vsrk6jiwh9wfj3b770gz3c8c7zwij448v0dr73d"))))
1703 (build-system gnu-build-system)
1704 (arguments
1705 `(#:tests? #f ; no automated tests, though there are tests in the read me
1706 #:make-flags (let ((out (assoc-ref %outputs "out")))
1707 (list (string-append "PREFIX=" out)
1708 (string-append "BINDIR="
1709 (string-append out "/bin"))))
1710 #:phases
1711 (modify-phases %standard-phases
1712 (add-after 'unpack 'enter-dir
1713 (lambda _ (chdir "core") #t))
1714 (add-after 'enter-dir 'patch-makefile
1715 (lambda _
1716 ;; on advice from the MAFFT authors, there is no need to
1717 ;; distribute mafft-profile, mafft-distance, or
1718 ;; mafft-homologs.rb as they are too "specialised".
1719 (substitute* "Makefile"
1720 ;; remove mafft-homologs.rb from SCRIPTS
1721 (("^SCRIPTS = mafft mafft-homologs.rb")
1722 "SCRIPTS = mafft")
1723 ;; remove mafft-distance from PROGS
1724 (("^PROGS = dvtditr dndfast7 dndblast sextet5 mafft-distance")
1725 "PROGS = dvtditr dndfast7 dndblast sextet5")
1726 ;; remove mafft-profile from PROGS
1727 (("splittbfast disttbfast tbfast mafft-profile 2cl mccaskillwrap")
1728 "splittbfast disttbfast tbfast f2cl mccaskillwrap")
1729 (("^rm -f mafft-profile mafft-profile.exe") "#")
1730 (("^rm -f mafft-distance mafft-distance.exe") ")#")
1731 ;; do not install MAN pages in libexec folder
1732 (("^\t\\$\\(INSTALL\\) -m 644 \\$\\(MANPAGES\\) \
1733 \\$\\(DESTDIR\\)\\$\\(LIBDIR\\)") "#"))
1734 #t))
1735 (delete 'configure))))
1736 (inputs
1737 `(("perl" ,perl)))
1738 (home-page "http://mafft.cbrc.jp/alignment/software/")
1739 (synopsis "Multiple sequence alignment program")
1740 (description
1741 "MAFFT offers a range of multiple alignment methods for nucleotide and
1742 protein sequences. For instance, it offers L-INS-i (accurate; for alignment
1743 of <~200 sequences) and FFT-NS-2 (fast; for alignment of <~30,000
1744 sequences).")
1745 (license (license:non-copyleft
1746 "http://mafft.cbrc.jp/alignment/software/license.txt"
1747 "BSD-3 with different formatting"))))
1748
1749 (define-public metabat
1750 (package
1751 (name "metabat")
1752 (version "0.26.1")
1753 (source (origin
1754 (method url-fetch)
1755 (uri (string-append
1756 "https://bitbucket.org/berkeleylab/metabat/get/"
1757 version ".tar.bz2"))
1758 (file-name (string-append name "-" version ".tar.bz2"))
1759 (sha256
1760 (base32
1761 "0vgrhbaxg4dkxyax2kbigak7w0arhqvw0szwp6gd9wmyilc44kfa"))))
1762 (build-system gnu-build-system)
1763 (arguments
1764 `(#:phases
1765 (modify-phases %standard-phases
1766 (add-after 'unpack 'fix-includes
1767 (lambda _
1768 (substitute* "SConstruct"
1769 (("/include/bam/bam.h")
1770 "/include/samtools/bam.h"))
1771 (substitute* "src/BamUtils.h"
1772 (("^#include \"bam/bam\\.h\"")
1773 "#include \"samtools/bam.h\"")
1774 (("^#include \"bam/sam\\.h\"")
1775 "#include \"samtools/sam.h\""))
1776 (substitute* "src/KseqReader.h"
1777 (("^#include \"bam/kseq\\.h\"")
1778 "#include \"samtools/kseq.h\""))
1779 #t))
1780 (add-after 'unpack 'fix-scons
1781 (lambda _
1782 (substitute* "SConstruct" ; Do not distribute README
1783 (("^env\\.Install\\(idir_prefix, 'README\\.md'\\)")
1784 ""))
1785 #t))
1786 (delete 'configure)
1787 (replace 'build
1788 (lambda* (#:key inputs outputs #:allow-other-keys)
1789 (mkdir (assoc-ref outputs "out"))
1790 (zero? (system* "scons"
1791 (string-append
1792 "PREFIX="
1793 (assoc-ref outputs "out"))
1794 (string-append
1795 "HTSLIB_DIR="
1796 (assoc-ref inputs "htslib"))
1797 (string-append
1798 "SAMTOOLS_DIR="
1799 (assoc-ref inputs "samtools"))
1800 (string-append
1801 "BOOST_ROOT="
1802 (assoc-ref inputs "boost"))
1803 "install"))))
1804 ;; check and install carried out during build phase
1805 (delete 'check)
1806 (delete 'install))))
1807 (inputs
1808 `(("zlib" ,zlib)
1809 ("perl" ,perl)
1810 ("samtools" ,samtools)
1811 ("htslib" ,htslib)
1812 ("boost" ,boost)))
1813 (native-inputs
1814 `(("scons" ,scons)))
1815 (home-page "https://bitbucket.org/berkeleylab/metabat")
1816 (synopsis
1817 "Reconstruction of single genomes from complex microbial communities")
1818 (description
1819 "Grouping large genomic fragments assembled from shotgun metagenomic
1820 sequences to deconvolute complex microbial communities, or metagenome binning,
1821 enables the study of individual organisms and their interactions. MetaBAT is
1822 an automated metagenome binning software, which integrates empirical
1823 probabilistic distances of genome abundance and tetranucleotide frequency.")
1824 (license (license:non-copyleft "file://license.txt"
1825 "See license.txt in the distribution."))))
1826
1827 (define-public miso
1828 (package
1829 (name "miso")
1830 (version "0.5.3")
1831 (source (origin
1832 (method url-fetch)
1833 (uri (string-append
1834 "https://pypi.python.org/packages/source/m/misopy/misopy-"
1835 version ".tar.gz"))
1836 (sha256
1837 (base32
1838 "0x446867az8ir0z8c1vjqffkp0ma37wm4sylixnkhgawllzx8v5w"))
1839 (modules '((guix build utils)))
1840 (snippet
1841 '(substitute* "setup.py"
1842 ;; Use setuptools, or else the executables are not
1843 ;; installed.
1844 (("distutils.core") "setuptools")
1845 ;; use "gcc" instead of "cc" for compilation
1846 (("^defines")
1847 "cc.set_executables(
1848 compiler='gcc',
1849 compiler_so='gcc',
1850 linker_exe='gcc',
1851 linker_so='gcc -shared'); defines")))))
1852 (build-system python-build-system)
1853 (arguments
1854 `(#:python ,python-2 ; only Python 2 is supported
1855 #:tests? #f)) ; no "test" target
1856 (inputs
1857 `(("samtools" ,samtools)
1858 ("python-numpy" ,python2-numpy)
1859 ("python-pysam" ,python2-pysam)
1860 ("python-scipy" ,python2-scipy)
1861 ("python-matplotlib" ,python2-matplotlib)))
1862 (native-inputs
1863 `(("python-mock" ,python2-mock) ;for tests
1864 ("python-pytz" ,python2-pytz) ;for tests
1865 ("python-setuptools" ,python2-setuptools)))
1866 (home-page "http://genes.mit.edu/burgelab/miso/index.html")
1867 (synopsis "Mixture of Isoforms model for RNA-Seq isoform quantitation")
1868 (description
1869 "MISO (Mixture-of-Isoforms) is a probabilistic framework that quantitates
1870 the expression level of alternatively spliced genes from RNA-Seq data, and
1871 identifies differentially regulated isoforms or exons across samples. By
1872 modeling the generative process by which reads are produced from isoforms in
1873 RNA-Seq, the MISO model uses Bayesian inference to compute the probability
1874 that a read originated from a particular isoform.")
1875 (license license:gpl2)))
1876
1877 (define-public orfm
1878 (package
1879 (name "orfm")
1880 (version "0.4.1")
1881 (source (origin
1882 (method url-fetch)
1883 (uri (string-append
1884 "https://github.com/wwood/OrfM/releases/download/v"
1885 version "/orfm-" version ".tar.gz"))
1886 (sha256
1887 (base32
1888 "05fmw145snk646ly076zby0fjav0k7ysbclck5d4s9pmgcfpijc2"))))
1889 (build-system gnu-build-system)
1890 (inputs `(("zlib" ,zlib)))
1891 (synopsis "Simple and not slow open reading frame (ORF) caller")
1892 (description
1893 "An ORF caller finds stretches of DNA that when translated are not
1894 interrupted by stop codons. OrfM finds and prints these ORFs.")
1895 (home-page "https://github.com/wwood/OrfM")
1896 (license license:lgpl3+)))
1897
1898 (define-public python2-pbcore
1899 (package
1900 (name "python2-pbcore")
1901 (version "0.9.3")
1902 (source (origin
1903 (method url-fetch)
1904 (uri (string-append
1905 "https://github.com/PacificBiosciences/pbcore/archive/"
1906 version ".tar.gz"))
1907 (file-name (string-append name "-" version ".tar.gz"))
1908 (sha256
1909 (base32
1910 "1z46rwjac93jm87cbj2zgjg6qvsgs65140wkbbxsvxps7ai4pm09"))))
1911 (build-system python-build-system)
1912 (arguments `(#:python ,python-2)) ; pbcore requires Python 2.7
1913 (inputs
1914 `(("python-cython" ,python2-cython)
1915 ("python-numpy" ,python2-numpy)
1916 ("python-pysam" ,python2-pysam)
1917 ("python-h5py" ,python2-h5py)))
1918 (native-inputs
1919 `(("python-setuptools" ,python2-setuptools)))
1920 (home-page "http://pacificbiosciences.github.io/pbcore/")
1921 (synopsis "Library for reading and writing PacBio data files")
1922 (description
1923 "The pbcore package provides Python APIs for interacting with PacBio data
1924 files and writing bioinformatics applications.")
1925 (license license:bsd-3)))
1926
1927 (define-public python2-warpedlmm
1928 (package
1929 (name "python2-warpedlmm")
1930 (version "0.21")
1931 (source
1932 (origin
1933 (method url-fetch)
1934 (uri (string-append
1935 "https://pypi.python.org/packages/source/W/WarpedLMM/WarpedLMM-"
1936 version ".zip"))
1937 (sha256
1938 (base32
1939 "1agfz6zqa8nc6cw47yh0s3y14gkpa9wqazwcj7mwwj3ffnw39p3j"))))
1940 (build-system python-build-system)
1941 (arguments
1942 `(#:python ,python-2 ; requires Python 2.7
1943 #:phases
1944 (modify-phases %standard-phases
1945 (add-after
1946 'install 'remove-bin-directory
1947 (lambda* (#:key outputs #:allow-other-keys)
1948 ;; The "bin" directory only contains wrappers for running
1949 ;; the module tests. They are not needed after the
1950 ;; "check" phase.
1951 (delete-file-recursively
1952 (string-append (assoc-ref outputs "out") "/bin"))
1953 #t)))))
1954 (propagated-inputs
1955 `(("python-scipy" ,python2-scipy)
1956 ("python-numpy" ,python2-numpy)
1957 ("python-matplotlib" ,python2-matplotlib)
1958 ("python-fastlmm" ,python2-fastlmm)
1959 ("python-pandas" ,python2-pandas)
1960 ("python-pysnptools" ,python2-pysnptools)))
1961 (native-inputs
1962 `(("python-setuptools" ,python2-setuptools)
1963 ("python-mock" ,python2-mock)
1964 ("python-nose" ,python2-nose)
1965 ("unzip" ,unzip)))
1966 (home-page "https://github.com/PMBio/warpedLMM")
1967 (synopsis "Implementation of warped linear mixed models")
1968 (description
1969 "WarpedLMM is a Python implementation of the warped linear mixed model,
1970 which automatically learns an optimal warping function (or transformation) for
1971 the phenotype as it models the data.")
1972 (license license:asl2.0)))
1973
1974 (define-public pbtranscript-tofu
1975 (let ((commit "8f5467fe6"))
1976 (package
1977 (name "pbtranscript-tofu")
1978 (version (string-append "2.2.3." commit))
1979 (source (origin
1980 (method git-fetch)
1981 (uri (git-reference
1982 (url "https://github.com/PacificBiosciences/cDNA_primer.git")
1983 (commit commit)))
1984 (file-name (string-append name "-" version "-checkout"))
1985 (sha256
1986 (base32
1987 "1lgnpi35ihay42qx0b6yl3kkgra723i413j33kvs0kvs61h82w0f"))
1988 (modules '((guix build utils)))
1989 (snippet
1990 '(begin
1991 ;; remove bundled Cython sources
1992 (delete-file "pbtranscript-tofu/pbtranscript/Cython-0.20.1.tar.gz")
1993 #t))))
1994 (build-system python-build-system)
1995 (arguments
1996 `(#:python ,python-2
1997 ;; With standard flags, the install phase attempts to create a zip'd
1998 ;; egg file, and fails with an error: 'ZIP does not support timestamps
1999 ;; before 1980'
2000 #:configure-flags '("--single-version-externally-managed"
2001 "--record=pbtranscript-tofu.txt")
2002 #:phases
2003 (modify-phases %standard-phases
2004 (add-after 'unpack 'enter-directory
2005 (lambda _
2006 (chdir "pbtranscript-tofu/pbtranscript/")
2007 #t))
2008 ;; With setuptools version 18.0 and later this setup.py hack causes
2009 ;; a build error, so we disable it.
2010 (add-after 'enter-directory 'patch-setuppy
2011 (lambda _
2012 (substitute* "setup.py"
2013 (("if 'setuptools.extension' in sys.modules:")
2014 "if False:"))
2015 #t)))))
2016 (inputs
2017 `(("python-numpy" ,python2-numpy)
2018 ("python-bx-python" ,python2-bx-python)
2019 ("python-networkx" ,python2-networkx)
2020 ("python-scipy" ,python2-scipy)
2021 ("python-pbcore" ,python2-pbcore)
2022 ("python-h5py" ,python2-h5py)))
2023 (native-inputs
2024 `(("python-cython" ,python2-cython)
2025 ("python-nose" ,python2-nose)
2026 ("python-setuptools" ,python2-setuptools)))
2027 (home-page "https://github.com/PacificBiosciences/cDNA_primer")
2028 (synopsis "Analyze transcriptome data generated with the Iso-Seq protocol")
2029 (description
2030 "pbtranscript-tofu contains scripts to analyze transcriptome data
2031 generated using the PacBio Iso-Seq protocol.")
2032 (license license:bsd-3))))
2033
2034 (define-public prodigal
2035 (package
2036 (name "prodigal")
2037 (version "2.6.2")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (string-append
2041 "https://github.com/hyattpd/Prodigal/archive/v"
2042 version ".tar.gz"))
2043 (file-name (string-append name "-" version ".tar.gz"))
2044 (sha256
2045 (base32
2046 "0m8sb0fg6lmxrlpzna0am6svbnlmd3dckrhgzxxgb3gxr5fyj284"))))
2047 (build-system gnu-build-system)
2048 (arguments
2049 `(#:tests? #f ;no check target
2050 #:make-flags (list (string-append "INSTALLDIR="
2051 (assoc-ref %outputs "out")
2052 "/bin"))
2053 #:phases
2054 (modify-phases %standard-phases
2055 (delete 'configure))))
2056 (home-page "http://prodigal.ornl.gov")
2057 (synopsis "Protein-coding gene prediction for Archaea and Bacteria")
2058 (description
2059 "Prodigal runs smoothly on finished genomes, draft genomes, and
2060 metagenomes, providing gene predictions in GFF3, Genbank, or Sequin table
2061 format. It runs quickly, in an unsupervised fashion, handles gaps, handles
2062 partial genes, and identifies translation initiation sites.")
2063 (license license:gpl3+)))
2064
2065 (define-public rsem
2066 (package
2067 (name "rsem")
2068 (version "1.2.20")
2069 (source
2070 (origin
2071 (method url-fetch)
2072 (uri
2073 (string-append "http://deweylab.biostat.wisc.edu/rsem/src/rsem-"
2074 version ".tar.gz"))
2075 (sha256
2076 (base32 "0nzdc0j0hjllhsd5f2xli95dafm3nawskigs140xzvjk67xh0r9q"))
2077 (patches (list (search-patch "rsem-makefile.patch")))
2078 (modules '((guix build utils)))
2079 (snippet
2080 '(begin
2081 ;; remove bundled copy of boost
2082 (delete-file-recursively "boost")
2083 #t))))
2084 (build-system gnu-build-system)
2085 (arguments
2086 `(#:tests? #f ;no "check" target
2087 #:phases
2088 (modify-phases %standard-phases
2089 ;; No "configure" script.
2090 ;; Do not build bundled samtools library.
2091 (replace 'configure
2092 (lambda _
2093 (substitute* "Makefile"
2094 (("^all : sam/libbam.a") "all : "))
2095 #t))
2096 (replace 'install
2097 (lambda* (#:key outputs #:allow-other-keys)
2098 (let* ((out (string-append (assoc-ref outputs "out")))
2099 (bin (string-append out "/bin/"))
2100 (perl (string-append out "/lib/perl5/site_perl")))
2101 (mkdir-p bin)
2102 (mkdir-p perl)
2103 (for-each (lambda (file)
2104 (copy-file file
2105 (string-append bin (basename file))))
2106 (find-files "." "rsem-.*"))
2107 (copy-file "rsem_perl_utils.pm"
2108 (string-append perl "/rsem_perl_utils.pm")))
2109 #t))
2110 (add-after
2111 'install 'wrap-program
2112 (lambda* (#:key outputs #:allow-other-keys)
2113 (let ((out (assoc-ref outputs "out")))
2114 (for-each (lambda (prog)
2115 (wrap-program (string-append out "/bin/" prog)
2116 `("PERL5LIB" ":" prefix
2117 (,(string-append out "/lib/perl5/site_perl")))))
2118 '("rsem-plot-transcript-wiggles"
2119 "rsem-calculate-expression"
2120 "rsem-generate-ngvector"
2121 "rsem-run-ebseq"
2122 "rsem-prepare-reference")))
2123 #t)))))
2124 (inputs
2125 `(("boost" ,boost)
2126 ("ncurses" ,ncurses)
2127 ("r" ,r)
2128 ("perl" ,perl)
2129 ("samtools" ,samtools-0.1)
2130 ("zlib" ,zlib)))
2131 (home-page "http://deweylab.biostat.wisc.edu/rsem/")
2132 (synopsis "Estimate gene expression levels from RNA-Seq data")
2133 (description
2134 "RSEM is a software package for estimating gene and isoform expression
2135 levels from RNA-Seq data. The RSEM package provides a user-friendly
2136 interface, supports threads for parallel computation of the EM algorithm,
2137 single-end and paired-end read data, quality scores, variable-length reads and
2138 RSPD estimation. In addition, it provides posterior mean and 95% credibility
2139 interval estimates for expression levels. For visualization, it can generate
2140 BAM and Wiggle files in both transcript-coordinate and genomic-coordinate.")
2141 (license license:gpl3+)))
2142
2143 (define-public rseqc
2144 (package
2145 (name "rseqc")
2146 (version "2.6.1")
2147 (source
2148 (origin
2149 (method url-fetch)
2150 (uri
2151 (string-append "mirror://sourceforge/rseqc/"
2152 version "/RSeQC-" version ".tar.gz"))
2153 (sha256
2154 (base32 "15ly0254yi032qzkdplg00q144qfdsd986gh62829rl5bkxhj330"))
2155 (modules '((guix build utils)))
2156 (snippet
2157 '(begin
2158 ;; remove bundled copy of pysam
2159 (delete-file-recursively "lib/pysam")
2160 (substitute* "setup.py"
2161 ;; remove dependency on outdated "distribute" module
2162 (("^from distribute_setup import use_setuptools") "")
2163 (("^use_setuptools\\(\\)") "")
2164 ;; do not use bundled copy of pysam
2165 (("^have_pysam = False") "have_pysam = True"))))))
2166 (build-system python-build-system)
2167 (arguments `(#:python ,python-2))
2168 (inputs
2169 `(("python-cython" ,python2-cython)
2170 ("python-pysam" ,python2-pysam)
2171 ("python-numpy" ,python2-numpy)
2172 ("python-setuptools" ,python2-setuptools)
2173 ("zlib" ,zlib)))
2174 (native-inputs
2175 `(("python-nose" ,python2-nose)))
2176 (home-page "http://rseqc.sourceforge.net/")
2177 (synopsis "RNA-seq quality control package")
2178 (description
2179 "RSeQC provides a number of modules that can comprehensively evaluate
2180 high throughput sequence data, especially RNA-seq data. Some basic modules
2181 inspect sequence quality, nucleotide composition bias, PCR bias and GC bias,
2182 while RNA-seq specific modules evaluate sequencing saturation, mapped reads
2183 distribution, coverage uniformity, strand specificity, etc.")
2184 (license license:gpl3+)))
2185
2186 (define-public samtools
2187 (package
2188 (name "samtools")
2189 (version "1.2")
2190 (source
2191 (origin
2192 (method url-fetch)
2193 (uri
2194 (string-append "mirror://sourceforge/samtools/"
2195 version "/samtools-" version ".tar.bz2"))
2196 (sha256
2197 (base32
2198 "1akdqb685pk9xk1nb6sa9aq8xssjjhvvc06kp4cpdqvz2157l3j2"))))
2199 (build-system gnu-build-system)
2200 (arguments
2201 `(;; There are 87 test failures when building on non-64-bit architectures
2202 ;; due to invalid test data. This has since been fixed upstream (see
2203 ;; <https://github.com/samtools/samtools/pull/307>), but as there has
2204 ;; not been a new release we disable the tests for all non-64-bit
2205 ;; systems.
2206 #:tests? ,(string=? (or (%current-system) (%current-target-system))
2207 "x86_64-linux")
2208 #:modules ((ice-9 ftw)
2209 (ice-9 regex)
2210 (guix build gnu-build-system)
2211 (guix build utils))
2212 #:make-flags (list "LIBCURSES=-lncurses"
2213 (string-append "prefix=" (assoc-ref %outputs "out")))
2214 #:phases
2215 (alist-cons-after
2216 'unpack
2217 'patch-tests
2218 (lambda* (#:key inputs #:allow-other-keys)
2219 (let ((bash (assoc-ref inputs "bash")))
2220 (substitute* "test/test.pl"
2221 ;; The test script calls out to /bin/bash
2222 (("/bin/bash")
2223 (string-append bash "/bin/bash"))
2224 ;; There are two failing tests upstream relating to the "stats"
2225 ;; subcommand in test_usage_subcommand ("did not have Usage"
2226 ;; and "usage did not mention samtools stats"), so we disable
2227 ;; them.
2228 (("(test_usage_subcommand\\(.*\\);)" cmd)
2229 (string-append "unless ($subcommand eq 'stats') {" cmd "};")))))
2230 (alist-cons-after
2231 'install 'install-library
2232 (lambda* (#:key outputs #:allow-other-keys)
2233 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2234 (install-file "libbam.a" lib)))
2235 (alist-cons-after
2236 'install 'install-headers
2237 (lambda* (#:key outputs #:allow-other-keys)
2238 (let ((include (string-append (assoc-ref outputs "out")
2239 "/include/samtools/")))
2240 (for-each (lambda (file)
2241 (install-file file include))
2242 (scandir "." (lambda (name) (string-match "\\.h$" name))))
2243 #t))
2244 (alist-delete 'configure %standard-phases))))))
2245 (native-inputs `(("pkg-config" ,pkg-config)))
2246 (inputs `(("ncurses" ,ncurses)
2247 ("perl" ,perl)
2248 ("python" ,python)
2249 ("zlib" ,zlib)))
2250 (home-page "http://samtools.sourceforge.net")
2251 (synopsis "Utilities to efficiently manipulate nucleotide sequence alignments")
2252 (description
2253 "Samtools implements various utilities for post-processing nucleotide
2254 sequence alignments in the SAM, BAM, and CRAM formats, including indexing,
2255 variant calling (in conjunction with bcftools), and a simple alignment
2256 viewer.")
2257 (license license:expat)))
2258
2259 (define-public samtools-0.1
2260 ;; This is the most recent version of the 0.1 line of samtools. The input
2261 ;; and output formats differ greatly from that used and produced by samtools
2262 ;; 1.x and is still used in many bioinformatics pipelines.
2263 (package (inherit samtools)
2264 (version "0.1.19")
2265 (source
2266 (origin
2267 (method url-fetch)
2268 (uri
2269 (string-append "mirror://sourceforge/samtools/"
2270 version "/samtools-" version ".tar.bz2"))
2271 (sha256
2272 (base32 "1m33xsfwz0s8qi45lylagfllqg7fphf4dr0780rsvw75av9wk06h"))))
2273 (arguments
2274 (substitute-keyword-arguments (package-arguments samtools)
2275 ((#:tests? tests) #f) ;no "check" target
2276 ((#:phases phases)
2277 `(modify-phases ,phases
2278 (replace 'install
2279 (lambda* (#:key outputs #:allow-other-keys)
2280 (let ((bin (string-append
2281 (assoc-ref outputs "out") "/bin")))
2282 (mkdir-p bin)
2283 (copy-file "samtools"
2284 (string-append bin "/samtools")))))
2285 (delete 'patch-tests)))))))
2286
2287 (define-public mosaik
2288 (let ((commit "5c25216d"))
2289 (package
2290 (name "mosaik")
2291 (version "2.2.30")
2292 (source (origin
2293 ;; There are no release tarballs nor tags.
2294 (method git-fetch)
2295 (uri (git-reference
2296 (url "https://github.com/wanpinglee/MOSAIK.git")
2297 (commit commit)))
2298 (file-name (string-append name "-" version))
2299 (sha256
2300 (base32
2301 "17gj3s07cm77r41z92awh0bim7w7q7fbn0sf5nkqmcm1vw052qgw"))))
2302 (build-system gnu-build-system)
2303 (arguments
2304 `(#:tests? #f ; no tests
2305 #:make-flags (list "CC=gcc")
2306 #:phases
2307 (modify-phases %standard-phases
2308 (replace 'configure
2309 (lambda _ (chdir "src") #t))
2310 (replace 'install
2311 (lambda* (#:key outputs #:allow-other-keys)
2312 (let ((bin (string-append (assoc-ref outputs "out")
2313 "/bin")))
2314 (mkdir-p bin)
2315 (copy-recursively "../bin" bin)
2316 #t))))))
2317 (inputs
2318 `(("perl" ,perl)
2319 ("zlib" ,zlib)))
2320 (supported-systems '("x86_64-linux"))
2321 (home-page "https://code.google.com/p/mosaik-aligner/")
2322 (synopsis "Map nucleotide sequence reads to reference genomes")
2323 (description
2324 "MOSAIK is a program for mapping second and third-generation sequencing
2325 reads to a reference genome. MOSAIK can align reads generated by all the
2326 major sequencing technologies, including Illumina, Applied Biosystems SOLiD,
2327 Roche 454, Ion Torrent and Pacific BioSciences SMRT.")
2328 ;; MOSAIK is released under the GPLv2+ with the exception of third-party
2329 ;; code released into the public domain:
2330 ;; 1. fastlz by Ariya Hidayat - http://www.fastlz.org/
2331 ;; 2. MD5 implementation - RSA Data Security, RFC 1321
2332 (license (list license:gpl2+ license:public-domain)))))
2333
2334 (define-public ngs-sdk
2335 (package
2336 (name "ngs-sdk")
2337 (version "1.1.1")
2338 (source
2339 (origin
2340 (method url-fetch)
2341 (uri
2342 (string-append "https://github.com/ncbi/ngs/archive/"
2343 version ".tar.gz"))
2344 (file-name (string-append name "-" version ".tar.gz"))
2345 (sha256
2346 (base32
2347 "1x58gpm574n0xmk2a98gmikbgycq78ia0bvnb42k5ck34fmd5v8y"))))
2348 (build-system gnu-build-system)
2349 (arguments
2350 `(#:parallel-build? #f ; not supported
2351 #:tests? #f ; no "check" target
2352 #:phases
2353 (alist-replace
2354 'configure
2355 (lambda* (#:key outputs #:allow-other-keys)
2356 (let ((out (assoc-ref outputs "out")))
2357 ;; The 'configure' script doesn't recognize things like
2358 ;; '--enable-fast-install'.
2359 (zero? (system* "./configure"
2360 (string-append "--build-prefix=" (getcwd) "/build")
2361 (string-append "--prefix=" out)))))
2362 (alist-cons-after
2363 'unpack 'enter-dir
2364 (lambda _ (chdir "ngs-sdk") #t)
2365 %standard-phases))))
2366 (native-inputs `(("perl" ,perl)))
2367 ;; According to the test
2368 ;; unless ($MARCH =~ /x86_64/i || $MARCH =~ /i?86/i)
2369 ;; in ngs-sdk/setup/konfigure.perl
2370 (supported-systems '("i686-linux" "x86_64-linux"))
2371 (home-page "https://github.com/ncbi/ngs")
2372 (synopsis "API for accessing Next Generation Sequencing data")
2373 (description
2374 "NGS is a domain-specific API for accessing reads, alignments and pileups
2375 produced from Next Generation Sequencing. The API itself is independent from
2376 any particular back-end implementation, and supports use of multiple back-ends
2377 simultaneously.")
2378 (license license:public-domain)))
2379
2380 (define-public ngs-java
2381 (package (inherit ngs-sdk)
2382 (name "ngs-java")
2383 (arguments
2384 `(,@(substitute-keyword-arguments
2385 `(#:modules ((guix build gnu-build-system)
2386 (guix build utils)
2387 (srfi srfi-1)
2388 (srfi srfi-26))
2389 ,@(package-arguments ngs-sdk))
2390 ((#:phases phases)
2391 `(alist-cons-after
2392 'enter-dir 'fix-java-symlink-installation
2393 (lambda _
2394 ;; Only replace the version suffix, not the version number in
2395 ;; the directory name. Reported here:
2396 ;; https://github.com/ncbi/ngs/pull/4
2397 (substitute* "Makefile.java"
2398 (((string-append "\\$\\(subst "
2399 "(\\$\\(VERSION[^\\)]*\\)),"
2400 "(\\$\\([^\\)]+\\)),"
2401 "(\\$\\([^\\)]+\\)|\\$\\@)"
2402 "\\)")
2403 _ pattern replacement target)
2404 (string-append "$(patsubst "
2405 "%" pattern ","
2406 "%" replacement ","
2407 target ")"))))
2408 (alist-replace
2409 'enter-dir (lambda _ (chdir "ngs-java") #t)
2410 ,phases))))))
2411 (inputs
2412 `(("jdk" ,icedtea6 "jdk")
2413 ("ngs-sdk" ,ngs-sdk)))
2414 (synopsis "Java bindings for NGS SDK")))
2415
2416 (define-public ncbi-vdb
2417 (package
2418 (name "ncbi-vdb")
2419 (version "2.4.5-5")
2420 (source
2421 (origin
2422 (method url-fetch)
2423 (uri
2424 (string-append "https://github.com/ncbi/ncbi-vdb/archive/"
2425 version ".tar.gz"))
2426 (file-name (string-append name "-" version ".tar.gz"))
2427 (sha256
2428 (base32
2429 "1cj8nk6if8sqagv20vx36v566fdvhcaadf0x1ycnbgql6chbs6vy"))))
2430 (build-system gnu-build-system)
2431 (arguments
2432 `(#:parallel-build? #f ; not supported
2433 #:tests? #f ; no "check" target
2434 #:phases
2435 (alist-replace
2436 'configure
2437 (lambda* (#:key inputs outputs #:allow-other-keys)
2438 (let ((out (assoc-ref outputs "out")))
2439 ;; Only replace the version suffix, not the version number in the
2440 ;; directory name; fixed in commit 4dbba5c6a809 (no release yet).
2441 (substitute* "setup/konfigure.perl"
2442 (((string-append "\\$\\(subst "
2443 "(\\$\\(VERSION[^\\)]*\\)),"
2444 "(\\$\\([^\\)]+\\)),"
2445 "(\\$\\([^\\)]+\\)|\\$\\@)"
2446 "\\)")
2447 _ pattern replacement target)
2448 (string-append "$(patsubst "
2449 "%" pattern ","
2450 "%" replacement ","
2451 target ")")))
2452
2453 ;; Override include path for libmagic
2454 (substitute* "setup/package.prl"
2455 (("name => 'magic', Include => '/usr/include'")
2456 (string-append "name=> 'magic', Include => '"
2457 (assoc-ref inputs "libmagic")
2458 "/include" "'")))
2459
2460 ;; Install kdf5 library (needed by sra-tools)
2461 (substitute* "build/Makefile.install"
2462 (("LIBRARIES_TO_INSTALL =")
2463 "LIBRARIES_TO_INSTALL = kdf5.$(VERSION_LIBX) kdf5.$(VERSION_SHLX)"))
2464
2465 ;; The 'configure' script doesn't recognize things like
2466 ;; '--enable-fast-install'.
2467 (zero? (system*
2468 "./configure"
2469 (string-append "--build-prefix=" (getcwd) "/build")
2470 (string-append "--prefix=" (assoc-ref outputs "out"))
2471 (string-append "--debug")
2472 (string-append "--with-xml2-prefix="
2473 (assoc-ref inputs "libxml2"))
2474 (string-append "--with-ngs-sdk-prefix="
2475 (assoc-ref inputs "ngs-sdk"))
2476 (string-append "--with-ngs-java-prefix="
2477 (assoc-ref inputs "ngs-java"))
2478 (string-append "--with-hdf5-prefix="
2479 (assoc-ref inputs "hdf5"))))))
2480 (alist-cons-after
2481 'install 'install-interfaces
2482 (lambda* (#:key outputs #:allow-other-keys)
2483 ;; Install interface libraries. On i686 the interface libraries
2484 ;; are installed to "linux/gcc/i386", so we need to use the Linux
2485 ;; architecture name ("i386") instead of the target system prefix
2486 ;; ("i686").
2487 (mkdir (string-append (assoc-ref outputs "out") "/ilib"))
2488 (copy-recursively (string-append "build/ncbi-vdb/linux/gcc/"
2489 ,(system->linux-architecture
2490 (or (%current-target-system)
2491 (%current-system)))
2492 "/rel/ilib")
2493 (string-append (assoc-ref outputs "out")
2494 "/ilib"))
2495 ;; Install interface headers
2496 (copy-recursively "interfaces"
2497 (string-append (assoc-ref outputs "out")
2498 "/include")))
2499 %standard-phases))))
2500 (inputs
2501 `(("libxml2" ,libxml2)
2502 ("ngs-sdk" ,ngs-sdk)
2503 ("ngs-java" ,ngs-java)
2504 ("libmagic" ,file)
2505 ("hdf5" ,hdf5)))
2506 (native-inputs `(("perl" ,perl)))
2507 (home-page "https://github.com/ncbi/ncbi-vdb")
2508 (synopsis "Database engine for genetic information")
2509 (description
2510 "The NCBI-VDB library implements a highly compressed columnar data
2511 warehousing engine that is most often used to store genetic information.
2512 Databases are stored in a portable image within the file system, and can be
2513 accessed/downloaded on demand across HTTP.")
2514 (license license:public-domain)))
2515
2516 (define-public plink
2517 (package
2518 (name "plink")
2519 (version "1.07")
2520 (source
2521 (origin
2522 (method url-fetch)
2523 (uri (string-append
2524 "http://pngu.mgh.harvard.edu/~purcell/plink/dist/plink-"
2525 version "-src.zip"))
2526 (sha256
2527 (base32 "0as8gxm4pjyc8dxmm1sl873rrd7wn5qs0l29nqfnl31x8i467xaa"))
2528 (patches (list (search-patch "plink-1.07-unclobber-i.patch")))))
2529 (build-system gnu-build-system)
2530 (arguments
2531 '(#:tests? #f ;no "check" target
2532 #:make-flags (list (string-append "LIB_LAPACK="
2533 (assoc-ref %build-inputs "lapack")
2534 "/lib/liblapack.so")
2535 "WITH_LAPACK=1"
2536 "FORCE_DYNAMIC=1"
2537 ;; disable phoning home
2538 "WITH_WEBCHECK=")
2539 #:phases
2540 (modify-phases %standard-phases
2541 ;; no "configure" script
2542 (delete 'configure)
2543 (replace 'install
2544 (lambda* (#:key outputs #:allow-other-keys)
2545 (let ((bin (string-append (assoc-ref outputs "out")
2546 "/bin/")))
2547 (install-file "plink" bin)
2548 #t))))))
2549 (inputs
2550 `(("zlib" ,zlib)
2551 ("lapack" ,lapack)))
2552 (native-inputs
2553 `(("unzip" ,unzip)))
2554 (home-page "http://pngu.mgh.harvard.edu/~purcell/plink/")
2555 (synopsis "Whole genome association analysis toolset")
2556 (description
2557 "PLINK is a whole genome association analysis toolset, designed to
2558 perform a range of basic, large-scale analyses in a computationally efficient
2559 manner. The focus of PLINK is purely on analysis of genotype/phenotype data,
2560 so there is no support for steps prior to this (e.g. study design and
2561 planning, generating genotype or CNV calls from raw data). Through
2562 integration with gPLINK and Haploview, there is some support for the
2563 subsequent visualization, annotation and storage of results.")
2564 ;; Code is released under GPLv2, except for fisher.h, which is under
2565 ;; LGPLv2.1+
2566 (license (list license:gpl2 license:lgpl2.1+))))
2567
2568 (define-public preseq
2569 (package
2570 (name "preseq")
2571 (version "1.0.2")
2572 (source (origin
2573 (method url-fetch)
2574 (uri
2575 (string-append "http://smithlabresearch.org/downloads/preseq-"
2576 version ".tar.bz2"))
2577 (sha256
2578 (base32 "0r7sw07p6nv8ygvc17gd78lisbw5336v3vhs86b5wv8mw3pwqksc"))
2579 (patches (list (search-patch "preseq-1.0.2-install-to-PREFIX.patch")
2580 (search-patch "preseq-1.0.2-link-with-libbam.patch")))
2581 (modules '((guix build utils)))
2582 (snippet
2583 ;; Remove bundled samtools.
2584 '(delete-file-recursively "preseq-master/samtools"))))
2585 (build-system gnu-build-system)
2586 (arguments
2587 `(#:tests? #f ;no "check" target
2588 #:phases
2589 (modify-phases %standard-phases
2590 (add-after
2591 'unpack 'enter-dir
2592 (lambda _
2593 (chdir "preseq-master")
2594 #t))
2595 (add-after
2596 'enter-dir 'use-samtools-headers
2597 (lambda _
2598 (substitute* '("smithlab_cpp/SAM.cpp"
2599 "smithlab_cpp/SAM.hpp")
2600 (("sam.h") "samtools/sam.h"))
2601 #t))
2602 (delete 'configure))
2603 #:make-flags (list (string-append "PREFIX="
2604 (assoc-ref %outputs "out"))
2605 (string-append "LIBBAM="
2606 (assoc-ref %build-inputs "samtools")
2607 "/lib/libbam.a"))))
2608 (inputs
2609 `(("gsl" ,gsl)
2610 ("samtools" ,samtools-0.1)
2611 ("zlib" ,zlib)))
2612 (home-page "http://smithlabresearch.org/software/preseq/")
2613 (synopsis "Program for analyzing library complexity")
2614 (description
2615 "The preseq package is aimed at predicting and estimating the complexity
2616 of a genomic sequencing library, equivalent to predicting and estimating the
2617 number of redundant reads from a given sequencing depth and how many will be
2618 expected from additional sequencing using an initial sequencing experiment.
2619 The estimates can then be used to examine the utility of further sequencing,
2620 optimize the sequencing depth, or to screen multiple libraries to avoid low
2621 complexity samples.")
2622 (license license:gpl3+)))
2623
2624 (define-public sra-tools
2625 (package
2626 (name "sra-tools")
2627 (version "2.4.5-5")
2628 (source
2629 (origin
2630 (method url-fetch)
2631 (uri
2632 (string-append "https://github.com/ncbi/sra-tools/archive/"
2633 version ".tar.gz"))
2634 (file-name (string-append name "-" version ".tar.gz"))
2635 (sha256
2636 (base32
2637 "11nrnvz7a012f4iryf0wiwrid0h111grsfxbxa9j51h3f2xbvgns"))))
2638 (build-system gnu-build-system)
2639 (arguments
2640 `(#:parallel-build? #f ; not supported
2641 #:tests? #f ; no "check" target
2642 #:phases
2643 (alist-replace
2644 'configure
2645 (lambda* (#:key inputs outputs #:allow-other-keys)
2646 ;; The build system expects a directory containing the sources and
2647 ;; raw build output of ncbi-vdb, including files that are not
2648 ;; installed. Since we are building against an installed version of
2649 ;; ncbi-vdb, the following modifications are needed.
2650 (substitute* "setup/konfigure.perl"
2651 ;; Make the configure script look for the "ilib" directory of
2652 ;; "ncbi-vdb" without first checking for the existence of a
2653 ;; matching library in its "lib" directory.
2654 (("^ my \\$f = File::Spec->catdir\\(\\$libdir, \\$lib\\);")
2655 "my $f = File::Spec->catdir($ilibdir, $ilib);")
2656 ;; Look for interface libraries in ncbi-vdb's "ilib" directory.
2657 (("my \\$ilibdir = File::Spec->catdir\\(\\$builddir, 'ilib'\\);")
2658 "my $ilibdir = File::Spec->catdir($dir, 'ilib');"))
2659
2660 ;; The 'configure' script doesn't recognize things like
2661 ;; '--enable-fast-install'.
2662 (zero? (system*
2663 "./configure"
2664 (string-append "--build-prefix=" (getcwd) "/build")
2665 (string-append "--prefix=" (assoc-ref outputs "out"))
2666 (string-append "--debug")
2667 (string-append "--with-fuse-prefix="
2668 (assoc-ref inputs "fuse"))
2669 (string-append "--with-magic-prefix="
2670 (assoc-ref inputs "libmagic"))
2671 ;; TODO: building with libxml2 fails with linker errors
2672 ;; (string-append "--with-xml2-prefix="
2673 ;; (assoc-ref inputs "libxml2"))
2674 (string-append "--with-ncbi-vdb-sources="
2675 (assoc-ref inputs "ncbi-vdb"))
2676 (string-append "--with-ncbi-vdb-build="
2677 (assoc-ref inputs "ncbi-vdb"))
2678 (string-append "--with-ngs-sdk-prefix="
2679 (assoc-ref inputs "ngs-sdk"))
2680 (string-append "--with-hdf5-prefix="
2681 (assoc-ref inputs "hdf5")))))
2682 %standard-phases)))
2683 (native-inputs `(("perl" ,perl)))
2684 (inputs
2685 `(("ngs-sdk" ,ngs-sdk)
2686 ("ncbi-vdb" ,ncbi-vdb)
2687 ("libmagic" ,file)
2688 ("fuse" ,fuse)
2689 ("hdf5" ,hdf5)
2690 ("zlib" ,zlib)))
2691 (home-page "http://www.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?view=software")
2692 (synopsis "Tools and libraries for reading and writing sequencing data")
2693 (description
2694 "The SRA Toolkit from NCBI is a collection of tools and libraries for
2695 reading of sequencing files from the Sequence Read Archive (SRA) database and
2696 writing files into the .sra format.")
2697 (license license:public-domain)))
2698
2699 (define-public seqan
2700 (package
2701 (name "seqan")
2702 (version "1.4.2")
2703 (source (origin
2704 (method url-fetch)
2705 (uri (string-append "http://packages.seqan.de/seqan-library/"
2706 "seqan-library-" version ".tar.bz2"))
2707 (sha256
2708 (base32
2709 "05s3wrrwn50f81aklfm65i4a749zag1vr8z03k21xm0pdxy47yvp"))))
2710 ;; The documentation is 7.8MB and the includes are 3.6MB heavy, so it
2711 ;; makes sense to split the outputs.
2712 (outputs '("out" "doc"))
2713 (build-system trivial-build-system)
2714 (arguments
2715 `(#:modules ((guix build utils))
2716 #:builder
2717 (begin
2718 (use-modules (guix build utils))
2719 (let ((tar (assoc-ref %build-inputs "tar"))
2720 (bzip (assoc-ref %build-inputs "bzip2"))
2721 (out (assoc-ref %outputs "out"))
2722 (doc (assoc-ref %outputs "doc")))
2723 (setenv "PATH" (string-append tar "/bin:" bzip "/bin"))
2724 (system* "tar" "xvf" (assoc-ref %build-inputs "source"))
2725 (chdir (string-append "seqan-library-" ,version))
2726 (copy-recursively "include" (string-append out "/include"))
2727 (copy-recursively "share" (string-append doc "/share"))))))
2728 (native-inputs
2729 `(("source" ,source)
2730 ("tar" ,tar)
2731 ("bzip2" ,bzip2)))
2732 (home-page "http://www.seqan.de")
2733 (synopsis "Library for nucleotide sequence analysis")
2734 (description
2735 "SeqAn is a C++ library of efficient algorithms and data structures for
2736 the analysis of sequences with the focus on biological data. It contains
2737 algorithms and data structures for string representation and their
2738 manipulation, online and indexed string search, efficient I/O of
2739 bioinformatics file formats, sequence alignment, and more.")
2740 (license license:bsd-3)))
2741
2742 (define-public seqmagick
2743 (package
2744 (name "seqmagick")
2745 (version "0.6.1")
2746 (source
2747 (origin
2748 (method url-fetch)
2749 (uri (string-append
2750 "https://pypi.python.org/packages/source/s/seqmagick/seqmagick-"
2751 version ".tar.gz"))
2752 (sha256
2753 (base32
2754 "0cgn477n74gsl4qdaakrrhi953kcsd4q3ivk2lr18x74s3g4ma1d"))))
2755 (build-system python-build-system)
2756 (arguments
2757 ;; python2 only, see https://github.com/fhcrc/seqmagick/issues/56
2758 `(#:python ,python-2
2759 #:phases
2760 (modify-phases %standard-phases
2761 ;; Current test in setup.py does not work as of 0.6.1,
2762 ;; so use nose to run tests instead for now. See
2763 ;; https://github.com/fhcrc/seqmagick/issues/55
2764 (replace 'check (lambda _ (zero? (system* "nosetests")))))))
2765 (inputs
2766 `(("python-biopython" ,python2-biopython)))
2767 (native-inputs
2768 `(("python-setuptools" ,python2-setuptools)
2769 ("python-nose" ,python2-nose)))
2770 (home-page "http://github.com/fhcrc/seqmagick")
2771 (synopsis "Tools for converting and modifying sequence files")
2772 (description
2773 "Bioinformaticians often have to convert sequence files between formats
2774 and do little manipulations on them, and it's not worth writing scripts for
2775 that. Seqmagick is a utility to expose the file format conversion in
2776 BioPython in a convenient way. Instead of having a big mess of scripts, there
2777 is one that takes arguments.")
2778 (license license:gpl3)))
2779
2780 (define-public star
2781 (package
2782 (name "star")
2783 (version "2.4.2a")
2784 (source (origin
2785 (method url-fetch)
2786 (uri (string-append
2787 "https://github.com/alexdobin/STAR/archive/STAR_"
2788 version ".tar.gz"))
2789 (sha256
2790 (base32
2791 "1c3rnm7r5l0kl3d04gl1g7938xqf1c2l0mla87rlplqg1hcns5mc"))
2792 (modules '((guix build utils)))
2793 (snippet
2794 '(substitute* "source/Makefile"
2795 (("/bin/rm") "rm")))))
2796 (build-system gnu-build-system)
2797 (arguments
2798 '(#:tests? #f ;no check target
2799 #:make-flags '("STAR")
2800 #:phases
2801 (alist-cons-after
2802 'unpack 'enter-source-dir (lambda _ (chdir "source"))
2803 (alist-replace
2804 'install
2805 (lambda* (#:key outputs #:allow-other-keys)
2806 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
2807 (install-file "STAR" bin)))
2808 (alist-delete
2809 'configure %standard-phases)))))
2810 (native-inputs
2811 `(("vim" ,vim))) ; for xxd
2812 (inputs
2813 `(("zlib" ,zlib)))
2814 (home-page "https://github.com/alexdobin/STAR")
2815 (synopsis "Universal RNA-seq aligner")
2816 (description
2817 "The Spliced Transcripts Alignment to a Reference (STAR) software is
2818 based on a previously undescribed RNA-seq alignment algorithm that uses
2819 sequential maximum mappable seed search in uncompressed suffix arrays followed
2820 by seed clustering and stitching procedure. In addition to unbiased de novo
2821 detection of canonical junctions, STAR can discover non-canonical splices and
2822 chimeric (fusion) transcripts, and is also capable of mapping full-length RNA
2823 sequences.")
2824 ;; STAR is licensed under GPLv3 or later; htslib is MIT-licensed.
2825 (license license:gpl3+)))
2826
2827 (define-public subread
2828 (package
2829 (name "subread")
2830 (version "1.4.6-p2")
2831 (source (origin
2832 (method url-fetch)
2833 (uri (string-append
2834 "mirror://sourceforge/subread/subread-"
2835 version "-source.tar.gz"))
2836 (sha256
2837 (base32
2838 "06sv9mpcsdj6p68y15d6gi70lca3lxmzk0dn61hg0kfsa7rxmsr3"))))
2839 (build-system gnu-build-system)
2840 (arguments
2841 `(#:tests? #f ;no "check" target
2842 ;; The CC and CCFLAGS variables are set to contain a lot of x86_64
2843 ;; optimizations by default, so we override these flags such that x86_64
2844 ;; flags are only added when the build target is an x86_64 system.
2845 #:make-flags
2846 (list (let ((system ,(or (%current-target-system)
2847 (%current-system)))
2848 (flags '("-ggdb" "-fomit-frame-pointer"
2849 "-ffast-math" "-funroll-loops"
2850 "-fmessage-length=0"
2851 "-O9" "-Wall" "-DMAKE_FOR_EXON"
2852 "-DMAKE_STANDALONE"
2853 "-DSUBREAD_VERSION=\\\"${SUBREAD_VERSION}\\\""))
2854 (flags64 '("-mmmx" "-msse" "-msse2" "-msse3")))
2855 (if (string-prefix? "x86_64" system)
2856 (string-append "CCFLAGS=" (string-join (append flags flags64)))
2857 (string-append "CCFLAGS=" (string-join flags))))
2858 "-f" "Makefile.Linux"
2859 "CC=gcc ${CCFLAGS}")
2860 #:phases
2861 (alist-cons-after
2862 'unpack 'enter-dir
2863 (lambda _ (chdir "src") #t)
2864 (alist-replace
2865 'install
2866 (lambda* (#:key outputs #:allow-other-keys)
2867 (let ((bin (string-append (assoc-ref outputs "out") "/bin/")))
2868 (mkdir-p bin)
2869 (copy-recursively "../bin" bin)))
2870 ;; no "configure" script
2871 (alist-delete 'configure %standard-phases)))))
2872 (inputs `(("zlib" ,zlib)))
2873 (home-page "http://bioinf.wehi.edu.au/subread-package/")
2874 (synopsis "Tool kit for processing next-gen sequencing data")
2875 (description
2876 "The subread package contains the following tools: subread aligner, a
2877 general-purpose read aligner; subjunc aligner: detecting exon-exon junctions
2878 and mapping RNA-seq reads; featureCounts: counting mapped reads for genomic
2879 features; exactSNP: a SNP caller that discovers SNPs by testing signals
2880 against local background noises.")
2881 (license license:gpl3+)))
2882
2883 (define-public vcftools
2884 (package
2885 (name "vcftools")
2886 (version "0.1.12b")
2887 (source (origin
2888 (method url-fetch)
2889 (uri (string-append
2890 "mirror://sourceforge/vcftools/vcftools_"
2891 version ".tar.gz"))
2892 (sha256
2893 (base32
2894 "148al9h7f8g8my2qdnpax51kdd2yjrivlx6frvakf4lz5r8j88wx"))))
2895 (build-system gnu-build-system)
2896 (arguments
2897 `(#:tests? #f ; no "check" target
2898 #:make-flags (list
2899 "CFLAGS=-O2" ; override "-m64" flag
2900 (string-append "PREFIX=" (assoc-ref %outputs "out"))
2901 (string-append "MANDIR=" (assoc-ref %outputs "out")
2902 "/share/man/man1"))
2903 #:phases
2904 (alist-cons-after
2905 'unpack 'patch-manpage-install
2906 (lambda _
2907 (substitute* "Makefile"
2908 (("cp \\$\\{PREFIX\\}/cpp/vcftools.1") "cp ./cpp/vcftools.1")))
2909 (alist-delete 'configure %standard-phases))))
2910 (inputs
2911 `(("perl" ,perl)
2912 ("zlib" ,zlib)))
2913 (home-page "http://vcftools.sourceforge.net/")
2914 (synopsis "Tools for working with VCF files")
2915 (description
2916 "VCFtools is a program package designed for working with VCF files, such
2917 as those generated by the 1000 Genomes Project. The aim of VCFtools is to
2918 provide easily accessible methods for working with complex genetic variation
2919 data in the form of VCF files.")
2920 ;; The license is declared as LGPLv3 in the README and
2921 ;; at http://vcftools.sourceforge.net/license.html
2922 (license license:lgpl3)))
2923
2924 (define-public vsearch
2925 (package
2926 (name "vsearch")
2927 (version "1.4.1")
2928 (source
2929 (origin
2930 (method url-fetch)
2931 (uri (string-append
2932 "https://github.com/torognes/vsearch/archive/v"
2933 version ".tar.gz"))
2934 (file-name (string-append name "-" version ".tar.gz"))
2935 (sha256
2936 (base32
2937 "0b1359wbzgb2cm04h7dq05v80vik88hnsv298xxd1q1f2q4ydni7"))
2938 (modules '((guix build utils)))
2939 (snippet
2940 '(begin
2941 ;; Remove bundled cityhash and '-mtune=native'.
2942 (substitute* "src/Makefile.am"
2943 (("^AM_CXXFLAGS=-I\\$\\{srcdir\\}/cityhash \
2944 -O3 -mtune=native -Wall -Wsign-compare")
2945 (string-append "AM_CXXFLAGS=-lcityhash"
2946 " -O3 -Wall -Wsign-compare"))
2947 (("^__top_builddir__bin_vsearch_SOURCES = cityhash/city.h \\\\")
2948 "__top_builddir__bin_vsearch_SOURCES = \\")
2949 (("^cityhash/config.h \\\\") "\\")
2950 (("^cityhash/city.cc \\\\") "\\"))
2951 (substitute* "src/vsearch.h"
2952 (("^\\#include \"cityhash/city.h\"")
2953 "#include <city.h>"))
2954 (delete-file-recursively "src/cityhash")
2955 #t))))
2956 (build-system gnu-build-system)
2957 (arguments
2958 `(#:phases
2959 (modify-phases %standard-phases
2960 (add-before 'configure 'autogen
2961 (lambda _ (zero? (system* "autoreconf" "-vif")))))))
2962 (inputs
2963 `(("zlib" ,zlib)
2964 ("bzip2" ,bzip2)
2965 ("cityhash" ,cityhash)))
2966 (native-inputs
2967 `(("autoconf" ,autoconf)
2968 ("automake" ,automake)))
2969 (synopsis "Sequence search tools for metagenomics")
2970 (description
2971 "VSEARCH supports DNA sequence searching, clustering, chimera detection,
2972 dereplication, pairwise alignment, shuffling, subsampling, sorting and
2973 masking. The tool takes advantage of parallelism in the form of SIMD
2974 vectorization as well as multiple threads to perform accurate alignments at
2975 high speed. VSEARCH uses an optimal global aligner (full dynamic programming
2976 Needleman-Wunsch).")
2977 (home-page "https://github.com/torognes/vsearch")
2978 ;; vsearch uses non-portable SSE intrinsics so building fails on other
2979 ;; platforms.
2980 (supported-systems '("x86_64-linux"))
2981 ;; Dual licensed; also includes public domain source.
2982 (license (list license:gpl3 license:bsd-2))))
2983
2984 (define-public bio-locus
2985 (package
2986 (name "bio-locus")
2987 (version "0.0.7")
2988 (source
2989 (origin
2990 (method url-fetch)
2991 (uri (rubygems-uri "bio-locus" version))
2992 (sha256
2993 (base32
2994 "02vmrxyimkj9sahsp4zhfhnmbvz6dbbqz1y01vglf8cbwvkajfl0"))))
2995 (build-system ruby-build-system)
2996 (native-inputs
2997 `(("ruby-rspec" ,ruby-rspec)))
2998 (synopsis "Tool for fast querying of genome locations")
2999 (description
3000 "Bio-locus is a tabix-like tool for fast querying of genome
3001 locations. Many file formats in bioinformatics contain records that
3002 start with a chromosome name and a position for a SNP, or a start-end
3003 position for indels. Bio-locus allows users to store this chr+pos or
3004 chr+pos+alt information in a database.")
3005 (home-page "https://github.com/pjotrp/bio-locus")
3006 (license license:expat)))
3007
3008 (define-public bio-blastxmlparser
3009 (package
3010 (name "bio-blastxmlparser")
3011 (version "2.0.4")
3012 (source (origin
3013 (method url-fetch)
3014 (uri (rubygems-uri "bio-blastxmlparser" version))
3015 (sha256
3016 (base32
3017 "1wf4qygcmdjgcqm6flmvsagfr1gs9lf63mj32qv3z1f481zc5692"))))
3018 (build-system ruby-build-system)
3019 (propagated-inputs
3020 `(("ruby-bio-logger" ,ruby-bio-logger)
3021 ("ruby-nokogiri" ,ruby-nokogiri)))
3022 (inputs
3023 `(("ruby-rspec" ,ruby-rspec)))
3024 (synopsis "Fast big data BLAST XML parser and library")
3025 (description
3026 "Very fast parallel big-data BLAST XML file parser which can be used as
3027 command line utility. Use blastxmlparser to: Parse BLAST XML; filter output;
3028 generate FASTA, JSON, YAML, RDF, JSON-LD, HTML, CSV, tabular output etc.")
3029 (home-page "http://github.com/pjotrp/blastxmlparser")
3030 (license license:expat)))
3031
3032 (define-public bioruby
3033 (package
3034 (name "bioruby")
3035 (version "1.5.0")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (rubygems-uri "bio" version))
3040 (sha256
3041 (base32
3042 "01k2fyjl5fpx4zn8g6gqiqvsg2j1fgixrs9p03vzxckynxdq3wmc"))))
3043 (build-system ruby-build-system)
3044 (propagated-inputs
3045 `(("ruby-libxml" ,ruby-libxml)))
3046 (native-inputs
3047 `(("which" ,which))) ; required for test phase
3048 (arguments
3049 `(#:phases
3050 (modify-phases %standard-phases
3051 (add-before 'build 'patch-test-command
3052 (lambda _
3053 (substitute* '("test/functional/bio/test_command.rb")
3054 (("/bin/sh") (which "sh")))
3055 (substitute* '("test/functional/bio/test_command.rb")
3056 (("/bin/ls") (which "ls")))
3057 (substitute* '("test/functional/bio/test_command.rb")
3058 (("which") (which "which")))
3059 (substitute* '("test/functional/bio/test_command.rb",
3060 "test/data/command/echoarg2.sh")
3061 (("/bin/echo") (which "echo")))
3062 #t)))))
3063 (synopsis "Ruby library, shell and utilities for bioinformatics")
3064 (description "BioRuby comes with a comprehensive set of Ruby development
3065 tools and libraries for bioinformatics and molecular biology. BioRuby has
3066 components for sequence analysis, pathway analysis, protein modelling and
3067 phylogenetic analysis; it supports many widely used data formats and provides
3068 easy access to databases, external programs and public web services, including
3069 BLAST, KEGG, GenBank, MEDLINE and GO.")
3070 (home-page "http://bioruby.org/")
3071 ;; Code is released under Ruby license, except for setup
3072 ;; (LGPLv2.1+) and scripts in samples (which have GPL2 and GPL2+)
3073 (license (list license:ruby license:lgpl2.1+ license:gpl2+ ))))
3074
3075 (define-public r-qtl
3076 (package
3077 (name "r-qtl")
3078 (version "1.37-11")
3079 (source
3080 (origin
3081 (method url-fetch)
3082 (uri (string-append "mirror://cran/src/contrib/qtl_"
3083 version ".tar.gz"))
3084 (sha256
3085 (base32
3086 "0h20d36mww7ljp51pfs66xq33yq4b4fwq9nsh02dpmfhlaxgx1xi"))))
3087 (build-system r-build-system)
3088 (home-page "http://rqtl.org/")
3089 (synopsis "R package for analyzing QTL experiments in genetics")
3090 (description "R/qtl is an extension library for the R statistics
3091 system. It is used to analyze experimental crosses for identifying
3092 genes contributing to variation in quantitative traits (so-called
3093 quantitative trait loci, QTLs).
3094
3095 Using a hidden Markov model, R/qtl allows to estimate genetic maps, to
3096 identify genotyping errors, and to perform single-QTL and two-QTL,
3097 two-dimensional genome scans.")
3098 (license license:gpl3)))