diff options
author | 健美猫 <weijianwen@gmail.com> | 2018-04-22 02:08:56 +0800 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2018-04-21 13:08:56 -0500 |
commit | 708fe9f6765717e1f1dabce1f9ac9ed56a7cc769 (patch) | |
tree | 3cf3835298fca663dd2da0e1d92cb47e37baf812 /var | |
parent | b91b4a6c4da2370edcbbe336ff77b413145bf8dd (diff) | |
download | spack-708fe9f6765717e1f1dabce1f9ac9ed56a7cc769.tar.gz spack-708fe9f6765717e1f1dabce1f9ac9ed56a7cc769.tar.bz2 spack-708fe9f6765717e1f1dabce1f9ac9ed56a7cc769.tar.xz spack-708fe9f6765717e1f1dabce1f9ac9ed56a7cc769.zip |
Add a new pacakage: HiC-Pro. (#7858)
* HiC-Pro: a new package.
* Flake8.
* Update.
* Remove nektar.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/hic-pro/package.py | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hic-pro/package.py b/var/spack/repos/builtin/packages/hic-pro/package.py new file mode 100644 index 0000000000..11d4c4db86 --- /dev/null +++ b/var/spack/repos/builtin/packages/hic-pro/package.py @@ -0,0 +1,80 @@ +############################################################################## +# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. +# Produced at the Lawrence Livermore National Laboratory. +# +# This file is part of Spack. +# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. +# LLNL-CODE-647188 +# +# For details, see https://github.com/spack/spack +# Please also see the NOTICE and LICENSE files for our notice and the LGPL. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License (as +# published by the Free Software Foundation) version 2.1, February 1999. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and +# conditions of the GNU Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +############################################################################## +from spack import * + + +class HicPro(MakefilePackage): + """HiC-Pro is a package designed to process Hi-C data, + from raw fastq files (paired-end Illumina data) + to the normalized contact maps""" + + homepage = "https://github.com/nservant/HiC-Pro" + url = "https://github.com/nservant/HiC-Pro/archive/v2.10.0.tar.gz" + + version('2.10.0', '6ae2213dcc984b722d1a1f65fcbb21a2') + + depends_on('bowtie2') + depends_on('samtools') + depends_on('python@2.7:2.8') + depends_on('r') + depends_on('py-numpy', type=('build', 'run')) + depends_on('py-scipy', type=('build', 'run')) + depends_on('py-pysam', type=('build', 'run')) + depends_on('py-bx-python', type=('build', 'run')) + depends_on('r-rcolorbrewer', type=('build', 'run')) + depends_on('r-ggplot2', type=('build', 'run')) + + def edit(self, spec, prefix): + config = FileFilter('config-install.txt') + config.filter('PREFIX =.*', 'PREFIX = {0}'.format(prefix)) + config.filter('BOWTIE2 PATH =.*', + 'BOWTIE2_PATH = {0}'.format(spec['bowtie2'].prefix)) + config.filter('SAMTOOLS_PATH =.*', + 'SAMTOOLS_PATH = {0}'.format(spec['samtools'].prefix)) + config.filter('R_PATH =.*', + 'R_RPTH ={0}'.format(spec['r'].prefix)) + config.filter('PYTHON_PATH =.*', + 'PYTHON_RPTH ={0}'.format(spec['python'].prefix)) + + def build(self, spec, preifx): + make('-f', './scripts/install/Makefile', + 'CONFIG_SYS=./config-install.txt') + make('mapbuilder') + make('readstrimming') + make('iced') + + def install(sefl, spec, prefix): + # Patch INSTALLPATH in config-system.txt + config = FileFilter('config-system.txt') + config.filter('/HiC-Pro_2.10.0', '') + # Install + install('config-hicpro.txt', prefix) + install('config-install.txt', prefix) + install('config-system.txt', prefix) + install_tree('bin', prefix.bin) + install_tree('annotation', prefix.annotation) + install_tree('doc', prefix.doc) + install_tree('scripts', prefix.scripts) + install_tree('test-op', join_path(prefix, 'test-op')) |