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): 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)