From 096a48cfaacefcefee2db5924a5fe97d4fda1125 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Thu, 25 Feb 2016 17:26:29 +0100 Subject: Added a WIP FreeBayes. --- gn/packages/bioinformatics.scm | 158 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) (limited to 'gn/packages') diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index bf39935..cf79a08 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -48,6 +48,164 @@ #:use-module (gn packages statistics) #:use-module (srfi srfi-1)) +(define-public freebayes + (let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb")) + (package + (name "freebayes") + (version (string-append "v1.0.2-" (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekg/freebayes.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 "1sbzwmcbn78ybymjnhwk7qc5r912azy5vqz2y7y81616yc3ba2a2")))) + (build-system gnu-build-system) + (native-inputs + `(("cmake" ,cmake) + ("htslib" ,htslib) + ;;("openmpi" ,openmpi) + ("zlib" ,zlib) + ("python" ,python-2) + ("perl" ,perl) + ("bamtools-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/bamtools/archive/" + "e77a43f5097ea7eee432ee765049c6b246d49baa" ".tar.gz")) + (file-name "bamtools-src.tar.gz") + (sha256 + (base32 "0rqymka21g6lfjfgxzr40pxz4c4fcl77jpy1np1li70pnc7h2cs1")))) + ("vcflib-src" + ,(origin + (method url-fetch) + (uri "https://github.com/vcflib/vcflib/archive/v1.0.0-rc1.tar.gz") + (file-name "vcflib-v1.0.0-rc1.tar.gz") + (sha256 + (base32 "0313cxnf77i74mz4xwkpdablw2a1nn7si9g5ar3kr0ipm02afizx")))) + ;; These are submodules for the vcflib version used in freebayes + ("tabixpp-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/tabixpp/archive/" + "bbc63a49acc52212199f92e9e3b8fba0a593e3f7" ".tar.gz")) + (file-name "tabixpp-src.tar.gz") + (sha256 + (base32 "1s06wmpgj4my4pik5kp2lc42hzzazbp5ism2y4i2ajp2y1c68g77")))) + ("intervaltree-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ekg/intervaltree/archive/" + "dbb4c513d1ad3baac516fc1484c995daf9b42838" ".tar.gz")) + (file-name "intervaltree-src.tar.gz") + (sha256 + (base32 "19prwpn2wxsrijp5svfqvfcxl5nj7zdhm3jycd5kqhl9nifpmcks")))) + ("smithwaterman-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/smithwaterman/archive/" + "203218b47d45ac56ef234716f1bd4c741b289be1" ".tar.gz")) + (file-name "smithwaterman-src.tar.gz") + (sha256 + (base32 "1lkxy4xkjn96l70jdbsrlm687jhisgw4il0xr2dm33qwcclzzm3b")))) + ("multichoose-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/multichoose/archive/" + "73d35daa18bf35729b9ba758041a9247a72484a5" ".tar.gz")) + (file-name "multichoose-src.tar.gz") + (sha256 + (base32 "07aizwdabmlnjaq4p3v0vsasgz1xzxid8xcxcw3paq8kh9c1099i")))) + ("fsom-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/fsom/archive/" + "a6ef318fbd347c53189384aef7f670c0e6ce89a3" ".tar.gz")) + (file-name "fsom-src.tar.gz") + (sha256 + (base32 "0q6b57ppxfvsm5cqmmbfmjpn5qvx2zi5pamvp3yh8gpmmz8cfbl3")))) + ("filevercmp-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/filevercmp/archive/" + "1a9b779b93d0b244040274794d402106907b71b7" ".tar.gz")) + (file-name "filevercmp-src.tar.gz") + (sha256 + (base32 "0yp5jswf5j2pqc6517x277s4s6h1ss99v57kxw9gy0jkfl3yh450")))) + ("fastahack-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/fastahack/archive/" + "c68cebb4f2e5d5d2b70cf08fbdf1944e9ab2c2dd" ".tar.gz")) + (file-name "fastahack-src.tar.gz") + (sha256 + (base32 "0j25lcl3jk1kls66zzxjfyq5ir6sfcvqrdwfcva61y3ajc9ssay2")))) + )) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (zero? (system* "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and + (unpack "bamtools-src" "bamtools") + (unpack "vcflib-src" "vcflib") + (unpack "intervaltree-src" "intervaltree") + (unpack "fastahack-src" "vcflib/fastahack") + (unpack "filevercmp-src" "vcflib/filevercmp") + (unpack "intervaltree-src" "vcflib/intervaltree") + (unpack "multichoose-src" "vcflib/multichoose") + (unpack "smithwaterman-src" "vcflib/smithwaterman") + (unpack "tabixpp-src" "vcflib/tabixpp"))))) + (replace + 'build + (lambda* (#:key inputs make-flags #:allow-other-keys) + (and + ;; We must compile Bamtools before we can compile the main + ;; project. + (with-directory-excursion "bamtools" + (system* "mkdir" "build") + (with-directory-excursion "build" + (and (zero? (system* "cmake" "../")) + (zero? (system* "make"))))) + ;; We must compile vcflib before we can compile the main + ;; project. + (with-directory-excursion "vcflib" + (with-directory-excursion "tabixpp" + (zero? (system* "make"))) + (zero? (system* "make" "CC=gcc" "-Itabixpp"))) + (zero? (system* "make" "src/version_git.h")) + (zero? (system* "make" "vcflib/Makefile"))))) + (replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) + (install-file "bin/freebayes" bin) + (install-file "bin/bamleftalign" bin)))) + ;; (replace + ;; 'check + ;; (lambda* (#:key outputs #:allow-other-keys) + ;; (with-directory-excursion "test" + ;; (zero? (system* "make" "test"))))) + ))) + (home-page "https://github.com/ekg/freebayes") + (synopsis "haplotype-based variant detector.") + (description "FreeBayes is a Bayesian genetic variant detector designed to +find small polymorphisms, specifically SNPs (single-nucleotide polymorphisms), +indels (insertions and deletions), MNPs (multi-nucleotide polymorphisms), and +complex events (composite insertion and substitution events) smaller than the +length of a short-read sequencing alignment.") + (license license:non-copyleft)))) + (define-public r-wgcna (package (name "r-wgcna") -- cgit v1.2.3 From 3d81b81500bca24e46bf83eb9750bdec19dd6862 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Mon, 29 Feb 2016 16:03:40 +0100 Subject: Reverted htslib for Sambamba to the repository's version. --- gn/packages/bioinformatics.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gn/packages') diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index cf79a08..3d27a72 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -495,11 +495,14 @@ and freshness without requiring additional information from the user.") ("htslib-src" ,(origin (method url-fetch) - (uri "https://github.com/samtools/htslib/archive/1.3.tar.gz") - (file-name "htslib-1.3.tar.gz") + (uri (string-append "https://github.com/lomereiter/htslib/archive/" + "2f3c3ea7b301f9b45737a793c0b2dcf0240e5ee5" ".tar.gz")) + ;;(uri "https://github.com/samtools/htslib/archive/1.3.tar.gz") + (file-name "htslib-2f3c3ea7b.tar.gz") (sha256 - (base32 "1bqkif7yrqmiqak5yb74kgpb2lsdlg7y344qa1xkdg7k1l4m86i9")) - (patches (list (search-patch "htslib-add-cram_to_bam.patch"))))) + (base32 "0bl6w856afnbgdsw8bybsxpqsyf2ba3f12rqh47hhpxvv866g08w")))) + ;;(base32 "1bqkif7yrqmiqak5yb74kgpb2lsdlg7y344qa1xkdg7k1l4m86i9")) + ;;(patches (list (search-patch "htslib-add-cram_to_bam.patch"))))) ("biod-src" ,(origin (method git-fetch) -- cgit v1.2.3 From 8dba0e74b31d02cf42fee9b9d93d1a3070cc0b24 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 1 Mar 2016 13:27:23 +0100 Subject: Add freebayes. --- gn/packages/bioinformatics.scm | 167 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) (limited to 'gn/packages') diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index ea4bf91..ffa28ae 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -20,6 +20,7 @@ #:use-module (gnu packages boost) #:use-module (gnu packages compression) #:use-module (gnu packages databases) + #:use-module (gnu packages cmake) #:use-module (gnu packages cpio) #:use-module (gnu packages file) #:use-module (gnu packages gcc) @@ -48,6 +49,172 @@ #:use-module (gn packages statistics) #:use-module (srfi srfi-1)) +(define-public freebayes + (let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb")) + (package + (name "freebayes") + (version (string-append "v1.0.2-" (string-take commit 7))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ekg/freebayes.git") + (commit commit))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 "1sbzwmcbn78ybymjnhwk7qc5r912azy5vqz2y7y81616yc3ba2a2")))) + (build-system gnu-build-system) + (native-inputs + `(("cmake" ,cmake) + ("htslib" ,htslib) + ("zlib" ,zlib) + ("python" ,python-2) + ("perl" ,perl) + ("bamtools-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/bamtools/archive/" + "e77a43f5097ea7eee432ee765049c6b246d49baa" ".tar.gz")) + (file-name "bamtools-src.tar.gz") + (sha256 + (base32 "0rqymka21g6lfjfgxzr40pxz4c4fcl77jpy1np1li70pnc7h2cs1")))) + ("vcflib-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/vcflib/vcflib/archive/" + "5ac091365fdc716cc47cc5410bb97ee5dc2a2c92" ".tar.gz")) + (file-name "vcflib-5ac0913.tar.gz") + (sha256 + (base32 "0ywshwpif059z5h0g7zzrdfzzdj2gr8xvwlwcsdxrms3p9iy35h8")))) + ;; These are submodules for the vcflib version used in freebayes + ("tabixpp-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/tabixpp/archive/" + "bbc63a49acc52212199f92e9e3b8fba0a593e3f7" ".tar.gz")) + (file-name "tabixpp-src.tar.gz") + (sha256 + (base32 "1s06wmpgj4my4pik5kp2lc42hzzazbp5ism2y4i2ajp2y1c68g77")))) + ("intervaltree-src" + ,(origin + (method url-fetch) + (uri (string-append + "https://github.com/ekg/intervaltree/archive/" + "dbb4c513d1ad3baac516fc1484c995daf9b42838" ".tar.gz")) + (file-name "intervaltree-src.tar.gz") + (sha256 + (base32 "19prwpn2wxsrijp5svfqvfcxl5nj7zdhm3jycd5kqhl9nifpmcks")))) + ("smithwaterman-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/smithwaterman/archive/" + "203218b47d45ac56ef234716f1bd4c741b289be1" ".tar.gz")) + (file-name "smithwaterman-src.tar.gz") + (sha256 + (base32 "1lkxy4xkjn96l70jdbsrlm687jhisgw4il0xr2dm33qwcclzzm3b")))) + ("multichoose-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/multichoose/archive/" + "73d35daa18bf35729b9ba758041a9247a72484a5" ".tar.gz")) + (file-name "multichoose-src.tar.gz") + (sha256 + (base32 "07aizwdabmlnjaq4p3v0vsasgz1xzxid8xcxcw3paq8kh9c1099i")))) + ("fsom-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/fsom/archive/" + "a6ef318fbd347c53189384aef7f670c0e6ce89a3" ".tar.gz")) + (file-name "fsom-src.tar.gz") + (sha256 + (base32 "0q6b57ppxfvsm5cqmmbfmjpn5qvx2zi5pamvp3yh8gpmmz8cfbl3")))) + ("filevercmp-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/filevercmp/archive/" + "1a9b779b93d0b244040274794d402106907b71b7" ".tar.gz")) + (file-name "filevercmp-src.tar.gz") + (sha256 + (base32 "0yp5jswf5j2pqc6517x277s4s6h1ss99v57kxw9gy0jkfl3yh450")))) + ("fastahack-src" + ,(origin + (method url-fetch) + (uri (string-append "https://github.com/ekg/fastahack/archive/" + "c68cebb4f2e5d5d2b70cf08fbdf1944e9ab2c2dd" ".tar.gz")) + (file-name "fastahack-src.tar.gz") + (sha256 + (base32 "0j25lcl3jk1kls66zzxjfyq5ir6sfcvqrdwfcva61y3ajc9ssay2")))) + )) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) + (add-after 'unpack 'unpack-submodule-sources + (lambda* (#:key inputs #:allow-other-keys) + (let ((unpack (lambda (source target) + (with-directory-excursion target + (zero? (system* "tar" "xvf" + (assoc-ref inputs source) + "--strip-components=1")))))) + (and + (unpack "bamtools-src" "bamtools") + (unpack "vcflib-src" "vcflib") + (unpack "intervaltree-src" "intervaltree") + (unpack "fastahack-src" "vcflib/fastahack") + (unpack "filevercmp-src" "vcflib/filevercmp") + (unpack "fsom-src" "vcflib/fsom") + (unpack "intervaltree-src" "vcflib/intervaltree") + (unpack "multichoose-src" "vcflib/multichoose") + (unpack "smithwaterman-src" "vcflib/smithwaterman") + (unpack "tabixpp-src" "vcflib/tabixpp"))))) + (add-after 'unpack-submodule-sources 'fix-makefile + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("vcflib/Makefile") + (("^GIT_VERSION.*") "GIT_VERSION = v1.0.0")))) + (replace + 'build + (lambda* (#:key inputs make-flags #:allow-other-keys) + (and + ;; We must compile Bamtools before we can compile the main + ;; project. + (with-directory-excursion "bamtools" + (system* "mkdir" "build") + (with-directory-excursion "build" + (and (zero? (system* "cmake" "../")) + (zero? (system* "make"))))) + ;; We must compile vcflib before we can compile the main + ;; project. + (with-directory-excursion "vcflib" + (with-directory-excursion "tabixpp" + (zero? (system* "make"))) + (zero? (system* "make" "CC=gcc" + (string-append "CFLAGS=\"" "-Itabixpp " + "-I" (assoc-ref inputs "htslib") "/include " "\"") "all"))) + + (with-directory-excursion "src" + (zero? (system* "make")))))) + (replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) + (install-file "bin/freebayes" bin) + (install-file "bin/bamleftalign" bin)))) + ;; (replace + ;; 'check + ;; (lambda* (#:key outputs #:allow-other-keys) + ;; (with-directory-excursion "test" + ;; (zero? (system* "make" "test"))))) + ))) + (home-page "https://github.com/ekg/freebayes") + (synopsis "haplotype-based variant detector.") + (description "FreeBayes is a Bayesian genetic variant detector designed to +find small polymorphisms, specifically SNPs (single-nucleotide polymorphisms), +indels (insertions and deletions), MNPs (multi-nucleotide polymorphisms), and +complex events (composite insertion and substitution events) smaller than the +length of a short-read sequencing alignment.") + (license license:non-copyleft)))) + (define-public r-biocpreprocesscore (package (name "r-biocpreprocesscore") -- cgit v1.2.3 From 66fc6e38aa7326b49fb79790ba885ab77205b742 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 1 Mar 2016 13:48:46 +0100 Subject: Changed Sambamba source. --- gn/packages/bioinformatics.scm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'gn/packages') diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index ffa28ae..12a4bcb 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -470,19 +470,22 @@ association studies (GWAS).") (license license:gpl3)))) (define-public sambamba - (let ((commit "2ca5a2dbac5ab90c3b4c588519edc3edcb71df84")) + (let ((commit "c810c7ef14957f16288c205fd7b9d25c4ae7005d")) + ;;(let ((commit "2ca5a2dbac5ab90c3b4c588519edc3edcb71df84")) (package (name "sambamba") (version (string-append "0.5.9-1." (string-take commit 7))) (source (origin (method git-fetch) - (uri (git-reference - (url "https://github.com/pjotrp/sambamba.git") + (uri (git-reference + (url "https://github.com/roelj/sambamba.git") + ;;(url "https://github.com/pjotrp/sambamba.git") (commit commit))) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 - "1f14wn9aaxwjkmla6pzq3s28741carbr2v0fd2v2mm1dcpwnrqz5")))) + "0c4c13f021sl7mf5xc2v8dbwsz775n8dlsrrn7qa6qgbx05n54dv")))) + ;;"1f14wn9aaxwjkmla6pzq3s28741carbr2v0fd2v2mm1dcpwnrqz5")))) (build-system gnu-build-system) (native-inputs `(("ldc" ,ldc) @@ -500,6 +503,7 @@ association studies (GWAS).") "2f3c3ea7b301f9b45737a793c0b2dcf0240e5ee5" ".tar.gz")) ;;(uri "https://github.com/samtools/htslib/archive/1.3.tar.gz") (file-name "htslib-2f3c3ea7b.tar.gz") + ;;(file-name "htslib-1.3.tar.gz") (sha256 (base32 "0bl6w856afnbgdsw8bybsxpqsyf2ba3f12rqh47hhpxvv866g08w")))) ;;(base32 "1bqkif7yrqmiqak5yb74kgpb2lsdlg7y344qa1xkdg7k1l4m86i9")) @@ -535,7 +539,7 @@ association studies (GWAS).") 'build (lambda* (#:key inputs make-flags #:allow-other-keys) (zero? (system* "make" "-f" "Makefile.guix" - (string-append "LDC_LIB_PATH=" + (string-append "LDC_LIB_PATH=" (assoc-ref inputs "ldc") "/lib"))))) (replace -- cgit v1.2.3 From f50227eebb02a8cd1592a2c4d1a2aa9dc7930ee8 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 1 Mar 2016 14:19:33 +0100 Subject: Use the original Makefile to statically compile lz4. --- gn/packages/bioinformatics.scm | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'gn/packages') diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index 12a4bcb..d37a287 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -489,20 +489,24 @@ association studies (GWAS).") (build-system gnu-build-system) (native-inputs `(("ldc" ,ldc) - ("lz4" ,lz4) + ;;("lz4" ,lz4) ("rdmd" ,rdmd) ("zlib" ,zlib) - ("perl" ,perl) ; Needed for htslib tests? - ("ruby" ,ruby) ; Needed for htslib tests? - ("python" ,python) ; Needed for htslib tests? + ("perl" ,perl) ; Needed for htslib + ("ruby" ,ruby) ; Needed for htslib + ("python" ,python) ; Needed for htslib ("gcc" ,gcc) + ("lz4-src" + ,(origin + (method url-fetch) + (uri "https://github.com/Cyan4973/lz4/archive/160661c7a4cbf805f4af74d2e3932a17a66e6ce7.tar.gz") + (sha256 + (base32 "131nnbsd5dh7c8sdqzc9kawh3mi0qi4qxznv7zhzfszlx4g2fd20")))) ("htslib-src" ,(origin (method url-fetch) - (uri (string-append "https://github.com/lomereiter/htslib/archive/" - "2f3c3ea7b301f9b45737a793c0b2dcf0240e5ee5" ".tar.gz")) + (uri "https://github.com/lomereiter/htslib/archive/2f3c3ea7b301f9b45737a793c0b2dcf0240e5ee5.tar.gz") ;;(uri "https://github.com/samtools/htslib/archive/1.3.tar.gz") - (file-name "htslib-2f3c3ea7b.tar.gz") ;;(file-name "htslib-1.3.tar.gz") (sha256 (base32 "0bl6w856afnbgdsw8bybsxpqsyf2ba3f12rqh47hhpxvv866g08w")))) @@ -532,13 +536,16 @@ association studies (GWAS).") (and (with-directory-excursion "htslib" (zero? (system* "tar" "xvf" (assoc-ref inputs "htslib-src") "--strip-components=1"))) + (with-directory-excursion "lz4" + (zero? (system* "tar" "xvf" (assoc-ref inputs "lz4-src") + "--strip-components=1"))) (zero? (system* "rm" "-r" "BioD")) (zero? (system* "ln" "--symbolic" "--no-target-directory" (assoc-ref inputs "biod-src") "BioD"))))) (replace 'build (lambda* (#:key inputs make-flags #:allow-other-keys) - (zero? (system* "make" "-f" "Makefile.guix" + (zero? (system* "make" "sambamba-ldmd2-64" "CC=gcc" "D_COMPILER=ldc2" (string-append "LDC_LIB_PATH=" (assoc-ref inputs "ldc") "/lib"))))) -- cgit v1.2.3