2023-01-19 06:30:17 +08:00
|
|
|
# Copyright 2013-2023 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-07-11 01:26:03 +08:00
|
|
|
#
|
2018-10-08 04:52:23 +08:00
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
2022-05-04 12:06:59 +08:00
|
|
|
import os
|
|
|
|
|
2022-05-29 00:55:44 +08:00
|
|
|
from spack.package import *
|
2017-07-11 01:26:03 +08:00
|
|
|
|
|
|
|
|
|
|
|
class EaUtils(MakefilePackage):
|
|
|
|
"""Command-line tools for processing biological sequencing data. Barcode
|
|
|
|
demultiplexing, adapter trimming, etc. Primarily written to support an
|
|
|
|
Illumina based pipeline - but should work with any FASTQs."""
|
|
|
|
|
2021-09-02 14:46:27 +08:00
|
|
|
homepage = "https://expressionanalysis.github.io/ea-utils/"
|
2017-07-11 01:26:03 +08:00
|
|
|
url = "https://github.com/ExpressionAnalysis/ea-utils/archive/1.04.807.tar.gz"
|
2022-05-04 12:06:59 +08:00
|
|
|
git = "https://github.com/ExpressionAnalysis/ea-utils.git"
|
2023-02-02 13:07:25 +08:00
|
|
|
maintainers("snehring")
|
2017-07-11 01:26:03 +08:00
|
|
|
|
2022-05-04 12:06:59 +08:00
|
|
|
version("2021-10-20", commit="10c21926a4dce4289d5052acfd73b8e744d4fede")
|
|
|
|
version(
|
|
|
|
"1.04.807",
|
|
|
|
sha256="aa09d25e6aa7ae71d2ce4198a98e58d563f151f8ff248e4602fa437f12b8d05f",
|
|
|
|
deprecated=True,
|
|
|
|
)
|
2017-07-11 01:26:03 +08:00
|
|
|
|
2022-05-04 12:06:59 +08:00
|
|
|
depends_on("sparsehash")
|
2017-07-11 01:26:03 +08:00
|
|
|
depends_on("zlib")
|
|
|
|
depends_on("gsl")
|
|
|
|
depends_on("bamtools")
|
2022-05-04 12:06:59 +08:00
|
|
|
depends_on("perl", type=["build", "run"])
|
2017-07-11 01:26:03 +08:00
|
|
|
|
|
|
|
build_directory = "clipper"
|
|
|
|
|
|
|
|
def edit(self, spec, prefix):
|
2022-05-04 12:06:59 +08:00
|
|
|
with working_dir(self.build_directory):
|
|
|
|
filter_file("/usr", prefix, "Makefile")
|
|
|
|
# remove tests from all rule
|
|
|
|
filter_file(r"^all:.*$", "all: $(BIN)", "Makefile")
|
|
|
|
# remove the vendored sparsehash
|
|
|
|
filter_file(" sparsehash", "", "Makefile")
|
|
|
|
# replace system perl references
|
|
|
|
for f in next(os.walk(os.getcwd()))[2]:
|
|
|
|
filter_file("/usr/bin/perl", spec["perl"].prefix.bin.perl, f)
|
|
|
|
# fix up test script require path
|
|
|
|
tests = ["join.t", "mcf.t", "multx.t"]
|
|
|
|
rep = 'require "{0}";'.format(os.path.join(os.getcwd(), "t", "test-prep.pl"))
|
|
|
|
for f in tests:
|
|
|
|
filter_file(r"^require.*$", rep, os.path.join(os.getcwd(), "t", f))
|
|
|
|
|
|
|
|
def flag_handler(self, name, flags):
|
|
|
|
if name.lower() == "cxxflags":
|
|
|
|
flags.append(self.compiler.cxx11_flag)
|
|
|
|
return (flags, None, None)
|