snpeff: add wrapper for SnpSift.jar (#9674)
This commit is contained in:
3
var/spack/repos/builtin/packages/snpeff/SnpSift.sh
Normal file
3
var/spack/repos/builtin/packages/snpeff/SnpSift.sh
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# convenience wrapper for the SnpSift jar file
|
||||||
|
java -jar SnpSift.jar "$@"
|
@@ -22,17 +22,21 @@ class Snpeff(Package):
|
|||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
install_tree('snpEff', prefix.bin)
|
install_tree('snpEff', prefix.bin)
|
||||||
|
|
||||||
# Set up a helper script to call java on the jar file,
|
# Set up a helper script to call java on the jar files,
|
||||||
# explicitly codes the path for java and the jar file.
|
# explicitly codes the path for java and the jar files.
|
||||||
script_sh = join_path(os.path.dirname(__file__), "snpEff.sh")
|
scripts = ['snpEff', 'SnpSift']
|
||||||
script = prefix.bin.snpEff
|
|
||||||
install(script_sh, script)
|
|
||||||
set_executable(script)
|
|
||||||
|
|
||||||
# Munge the helper script to explicitly point to java and the
|
for script in scripts:
|
||||||
# jar file.
|
script_sh = join_path(os.path.dirname(__file__), script + ".sh")
|
||||||
java = self.spec['java'].prefix.bin.java
|
script_path = join_path(prefix.bin, script)
|
||||||
kwargs = {'backup': False}
|
install(script_sh, script_path)
|
||||||
filter_file('^java', java, script, **kwargs)
|
set_executable(script_path)
|
||||||
filter_file('snpEff.jar', join_path(prefix.bin, 'snpEff.jar'),
|
|
||||||
script, **kwargs)
|
# Munge the helper script to explicitly point to java and the
|
||||||
|
# jar file.
|
||||||
|
java = self.spec['java'].prefix.bin.java
|
||||||
|
kwargs = {'backup': False}
|
||||||
|
filter_file('^java', java, script_path, **kwargs)
|
||||||
|
filter_file(script + '.jar',
|
||||||
|
join_path(prefix.bin, script + '.jar'),
|
||||||
|
script_path, **kwargs)
|
||||||
|
Reference in New Issue
Block a user