diff options
author | 健美猞猁 <weijianwen@gmail.com> | 2019-02-13 18:15:00 +0800 |
---|---|---|
committer | Massimiliano Culpo <massimiliano.culpo@gmail.com> | 2019-02-13 11:15:00 +0100 |
commit | 2202579685a63658cd61e39f4da828c8cb545880 (patch) | |
tree | 183b656101bf312f11e0318c34ad1996c612d0a7 /var | |
parent | 861dd06bd1aae9c9c52c57575cf711510691b616 (diff) | |
download | spack-2202579685a63658cd61e39f4da828c8cb545880.tar.gz spack-2202579685a63658cd61e39f4da828c8cb545880.tar.bz2 spack-2202579685a63658cd61e39f4da828c8cb545880.tar.xz spack-2202579685a63658cd61e39f4da828c8cb545880.zip |
Cnvnator: a new package. (#8959)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/cnvnator/package.py | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cnvnator/package.py b/var/spack/repos/builtin/packages/cnvnator/package.py new file mode 100644 index 0000000000..42216cf324 --- /dev/null +++ b/var/spack/repos/builtin/packages/cnvnator/package.py @@ -0,0 +1,50 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Cnvnator(MakefilePackage): + """A tool for CNV discovery and genotyping + from depth-of-coverage by mapped reads.""" + + homepage = "https://github.com/abyzovlab/CNVnator" + url = "https://github.com/abyzovlab/CNVnator/archive/v0.3.3.tar.gz" + + version('0.3.3', 'f9fc0c2e79abe85decab00d3748d8904') + + depends_on('samtools') + depends_on('htslib') + depends_on('root') + depends_on('bzip2') + depends_on('curl') + depends_on('lzma') + depends_on('zlib') + + def edit(self, spec, prefix): + makefile = FileFilter('Makefile') + # Replace -fopenmp with self.compiler.openmp_flag + makefile.filter('-fopenmp', self.compiler.openmp_flag) + # Replace CXX with CXXFLAGS + makefile.filter('CXX.*=.*', + r'CXXFLAGS = -DCNVNATOR_VERSION=\"$(VERSION)\"' + ' $(OMPFLAGS)' + ' {0}'.format(self.compiler.cxx11_flag)) + makefile.filter('$(CXX)', '$(CXX) $(CXXFLAGS)', string=True) + # Replace -I$(SAMDIR) with -I$(SAMINC) + makefile.filter('-I$(SAMDIR)', '-I$(SAMINC)', string=True) + # Link more libs + makefile.filter('^override LIBS.*', + 'override LIBS += -lz -lbz2 -lcurl -llzma') + + def build(self, spec, prefix): + make('ROOTSYS={0}'.format(spec['root'].prefix), + 'SAMINC={0}'.format(spec['samtools'].prefix.include), + 'SAMDIR={0}'.format(spec['samtools'].prefix.lib), + 'HTSDIR={0}'.format(spec['htslib'].prefix.lib)) + + def install(self, spec, prefix): + mkdir(prefix.bin) + install('cnvnator', prefix.bin) |