42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
# 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)
|