From f4e38087ff0c0261196304179f7d537d4806f164 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Fri, 11 Mar 2016 13:02:06 +0100 Subject: Added test suite to pindel package. --- gn/packages/bioinformatics.scm | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'gn/packages/bioinformatics.scm') diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index 276471b..2c8feec 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -1140,15 +1140,19 @@ manipulations on VCF files.") ("python" ,python-2) ("perl" ,perl))) (arguments - `(#:tests? #f - #:phases + `(#:phases (modify-phases %standard-phases (delete 'configure) ; There is no configure phase. + ;; The build phase needs to run 'make' twice for the reasons described + ;; below. (replace 'build (lambda* (#:key inputs #:allow-other-keys) - ;; The first run creates a Makefile.local file. + ;; The first run creates a Makefile.local file. Make will report + ;; the failure to find Makefile.local, but we can ignore this error. (system* "make" (string-append "SAMTOOLS=" (assoc-ref inputs "samtools"))) - ;; The second run actually compiles the program. + ;; The second run actually compiles the program. Now Makefile.local + ;; is available, and we should treat an exiting make with an error as + ;; a true error. (zero? (system* "make")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -1156,7 +1160,17 @@ manipulations on VCF files.") (install-file "src/pindel" bin) (install-file "src/pindel2vcf" bin) (install-file "src/pindel2vcf4tcga" bin) - (install-file "src/sam2pindel" bin))))))) + (install-file "src/sam2pindel" bin)))) + ;; There are multiple test targets, so in order to run all + ;; tests, we must run the separate make targets. + (replace 'check + (lambda* (#:key inputs #:allow-other-keys) + (and + (zero? (system* "make" "acceptance-tests")) + (zero? (system* "make" "coverage-tests")) + (zero? (system* "make" "cppcheck")) + (zero? (system* "make" "functional-tests")) + (zero? (system* "make" "regression-tests")))))))) (home-page "https://github.com/genome/pindel") (synopsis "Structural variants detector for next-gen sequencing data") (description "Pindel can detect breakpoints of large deletions, medium sized -- cgit v1.2.3 From a30321a25267f80df6084104c8d562dc61046c1f Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Wed, 16 Mar 2016 11:14:47 +0100 Subject: Add contra. --- gn/packages/bioinformatics.scm | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) (limited to 'gn/packages/bioinformatics.scm') diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index d81a19a..a0a375b 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -62,6 +62,57 @@ #:use-module (gnu packages bootstrap) #:use-module (srfi srfi-1)) +(define-public contra + (package + (name "contra") + (version "2.0.6") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/contra-cnv/CONTRA.v" version ".tar.gz")) + (sha256 + (base32 + "0agpcm2xh5f0i9n9sx1kvln6mzdksddmh11bvzj6bh76yw5pnw91")))) + (build-system gnu-build-system) + (propagated-inputs + `(("python" ,python-2) + ("r" ,r) + ("r-dnacopy" ,r-dnacopy) + ("bedtools" ,bedtools) + ("samtools" ,samtools))) + (arguments + `(#:tests? #f ; There are no tests. + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) ; We can use Guix's BEDtools instead. + (replace 'install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (bin (string-append out "/bin")) + (doc (string-append out "/share/doc/contra"))) + (mkdir-p bin) + (mkdir-p doc) + (and + (zero? (system* "cp" "--recursive" "scripts" bin)) + (zero? (system* "cp" "contra.py" bin)) + (zero? (system* "cp" "baseline.py" bin)) + ;; There's only a pre-built PDF available. + (zero? (system* "cp" "CONTRA_User_Guide.2.0.pdf" doc))))))))) + (home-page "http://contra-cnv.sourceforge.net/") + (synopsis "Tool for copy number variation (CNV) detection for targeted +resequencing data") + (description "CONTRA is a tool for copy number variation (CNV) detection +for targeted resequencing data such as those from whole-exome capture data. +CONTRA calls copy number gains and losses for each target region with key +strategies including the use of base-level log-ratios to remove GC-content +bias, correction for an imbalanced library size effect on log-ratios, and the +estimation of log-ratio variations via binning and interpolation. It takes +standard alignment formats (BAM/SAM) and outputs in variant call format +(VCF 4.0) for easy integration with other next generation sequencing analysis +package.") + (license license:gpl3+))) + (define-public freec (package (name "control-freec") -- cgit v1.2.3 From e024f97ea8886191fa49d56782dc42954bdc9880 Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Wed, 16 Mar 2016 13:49:52 +0100 Subject: Add delly. --- delly-use-system-libraries.patch | 65 ++++++++++++++++++++++++++++++++++++++++ gn/packages/bioinformatics.scm | 56 ++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+) create mode 100644 delly-use-system-libraries.patch (limited to 'gn/packages/bioinformatics.scm') diff --git a/delly-use-system-libraries.patch b/delly-use-system-libraries.patch new file mode 100644 index 0000000..3ce817f --- /dev/null +++ b/delly-use-system-libraries.patch @@ -0,0 +1,65 @@ +This patch let's Delly use the system versions of htslib and boost. + +Patch by Roel Janssen +--- a/Makefile 2016-03-16 13:08:49.936706607 +0100 ++++ b/Makefile 2016-03-16 13:09:12.351706212 +0100 +@@ -9,8 +9,8 @@ + + # Flags + CXX=g++ +-CXXFLAGS += -isystem ${SEQTK_ROOT} -isystem ${BOOST_ROOT} -pedantic -W -Wall -Wno-unknown-pragmas +-LDFLAGS += -L${SEQTK_ROOT} -L${BOOST_ROOT}/stage/lib -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time ++CXXFLAGS += -pedantic -W -Wall -Wno-unknown-pragmas ++LDFLAGS += -lboost_iostreams -lboost_filesystem -lboost_system -lboost_program_options -lboost_date_time + + # Additional flags for release/debug + ifeq (${PARALLEL}, 1) +@@ -23,7 +23,7 @@ + ifeq (${STATIC}, 1) + LDFLAGS += -static -static-libgcc -pthread -lhts -lz + else +- LDFLAGS += -lhts -lz -Wl,-rpath,${SEQTK_ROOT},-rpath,${BOOST_ROOT}/stage/lib ++ LDFLAGS += -lhts -lz + endif + ifeq (${DEBUG}, 1) + CXXFLAGS += -g -O0 -fno-inline -DDEBUG +@@ -41,32 +41,24 @@ + DELLYSOURCES = $(wildcard src/*.h) $(wildcard src/*.cpp) + + # Targets +-TARGETS = .htslib .boost src/delly src/extract src/cov src/iover src/stats ++TARGETS = src/delly src/extract src/cov src/iover src/stats + + all: $(TARGETS) + +-.htslib: $(HTSLIBSOURCES) +- cd src/htslib && make && make lib-static && cd ../../ && touch .htslib +- +-.boost: $(BOOSTSOURCES) +- cd src/modular-boost && ./bootstrap.sh --prefix=${PWD}/src/modular-boost --without-icu --with-libraries=iostreams,filesystem,system,program_options,date_time && ./b2 && ./b2 headers && cd ../../ && touch .boost +- +-src/delly: .htslib .boost $(DELLYSOURCES) ++src/delly: $(DELLYSOURCES) + $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) + +-src/extract: .htslib .boost $(DELLYSOURCES) ++src/extract: $(DELLYSOURCES) + $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) + +-src/cov: .htslib .boost $(DELLYSOURCES) ++src/cov: $(DELLYSOURCES) + $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) + +-src/iover: .htslib .boost $(DELLYSOURCES) ++src/iover: $(DELLYSOURCES) + $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) + +-src/stats: .htslib .boost $(DELLYSOURCES) ++src/stats: $(DELLYSOURCES) + $(CXX) $(CXXFLAGS) $@.cpp -o $@ $(LDFLAGS) + + clean: +- cd src/htslib && make clean +- cd src/modular-boost && ./b2 --clean-all +- rm -f $(TARGETS) $(TARGETS:=.o) .htslib .boost ++ rm -f $(TARGETS) $(TARGETS:=.o) diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm index a0a375b..a4d14b0 100644 --- a/gn/packages/bioinformatics.scm +++ b/gn/packages/bioinformatics.scm @@ -113,6 +113,62 @@ standard alignment formats (BAM/SAM) and outputs in variant call format package.") (license license:gpl3+))) +(define boost-delly + (package (inherit boost) + (name "boost-delly") + (version "1.57.0") + (source (origin + (method url-fetch) + (uri (string-append + "mirror://sourceforge/boost/boost_" + (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) + ".tar.bz2")) + (sha256 + (base32 + "0rs94vdmg34bwwj23fllva6mhrml2i7mvmlb11zyrk1k5818q34i")))))) + +(define-public delly + (package + (name "delly") + (version "0.7.2") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/tobiasrausch/delly/archive/v" + version ".tar.gz")) + (sha256 + (base32 "173mmg43dbxqkyq0kiffz63xbmggr2kzd55mwxci9yfh5md1zprn")) + (patches (list (search-patch "delly-use-system-libraries.patch"))))) + (build-system gnu-build-system) + (native-inputs + `(("python" ,python-2))) + (inputs + `(("boost" ,boost-delly) ; Use version 1.57.0 instead. + ("htslib" ,htslib) + ("zlib" ,zlib) + ("bzip2" ,bzip2))) + (arguments + `(#:tests? #f ; There are no tests to run. + #:phases + (modify-phases %standard-phases + (delete 'configure) ; There is no configure phase. + (replace 'install + (lambda _ + (let ((bin (string-append (assoc-ref %outputs "out") "/bin"))) + (install-file "src/cov" bin) + (install-file "src/delly" bin) + (install-file "src/extract" bin) + (install-file "src/iover" bin) + (install-file "src/stats" bin))))))) + (home-page "https://github.com/tobiasrausch/delly") + (synopsis "Integrated structural variant prediction method") + (description "Delly is an integrated structural variant prediction method +that can discover and genotype deletions, tandem duplications, inversions and +translocations at single-nucleotide resolution in short-read massively parallel +sequencing data. It uses paired-ends and split-reads to sensitively and +accurately delineate genomic rearrangements throughout the genome. Structural +variants can be visualized using Delly-maze and Delly-suave.") + (license license:gpl3))) + (define-public freec (package (name "control-freec") -- cgit v1.2.3