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
|
# 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 DeconseqStandalone(Package):
"""The DeconSeq tool can be used to automatically detect and efficiently
remove sequence contaminations from genomic and metagenomic datasets."""
homepage = "http://deconseq.sourceforge.net"
url = "https://sourceforge.net/projects/deconseq/files/standalone/deconseq-standalone-0.4.3.tar.gz"
version('0.4.3', 'cb3fddb90e584d89fd9c2b6b8f2e20a2')
depends_on('perl@5:')
def install(self, spec, prefix):
filter_file(r'#!/usr/bin/perl',
'#!/usr/bin/env perl', 'deconseq.pl')
filter_file(r'#!/usr/bin/perl',
'#!/usr/bin/env perl', 'splitFasta.pl')
mkdirp(prefix.bin)
install('bwa64', prefix.bin)
install('bwaMAC', prefix.bin)
install('deconseq.pl', prefix.bin)
install('splitFasta.pl', prefix.bin)
install('DeconSeqConfig.pm', prefix)
chmod = which('chmod')
chmod('+x', join_path(prefix.bin, 'bwa64'))
chmod('+x', join_path(prefix.bin, 'bwaMAC'))
chmod('+x', join_path(prefix.bin, 'deconseq.pl'))
chmod('+x', join_path(prefix.bin, 'splitFasta.pl'))
def setup_environment(self, spack_env, run_env):
run_env.prepend_path('PERL5LIB', prefix)
|