snpeff: add wrapper for SnpSift.jar (#9674)

This commit is contained in:
Levi Baber
2018-11-06 08:36:47 -06:00
committed by GitHub
parent d5327d8d4b
commit 4ba3c81bc8
2 changed files with 20 additions and 13 deletions

View File

@@ -0,0 +1,3 @@
#!/bin/sh
# convenience wrapper for the SnpSift jar file
java -jar SnpSift.jar "$@"

View File

@@ -22,17 +22,21 @@ class Snpeff(Package):
def install(self, spec, prefix):
install_tree('snpEff', prefix.bin)
# Set up a helper script to call java on the jar file,
# explicitly codes the path for java and the jar file.
script_sh = join_path(os.path.dirname(__file__), "snpEff.sh")
script = prefix.bin.snpEff
install(script_sh, script)
set_executable(script)
# Set up a helper script to call java on the jar files,
# explicitly codes the path for java and the jar files.
scripts = ['snpEff', 'SnpSift']
# 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, **kwargs)
filter_file('snpEff.jar', join_path(prefix.bin, 'snpEff.jar'),
script, **kwargs)
for script in scripts:
script_sh = join_path(os.path.dirname(__file__), script + ".sh")
script_path = join_path(prefix.bin, script)
install(script_sh, script_path)
set_executable(script_path)
# 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)