summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/strelka/package.py
blob: 6cce7296da2d16ed98612eddd9c0e6f5a9340f04 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# 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 Strelka(CMakePackage):
    """Somatic and germline small variant caller for mapped sequencing
       data."""

    homepage = "https://github.com/Illumina/strelka"
    url      = "https://github.com/Illumina/strelka/releases/download/v2.8.2/strelka-2.8.2.release_src.tar.bz2"

    version('2.8.2', 'c48753997fcf2e4edac4e9854495721e')

    depends_on('python@2.4:')
    depends_on('zlib')
    depends_on('bzip2')
    depends_on('cmake@2.8.5:')
    depends_on('boost@1.56.0:')

    @run_before('install')
    def filter_sbang(self):
        """Run before install so that the standard Spack sbang install hook
           can fix up the path to the python binary.
        """

        match = '^#!/usr/bin/env python'
        python = self.spec['python'].command
        substitute = "#!{p}".format(p=python)
        kwargs = {'ignore_absent': False, 'backup': False, 'string': False}
        with working_dir('src'):
            files = [
                'config/validate/validateJsonModelFromSchema.py',
                'srcqc/run_cppcheck.py',
                'python/libexec/cat.py',
                'python/libexec/sortVcf.py',
                'python/libexec/extractSmallIndelCandidates.py',
                'python/libexec/configureStrelkaNoiseWorkflow.py',
                'python/libexec/configureSequenceErrorCountsWorkflow.py',
                'python/libexec/vcfCmdlineSwapper.py',
                'python/libexec/mergeChromDepth.py',
                'python/scoringModelTraining/germline/bin/evs_learn.py',
                'python/scoringModelTraining/germline/bin/parseAnnotatedTrainingVcf.py',  # noqa: E501
                'python/scoringModelTraining/germline/bin/filterTrainingVcf.py',  # noqa: E501
                'python/scoringModelTraining/germline/bin/evs_exportmodel.py',
                'python/scoringModelTraining/germline/bin/evs_qq.py',
                'python/scoringModelTraining/germline/bin/evs_pr.py',
                'python/scoringModelTraining/germline/bin/evs_evaluate.py',
                'python/scoringModelTraining/somatic/bin/evs_random_sample_tpfp.py',  # noqa: E501
                'python/scoringModelTraining/somatic/bin/evs_learn.py',
                'python/scoringModelTraining/somatic/bin/evs_random_split_csv.py',  # noqa: E501
                'python/scoringModelTraining/somatic/bin/vcf_to_feature_csv.py',  # noqa: E501
                'python/scoringModelTraining/somatic/bin/calc_features.py',
                'python/scoringModelTraining/somatic/bin/evs_exportmodel.py',
                'python/scoringModelTraining/somatic/bin/evs_pr.py',
                'python/scoringModelTraining/somatic/bin/evs_evaluate.py',
                'python/bin/configureStrelkaGermlineWorkflow.py',
                'python/bin/configureStrelkaSomaticWorkflow.py',
            ]
            filter_file(match, substitute, *files, **kwargs)

        with working_dir('spack-build/redist'):
            files = [
                'pyflow-1.1.18/src/pyflow.py',
            ]
            filter_file(match, substitute, *files, **kwargs)