2022-01-13 03:21:41 +08:00
|
|
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
|
2018-10-08 04:52:23 +08:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
2017-06-21 05:34:42 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2020-08-05 01:11:52 +08:00
|
|
|
import numbers
|
2021-07-09 06:12:30 +08:00
|
|
|
|
2017-06-21 05:34:42 +08:00
|
|
|
from spack import *
|
2022-03-23 03:42:15 +08:00
|
|
|
from spack.pkg.builtin.boost import Boost
|
2017-06-21 05:34:42 +08:00
|
|
|
|
|
|
|
|
2020-08-05 01:11:52 +08:00
|
|
|
def is_multiple_32(x):
|
|
|
|
"""multiple of 32 """
|
|
|
|
try:
|
|
|
|
return isinstance(int(x), numbers.Integral) and \
|
|
|
|
not isinstance(x, bool) and int(x) % 32 == 0
|
|
|
|
except ValueError:
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
2017-06-21 05:34:42 +08:00
|
|
|
class Abyss(AutotoolsPackage):
|
|
|
|
"""ABySS is a de novo, parallel, paired-end sequence assembler
|
|
|
|
that is designed for short reads. The single-processor version
|
|
|
|
is useful for assembling genomes up to 100 Mbases in size."""
|
|
|
|
|
2021-09-02 14:46:27 +08:00
|
|
|
homepage = "https://www.bcgsc.ca/platform/bioinfo/software/abyss"
|
2021-06-25 05:01:46 +08:00
|
|
|
url = "https://github.com/bcgsc/abyss/releases/download/2.3.1/abyss-2.3.1.tar.gz"
|
2017-06-21 05:34:42 +08:00
|
|
|
|
2021-06-25 05:01:46 +08:00
|
|
|
version('2.3.1', sha256='664045e7903e9732411effc38edb9ebb1a0c1b7636c64b3a14a681f465f43677')
|
|
|
|
version('2.3.0', sha256='3df923b0699187fb27948cae43293eeb5745161d5dc484b9befbe2ca8efb6ad7')
|
|
|
|
version('2.2.5', sha256='38e886f455074c76b32dd549e94cc345f46cb1d33ab11ad3e8e1f5214fc65521')
|
2018-12-04 20:02:36 +08:00
|
|
|
version('2.1.4', sha256='2145a1727556104d6a14db06a9c06f47b96c31cc5ac595ae9c92224349bdbcfc')
|
2019-10-11 13:44:41 +08:00
|
|
|
version('2.0.2', sha256='d87b76edeac3a6fb48f24a1d63f243d8278a324c9a5eb29027b640f7089422df')
|
|
|
|
version('1.5.2', sha256='8a52387f963afb7b63db4c9b81c053ed83956ea0a3981edcad554a895adf84b1')
|
2017-06-21 05:34:42 +08:00
|
|
|
|
2020-08-05 01:11:52 +08:00
|
|
|
variant('maxk', default=128, values=is_multiple_32,
|
|
|
|
description='set the maximum k-mer length.')
|
2018-10-03 08:27:25 +08:00
|
|
|
|
2017-10-28 23:05:52 +08:00
|
|
|
depends_on('autoconf', type='build')
|
|
|
|
depends_on('automake', type='build')
|
2018-12-05 07:19:56 +08:00
|
|
|
depends_on('bwa', type='run')
|
2017-10-28 23:05:52 +08:00
|
|
|
|
2017-06-21 05:34:42 +08:00
|
|
|
depends_on('mpi')
|
2017-08-08 04:42:49 +08:00
|
|
|
depends_on('boost@:1.50.0,1.53.0:', when='@2.0.2:')
|
|
|
|
depends_on('boost@:1.50.0,1.53.0:1.59.0', when='@:1.5.2')
|
2022-03-23 03:42:15 +08:00
|
|
|
# Maintainers: Is boost really a dependency? In what conditions?
|
|
|
|
depends_on(Boost.with_default_variants)
|
2017-06-21 05:34:42 +08:00
|
|
|
depends_on('sparsehash')
|
|
|
|
depends_on('sqlite')
|
2018-01-31 21:01:49 +08:00
|
|
|
depends_on('libtool')
|
2017-06-21 05:34:42 +08:00
|
|
|
|
|
|
|
conflicts('^intel-mpi')
|
|
|
|
conflicts('^intel-parallel-studio+mpi')
|
|
|
|
conflicts('^mvapich2')
|
|
|
|
conflicts('^spectrum-mpi')
|
|
|
|
|
|
|
|
def configure_args(self):
|
2018-10-03 08:27:25 +08:00
|
|
|
maxk = int(self.spec.variants['maxk'].value)
|
2017-06-21 05:34:42 +08:00
|
|
|
args = ['--with-boost=%s' % self.spec['boost'].prefix,
|
|
|
|
'--with-sqlite=%s' % self.spec['sqlite'].prefix,
|
|
|
|
'--with-mpi=%s' % self.spec['mpi'].prefix]
|
2018-10-03 08:27:25 +08:00
|
|
|
if maxk:
|
2019-09-08 10:27:51 +08:00
|
|
|
args.append('--enable-maxk=%s' % maxk)
|
2017-06-21 05:34:42 +08:00
|
|
|
if self.spec['mpi'].name == 'mpich':
|
2019-09-08 10:27:51 +08:00
|
|
|
args.append('--enable-mpich')
|
2017-06-21 05:34:42 +08:00
|
|
|
return args
|
2020-08-05 01:11:52 +08:00
|
|
|
|
|
|
|
patch('fix_BloomFilter.hpp.patch', when='@2.0.0:2.1.4')
|