summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGeorge Young <A-N-Other@users.noreply.github.com>2023-07-04 09:09:45 +0100
committerGitHub <noreply@github.com>2023-07-04 04:09:45 -0400
commit70a38ea1c56a9ad347abbd2a328d1b2eb9f3d7a1 (patch)
treee25ca87a5240b58ca887578fdeeaec011873b773 /var
parent5bd7a0c563c0d1ce0dd11feca452f52078935d4f (diff)
downloadspack-70a38ea1c56a9ad347abbd2a328d1b2eb9f3d7a1.tar.gz
spack-70a38ea1c56a9ad347abbd2a328d1b2eb9f3d7a1.tar.bz2
spack-70a38ea1c56a9ad347abbd2a328d1b2eb9f3d7a1.tar.xz
spack-70a38ea1c56a9ad347abbd2a328d1b2eb9f3d7a1.zip
plink2: add new package @2.00a4.3 (#38469)
Co-authored-by: LMS Bioinformatics <bioinformatics@lms.mrc.ac.uk>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/plink2/package.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/plink2/package.py b/var/spack/repos/builtin/packages/plink2/package.py
new file mode 100644
index 0000000000..7846f5ae4d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/plink2/package.py
@@ -0,0 +1,49 @@
+# Copyright 2013-2023 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.package import *
+
+
+class Plink2(MakefilePackage):
+ """PLINK2: Whole genome association analysis toolset, designed to perform a
+ range of basic, large-scale analyses in a computationally efficient manner."""
+
+ homepage = "https://www.cog-genomics.org/plink/2.0/"
+ git = "https://github.com/chrchang/plink-ng.git"
+
+ version("2.00a4.3", tag="v2.00a4.3")
+
+ depends_on("zlib@1.2.12:")
+ depends_on("zstd@1.5.2:")
+ depends_on("libdeflate@1.10:")
+ depends_on("blas")
+ depends_on("lapack")
+
+ build_directory = "2.0/build_dynamic"
+
+ def edit(self, spec, prefix):
+ with working_dir(self.build_directory):
+ makefile = FileFilter("Makefile")
+ if "avx2" in spec.target:
+ makefile.filter(r"^NO_AVX2 = 1", "NO_AVX2 =")
+ elif "sse4_2" in spec.target:
+ makefile.filter(r"^NO_SSE42 = 1", "NO_SSE42 =")
+ makefile.filter(r"^STATIC_ZSTD = 1", "STATIC_ZSTD =")
+ makefile.filter(
+ r"^ BLASFLAGS=-llapack -lblas -lcblas -latlas",
+ " BLASFLAGS={0} {1}".format(
+ spec["blas"].libs.ld_flags, spec["lapack"].libs.ld_flags
+ ),
+ )
+
+ def build(self, spec, prefix):
+ with working_dir(self.build_directory):
+ make()
+
+ def install(self, spec, prefix):
+ mkdir(prefix.bin)
+ with working_dir(self.build_directory):
+ install("plink2", prefix.bin)
+ install("pgen_compress", prefix.bin)