diff options
author | Justin Stanley <molecuul@users.noreply.github.com> | 2018-11-02 20:18:05 -0500 |
---|---|---|
committer | Peter Scheibel <scheibel1@llnl.gov> | 2018-11-02 18:18:05 -0700 |
commit | d7c9128875f679ba72e39a3b2b8ff7f31e3bee94 (patch) | |
tree | 06de034f6982ea2a69801b6a8583a1164a94f81e | |
parent | b471a3626ec06f07eadc5f89767a5ad034113b4f (diff) | |
download | spack-d7c9128875f679ba72e39a3b2b8ff7f31e3bee94.tar.gz spack-d7c9128875f679ba72e39a3b2b8ff7f31e3bee94.tar.bz2 spack-d7c9128875f679ba72e39a3b2b8ff7f31e3bee94.tar.xz spack-d7c9128875f679ba72e39a3b2b8ff7f31e3bee94.zip |
new package: homer (starting at 4.9.1) (#9669)
-rw-r--r-- | var/spack/repos/builtin/packages/homer/package.py | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/homer/package.py b/var/spack/repos/builtin/packages/homer/package.py new file mode 100644 index 0000000000..14293169dc --- /dev/null +++ b/var/spack/repos/builtin/packages/homer/package.py @@ -0,0 +1,48 @@ +# Copyright 2013-2018 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 * +from os import symlink + + +class Homer(Package): + """Software for motif discovery and next generation sequencing analysis""" + + homepage = "http://homer.ucsd.edu/homer" + url = "http://homer.ucsd.edu/homer/data/software/homer.v4.9.zip" + + version('4.9.1', sha256='ad1303b0b0400dc8a88dbeae1ee03a94631977b751a3d335326c4febf0eec3a9') + + depends_on('perl', type=('build', 'run')) + depends_on('r-biocgenerics', type='run') + depends_on('r-biocparallel', type='run') + depends_on('r-edger', type='run') + depends_on('r-deseq2', type='run') + + variant('data', default=False, + description='Download genome data packages') + + def install(self, spec, prefix): + # initialize homer directories + basedir = join_path(prefix.lib, 'homer') + mkdirp(basedir) + + install_tree('.', basedir) + + # symlink bin so it is included in the PATH + symlink(join_path(basedir, 'bin'), prefix.bin) + + # override homer base directory in configure script + filter_file('my $homeDir = $1;', + 'my $homeDir = \"{0}\";'.format(basedir), + 'configureHomer.pl', string=True) + + # compile/prepare binaries and perl scripts with the correct paths + perl = which('perl') + perl('configureHomer.pl', '-local') + + # download extra data if requested + if '+data' in spec: + perl('configureHomer.pl', '-install', '-all') |