gnu: freebayes: Update to 1.3.3.
* gnu/packages/bioinformatics.scm (freebayes): Update to 1.3.3. [source]: Add patch. Add snippet to remove vendored library. [build-system]: Switch to meson-build-system. [inputs]: Remove bamtools. Add fastahack, smithwaterman, tabixpp. [native-inputs]: Remove procps, python-2, tabixpp source, smithwaterman source, multichoose source, fsom source, filevercmp source, fastahack source, bash-tap source. Add bash-tap, grep, pkg-config, simde, vcflib. [arguments]: Drop make-flags. Don't delete 'configure phase. Delete custom 'fix-tests, 'build-tabixpp-and-vcflib, 'fix-makefiles, 'install phases. Adjust 'unpack-submodule-sources phase to changed native-inputs. Add new 'patch-source phase.
This commit is contained in:
parent
3ddeefe854
commit
fc9fd5496f
3 changed files with 218 additions and 115 deletions
|
@ -998,6 +998,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/fpc-reproducibility.patch \
|
%D%/packages/patches/fpc-reproducibility.patch \
|
||||||
%D%/packages/patches/fplll-std-fenv.patch \
|
%D%/packages/patches/fplll-std-fenv.patch \
|
||||||
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
|
%D%/packages/patches/freedink-engine-fix-sdl-hints.patch \
|
||||||
|
%D%/packages/patches/freebayes-devendor-deps.patch \
|
||||||
%D%/packages/patches/freeimage-unbundle.patch \
|
%D%/packages/patches/freeimage-unbundle.patch \
|
||||||
%D%/packages/patches/fuse-overlapping-headers.patch \
|
%D%/packages/patches/fuse-overlapping-headers.patch \
|
||||||
%D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \
|
%D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
#:use-module (guix build-system trivial)
|
#:use-module (guix build-system trivial)
|
||||||
#:use-module (guix deprecation)
|
#:use-module (guix deprecation)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages assembly)
|
||||||
#:use-module (gnu packages autotools)
|
#:use-module (gnu packages autotools)
|
||||||
#:use-module (gnu packages algebra)
|
#:use-module (gnu packages algebra)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
|
@ -15011,125 +15012,97 @@ manipulations on VCF files.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public freebayes
|
(define-public freebayes
|
||||||
(let ((commit "3ce827d8ebf89bb3bdc097ee0fe7f46f9f30d5fb")
|
(package
|
||||||
(revision "1")
|
(name "freebayes")
|
||||||
(version "1.0.2"))
|
(version "1.3.3")
|
||||||
(package
|
(source (origin
|
||||||
(name "freebayes")
|
(method git-fetch)
|
||||||
(version (git-version version revision commit))
|
(uri (git-reference
|
||||||
(source (origin
|
(url "https://github.com/ekg/freebayes")
|
||||||
(method git-fetch)
|
(commit (string-append "v" version))))
|
||||||
(uri (git-reference
|
(file-name (git-file-name name version))
|
||||||
(url "https://github.com/ekg/freebayes")
|
(sha256
|
||||||
(commit commit)))
|
(base32 "0myz3giad7jqp6ricdfnig9ymlcps2h67mlivadvx97ngagm85z8"))
|
||||||
(file-name (git-file-name name version))
|
(patches (search-patches "freebayes-devendor-deps.patch"))
|
||||||
(sha256
|
(modules '((guix build utils)))
|
||||||
(base32 "1sbzwmcbn78ybymjnhwk7qc5r912azy5vqz2y7y81616yc3ba2a2"))))
|
(snippet
|
||||||
(build-system gnu-build-system)
|
'(begin
|
||||||
(inputs
|
(delete-file-recursively "contrib/htslib")
|
||||||
`(("bamtools" ,bamtools)
|
#t))))
|
||||||
("htslib" ,htslib)
|
(build-system meson-build-system)
|
||||||
("zlib" ,zlib)))
|
(inputs
|
||||||
(native-inputs
|
`(("fastahack" ,fastahack)
|
||||||
`(("bc" ,bc) ; Needed for running tests.
|
("htslib" ,htslib)
|
||||||
("samtools" ,samtools) ; Needed for running tests.
|
("smithwaterman" ,smithwaterman)
|
||||||
("parallel" ,parallel) ; Needed for running tests.
|
("tabixpp" ,tabixpp)
|
||||||
("perl" ,perl) ; Needed for running tests.
|
("zlib" ,zlib)))
|
||||||
("procps" ,procps) ; Needed for running tests.
|
(native-inputs
|
||||||
("python" ,python-2) ; Needed for running tests.
|
`(("bash-tap" ,bash-tap)
|
||||||
("vcflib-src" ,(package-source vcflib))
|
("bc" ,bc)
|
||||||
;; These are submodules for the vcflib version used in freebayes.
|
("grep" ,grep) ; Built with perl support.
|
||||||
;; This package builds against the .o files so we need to extract the source.
|
("parallel" ,parallel)
|
||||||
("tabixpp-src" ,(package-source tabixpp))
|
("perl" ,perl)
|
||||||
("smithwaterman-src" ,(package-source smithwaterman))
|
("pkg-config" ,pkg-config)
|
||||||
("multichoose-src" ,(package-source multichoose))
|
("samtools" ,samtools)
|
||||||
("fsom-src" ,(package-source fsom))
|
("simde" ,simde)
|
||||||
("filevercmp-src" ,(package-source filevercmp))
|
;; We need some binaries from vcflib, but we also need to link against a
|
||||||
("fastahack-src" ,(package-source fastahack))
|
;; subset of the library. Vendor the parts we need until we have a shared library.
|
||||||
("intervaltree-src" ,(package-source intervaltree))
|
("vcflib" ,vcflib)
|
||||||
;; These submodules are needed to run the tests.
|
("vcflib-src" ,(package-source vcflib))
|
||||||
("bash-tap-src" ,(package-source bash-tap))
|
("intervaltree-src" ,(package-source intervaltree))
|
||||||
("test-simple-bash-src"
|
;; This submodule is needed to run the tests.
|
||||||
,(origin
|
("test-simple-bash-src"
|
||||||
(method git-fetch)
|
,(origin
|
||||||
(uri (git-reference
|
(method git-fetch)
|
||||||
(url "https://github.com/ingydotnet/test-simple-bash/")
|
(uri (git-reference
|
||||||
(commit "124673ff204b01c8e96b7fc9f9b32ee35d898acc")))
|
(url "https://github.com/ingydotnet/test-simple-bash/")
|
||||||
(file-name "test-simple-bash-src-checkout")
|
(commit "124673ff204b01c8e96b7fc9f9b32ee35d898acc")))
|
||||||
(sha256
|
(file-name "test-simple-bash-src-checkout")
|
||||||
(base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga"))))))
|
(sha256
|
||||||
(arguments
|
(base32 "043plp6z0x9yf7mdpky1fw7zcpwn1p47px95w9mh16603zqqqpga"))))))
|
||||||
`(#:make-flags
|
(arguments
|
||||||
(list "CC=gcc"
|
`(#:phases
|
||||||
(string-append "BAMTOOLS_ROOT="
|
(modify-phases %standard-phases
|
||||||
(assoc-ref %build-inputs "bamtools")))
|
(add-after 'unpack 'patch-source
|
||||||
#:test-target "test"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
#:phases
|
(let ((bash-tap (assoc-ref inputs "bash-tap")))
|
||||||
(modify-phases %standard-phases
|
(substitute* (find-files "test/t")
|
||||||
(delete 'configure)
|
(("BASH_TAP_ROOT=bash-tap")
|
||||||
(add-after 'unpack 'fix-tests
|
(string-append "BASH_TAP_ROOT=" bash-tap "/bin"))
|
||||||
(lambda _
|
(("bash-tap/bash-tap-bootstrap")
|
||||||
(substitute* "test/t/01_call_variants.t"
|
(string-append bash-tap "/bin/bash-tap-bootstrap"))
|
||||||
(("grep -P \"\\(\\\\t500\\$\\|\\\\t11000\\$\\|\\\\t1000\\$\\)\"")
|
(("source.*bash-tap-bootstrap")
|
||||||
"grep -E ' (500|11000|1000)$'"))
|
(string-append "source " bash-tap "/bin/bash-tap-bootstrap")))
|
||||||
#t))
|
(substitute* "meson.build"
|
||||||
(add-after 'unpack 'unpack-submodule-sources
|
;; Some inputs aren't actually needed.
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
((".*bamtools/src.*") "")
|
||||||
(let ((unpack (lambda (source target)
|
((".*multichoose.*") "")
|
||||||
(with-directory-excursion target
|
(("'vcflib/filevercmp'") ""))
|
||||||
(if (file-is-directory? (assoc-ref inputs source))
|
#t)))
|
||||||
(copy-recursively (assoc-ref inputs source) ".")
|
(add-after 'unpack 'unpack-submodule-sources
|
||||||
(invoke "tar" "xvf"
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(assoc-ref inputs source)
|
(let ((unpack (lambda (source target)
|
||||||
"--strip-components=1"))))))
|
(unless (directory-exists? target)
|
||||||
(and
|
(mkdir-p target))
|
||||||
(unpack "vcflib-src" "vcflib")
|
(with-directory-excursion target
|
||||||
(unpack "fastahack-src" "vcflib/fastahack")
|
(if (file-is-directory? (assoc-ref inputs source))
|
||||||
(unpack "filevercmp-src" "vcflib/filevercmp")
|
(copy-recursively (assoc-ref inputs source) ".")
|
||||||
(unpack "fsom-src" "vcflib/fsom")
|
(invoke "tar" "xvf"
|
||||||
(unpack "intervaltree-src" "vcflib/intervaltree")
|
(assoc-ref inputs source)
|
||||||
(unpack "multichoose-src" "vcflib/multichoose")
|
"--strip-components=1"))))))
|
||||||
(unpack "smithwaterman-src" "vcflib/smithwaterman")
|
(and
|
||||||
(unpack "tabixpp-src" "vcflib/tabixpp")
|
(unpack "vcflib-src" "vcflib")
|
||||||
(unpack "test-simple-bash-src" "test/test-simple-bash")
|
(unpack "intervaltree-src" "vcflib/intervaltree")
|
||||||
(unpack "bash-tap-src" "test/bash-tap")))))
|
(unpack "test-simple-bash-src" "test/test-simple-bash"))
|
||||||
(add-after 'unpack-submodule-sources 'fix-makefiles
|
#t))))))
|
||||||
(lambda _
|
(home-page "https://github.com/ekg/freebayes")
|
||||||
;; We don't have the .git folder to get the version tag from.
|
(synopsis "Haplotype-based variant detector")
|
||||||
(substitute* "vcflib/Makefile"
|
(description "FreeBayes is a Bayesian genetic variant detector designed to
|
||||||
(("^GIT_VERSION.*")
|
|
||||||
(string-append "GIT_VERSION = v" ,version)))
|
|
||||||
(substitute* "src/Makefile"
|
|
||||||
(("-I\\$\\(BAMTOOLS_ROOT\\)/src")
|
|
||||||
"-I$(BAMTOOLS_ROOT)/include/bamtools"))
|
|
||||||
#t))
|
|
||||||
(add-before 'build 'build-tabixpp-and-vcflib
|
|
||||||
(lambda* (#:key inputs make-flags #:allow-other-keys)
|
|
||||||
(with-directory-excursion "vcflib"
|
|
||||||
(with-directory-excursion "tabixpp"
|
|
||||||
(apply invoke "make"
|
|
||||||
(string-append "HTS_LIB="
|
|
||||||
(assoc-ref inputs "htslib")
|
|
||||||
"/lib/libhts.a")
|
|
||||||
make-flags))
|
|
||||||
(apply invoke "make"
|
|
||||||
(string-append "CFLAGS=-Itabixpp")
|
|
||||||
"all"
|
|
||||||
make-flags))))
|
|
||||||
(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))
|
|
||||||
#t)))))
|
|
||||||
(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),
|
find small polymorphisms, specifically SNPs (single-nucleotide polymorphisms),
|
||||||
indels (insertions and deletions), MNPs (multi-nucleotide polymorphisms), and
|
indels (insertions and deletions), MNPs (multi-nucleotide polymorphisms), and
|
||||||
complex events (composite insertion and substitution events) smaller than the
|
complex events (composite insertion and substitution events) smaller than the
|
||||||
length of a short-read sequencing alignment.")
|
length of a short-read sequencing alignment.")
|
||||||
(license license:expat))))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public samblaster
|
(define-public samblaster
|
||||||
(package
|
(package
|
||||||
|
|
129
gnu/packages/patches/freebayes-devendor-deps.patch
Normal file
129
gnu/packages/patches/freebayes-devendor-deps.patch
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
This patch is original to Guix, ongoing work to upstream bits as possible.
|
||||||
|
|
||||||
|
From 50833daba0b1dbe2ed364b1e980b67a09a312789 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Efraim Flashner <efraim@flashner.co.il>
|
||||||
|
Date: Sun, 17 Jan 2021 13:27:17 +0200
|
||||||
|
Subject: [PATCH] devendor-dependants
|
||||||
|
|
||||||
|
---
|
||||||
|
meson.build | 60 +++++++++++++++++++++++++++++++++++++++++------------
|
||||||
|
1 file changed, 47 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index f6bf242..7a3805e 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -9,8 +9,12 @@ project('freebayes', ['cpp', 'c'],
|
||||||
|
|
||||||
|
zlib_dep = dependency('zlib')
|
||||||
|
lzma_dep = dependency('liblzma')
|
||||||
|
+simde_dep = dependency('simde')
|
||||||
|
bzip2_dep = dependency('bz2lib', required: false)
|
||||||
|
htslib_dep = dependency('htslib', required : false)
|
||||||
|
+tabixpp_dep = dependency('tabixpp', required : false)
|
||||||
|
+fastahack_dep = dependency('fastahack', required : false)
|
||||||
|
+smithwaterman_dep = dependency('smithwaterman', required : false)
|
||||||
|
thread_dep = dependency('threads')
|
||||||
|
|
||||||
|
if htslib_dep.found()
|
||||||
|
@@ -59,6 +63,41 @@ else
|
||||||
|
]
|
||||||
|
endif
|
||||||
|
|
||||||
|
+if tabixpp_dep.found()
|
||||||
|
+ tabixpp_includes = ''
|
||||||
|
+ tabixpp_src = []
|
||||||
|
+else
|
||||||
|
+ tabixpp_includes = [
|
||||||
|
+ 'vcflib/tabixpp',
|
||||||
|
+ ]
|
||||||
|
+ tabixpp_src = [
|
||||||
|
+ 'vcflib/tabixpp/tabix.cpp',
|
||||||
|
+ ]
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+if fastahack_dep.found()
|
||||||
|
+ fastahack_src = []
|
||||||
|
+else
|
||||||
|
+ fastahack_src = [
|
||||||
|
+ 'vcflib/fastahack/Fasta.cpp',
|
||||||
|
+ ]
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
+if smithwaterman_dep.found()
|
||||||
|
+ smithwaterman_includes = ''
|
||||||
|
+ smithwaterman_src = []
|
||||||
|
+else
|
||||||
|
+ smithwaterman_includes = [
|
||||||
|
+ 'vcflib/smithwaterman',
|
||||||
|
+ ]
|
||||||
|
+ smithwaterman_src = [
|
||||||
|
+ 'vcflib/smithwaterman/SmithWatermanGotoh.cpp',
|
||||||
|
+ 'vcflib/smithwaterman/disorder.cpp',
|
||||||
|
+ 'vcflib/smithwaterman/Repeats.cpp',
|
||||||
|
+ 'vcflib/smithwaterman/LeftAlign.cpp',
|
||||||
|
+ 'vcflib/smithwaterman/IndelAllele.cpp',
|
||||||
|
+ ]
|
||||||
|
+endif
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
@@ -105,22 +144,17 @@ seqlib_src = [
|
||||||
|
]
|
||||||
|
|
||||||
|
vcflib_src = [
|
||||||
|
- 'vcflib/tabixpp/tabix.cpp',
|
||||||
|
'vcflib/src/Variant.cpp',
|
||||||
|
- 'vcflib/smithwaterman/SmithWatermanGotoh.cpp',
|
||||||
|
- 'vcflib/smithwaterman/disorder.cpp',
|
||||||
|
- 'vcflib/smithwaterman/Repeats.cpp',
|
||||||
|
- 'vcflib/smithwaterman/LeftAlign.cpp',
|
||||||
|
- 'vcflib/smithwaterman/IndelAllele.cpp',
|
||||||
|
+ tabixpp_src,
|
||||||
|
+ smithwaterman_src,
|
||||||
|
]
|
||||||
|
|
||||||
|
bamleftalign_src = [
|
||||||
|
'src/bamleftalign.cpp',
|
||||||
|
'src/IndelAllele.cpp',
|
||||||
|
'contrib/SeqLib/src/BamWriter.cpp',
|
||||||
|
- 'vcflib/fastahack/Fasta.cpp',
|
||||||
|
- 'vcflib/smithwaterman/LeftAlign.cpp',
|
||||||
|
- 'vcflib/smithwaterman/IndelAllele.cpp',
|
||||||
|
+ fastahack_src,
|
||||||
|
+ smithwaterman_src,
|
||||||
|
'vcflib/src/split.cpp',
|
||||||
|
'src/LeftAlign.cpp',
|
||||||
|
]
|
||||||
|
@@ -135,8 +169,8 @@ incdir = include_directories(
|
||||||
|
'contrib',
|
||||||
|
'contrib/SeqLib',
|
||||||
|
'vcflib/src',
|
||||||
|
- 'vcflib/tabixpp',
|
||||||
|
- 'vcflib/smithwaterman',
|
||||||
|
+ tabixpp_includes,
|
||||||
|
+ smithwaterman_includes,
|
||||||
|
'vcflib/multichoose',
|
||||||
|
'vcflib/filevercmp')
|
||||||
|
|
||||||
|
@@ -152,7 +186,7 @@ executable('freebayes',
|
||||||
|
include_directories : incdir,
|
||||||
|
cpp_args : cpp_args,
|
||||||
|
c_args : c_args,
|
||||||
|
- dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep],
|
||||||
|
+ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, smithwaterman_dep, thread_dep],
|
||||||
|
install: true
|
||||||
|
)
|
||||||
|
|
||||||
|
@@ -165,7 +199,7 @@ executable('bamleftalign',
|
||||||
|
include_directories : incdir,
|
||||||
|
cpp_args : cpp_args,
|
||||||
|
c_args : c_args,
|
||||||
|
- dependencies: [zlib_dep, lzma_dep, htslib_dep, thread_dep],
|
||||||
|
+ dependencies: [zlib_dep, lzma_dep, simde_dep, htslib_dep, tabixpp_dep, fastahack_dep, smithwaterman_dep, thread_dep],
|
||||||
|
install: true
|
||||||
|
)
|
||||||
|
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
Reference in a new issue