diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 7b36d6bbdc..b47f136935 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -9474,3 +9474,61 @@ applications for tackling some common problems in a user-friendly way.") ;; available under the GNU GPL (see the file COPYING.GPL). (license (list license:lgpl2.1+ license:gpl3+)))) + +(define-public tadbit + (package + (name "tadbit") + (version "0.2") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/3DGenomes/TADbit/" + "archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1cnfqrl4685zar4nnw94j94nhvl2h29jm448nadqi1h05z6fdk4f")))) + (build-system python-build-system) + (arguments + `(;; Tests are included and must be run after installation, but + ;; they are incomplete and thus cannot be run. + #:tests? #f + #:python ,python-2 + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-problems-with-setup.py + (lambda* (#:key outputs #:allow-other-keys) + ;; setup.py opens these files for writing + (chmod "_pytadbit/_version.py" #o664) + (chmod "README.rst" #o664) + + ;; Don't attempt to install the bash completions to + ;; the home directory. + (rename-file "extras/.bash_completion" + "extras/tadbit") + (substitute* "setup.py" + (("\\(path.expanduser\\('~'\\)") + (string-append "(\"" + (assoc-ref outputs "out") + "/etc/bash_completion.d\"")) + (("extras/\\.bash_completion") + "extras/tadbit")) + #t))))) + (inputs + ;; TODO: add Chimera for visualization + `(("imp" ,imp) + ("mcl" ,mcl) + ("python2-scipy" ,python2-scipy) + ("python2-numpy" ,python2-numpy) + ("python2-matplotlib" ,python2-matplotlib) + ("python2-pysam" ,python2-pysam))) + (home-page "http://3dgenomes.github.io/TADbit/") + (synopsis "Analyze, model, and explore 3C-based data") + (description + "TADbit is a complete Python library to deal with all steps to analyze, +model, and explore 3C-based data. With TADbit the user can map FASTQ files to +obtain raw interaction binned matrices (Hi-C like matrices), normalize and +correct interaction matrices, identify adn compare the so-called +@dfn{Topologically Associating Domains} (TADs), build 3D models from the +interaction matrices, and finally, extract structural properties from the +models. TADbit is complemented by TADkit for visualizing 3D models.") + (license license:gpl3+)))