aboutsummaryrefslogtreecommitdiff
path: root/gn/packages
diff options
context:
space:
mode:
authorEfraim Flashner2019-09-11 04:09:08 -0500
committerEfraim Flashner2019-09-11 04:09:08 -0500
commite31d46f821048cbde3ab1cefb09cc9d734123d82 (patch)
tree3d65ed71261584f45f8f14cc07984f16e4edc653 /gn/packages
parentbd52cbc9878216debea6596d1f390c56f80ccd79 (diff)
downloadguix-bioinformatics-e31d46f821048cbde3ab1cefb09cc9d734123d82.tar.gz
gnu: Add bamaddrg.
* gn/packages/bioinformatics.scm (bamaddrg): New variable.
Diffstat (limited to 'gn/packages')
-rw-r--r--gn/packages/bioinformatics.scm49
1 files changed, 49 insertions, 0 deletions
diff --git a/gn/packages/bioinformatics.scm b/gn/packages/bioinformatics.scm
index ad4db7b..a28ceb8 100644
--- a/gn/packages/bioinformatics.scm
+++ b/gn/packages/bioinformatics.scm
@@ -609,3 +609,52 @@ variants. Unlike existing methods, SVIM integrates information from across the
genome to precisely distinguish similar events, such as tandem and interspersed
duplications and novel element insertions.")
(license license:gpl3)))
+
+(define-public bamaddrg
+ (let ((commit "3fccbf057eef21f6304fade6c306c5bb64158865") ; May 26, 2012
+ (revision "1"))
+ (package
+ (name "bamaddrg")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ekg/bamaddrg.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14hq66cc7f4cssagb6079fmd2i6hfr9vmpcw5vi5kzsqr3ifc5yk"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ ;; The Makefile wants to vendor bamtools' source so we mimic it.
+ (replace 'build
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bam (assoc-ref inputs "bamtools")))
+ (apply invoke
+ `("g++" "-O3"
+ ,(string-append "-I" bam "/include/bamtools")
+ ,(string-append "-L" bam "/lib/libbamtools.a")
+ "bamaddrg.cpp" "-o" "bamaddrg" "-lbamtools" "-lz")))
+ #t))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+ (install-file "bamaddrg" bin)
+ #t))))))
+ (native-inputs
+ `(("bamtools" ,bamtools)))
+ (inputs
+ `(("zlib" ,zlib)))
+ (home-page "https://github.com/ekg/bamaddrg")
+ (synopsis "Adds read groups to input BAM files, streams BAM output on stdout")
+ (description
+ "This is intended for use \"fixing up\" RG tags on the fly so that they
+reflect the source file from which the aligment originated from. This allows
+the \"safe\" merging of many files from many individuals into one stream,
+suitable for input into downstream processing systems such as freebayes (
+population variant detector).")
+ (license #f)))) ; no license listed