Commit 74d7c605 authored by josh's avatar josh
Browse files

Merge branch 'staging'

parents 22f28eb0 cd3fb227
Pipeline #226917 passed with stage
in 2 seconds
......@@ -377,7 +377,8 @@ RUN apt-get update && \
apt-get install -yq --no-install-recommends \
kraken2 \
bowtie2 \
cutadapt \
# --------------------
# kaiju
......@@ -396,7 +397,14 @@ RUN mkdir kaiju && \
# --------------------
RUN curl -L -s -o shi7.tar.gz && \
pip3 install --no-cache-dir shi7.tar.gz && \
rm shi7.tar.gz
tar -zxf shi7.tar.gz && \
mv shi7-1.0.2/bin/gotta_split_linux /opt/bin/gotta_split && \
mv shi7-1.0.2/bin/shi7_trimmer_linux /opt/bin/shi7_trimmer && \
chmod 555 /opt/bin/gotta_split /opt/bin/shi7_trimmer && \
rm -rf shi7.tar.gz shi7-1.0.2
# Use from bioconda to make shi7 happy
COPY /opt/bin/trimmomatic
## END: Additional libraries for IBIEM 2018-2019 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
#!/usr/bin/env python3
# Wrapper script for Java Conda packages that ensures that the java runtime
# is invoked with the right options. Adapted from the bash script (
# This script modified from
# Program Parameters
import os
import subprocess
import sys
import shutil
from os import access
from os import getenv
from os import X_OK
jar_file = 'trimmomatic.jar'
default_jvm_mem_opts = ['-Xms512m', '-Xmx1g']
# !!! End of parameter section. No user-serviceable code below this line !!!
def real_dirname(path):
"""Return the symlink-resolved, canonicalized directory-portion of path."""
return os.path.dirname(os.path.realpath(path))
def java_executable():
"""Return the executable name of the Java interpreter."""
java_home = getenv('JAVA_HOME')
java_bin = os.path.join('bin', 'java')
if java_home and access(os.path.join(java_home, java_bin), X_OK):
return os.path.join(java_home, java_bin)
return 'java'
def jvm_opts(argv):
"""Construct list of Java arguments based on our argument list.
The argument list passed in argv must not include the script name.
The return value is a 3-tuple lists of strings of the form:
(memory_options, prop_options, passthrough_options)
mem_opts = []
prop_opts = []
pass_args = []
exec_dir = None
for arg in argv:
if arg.startswith('-D'):
elif arg.startswith('-XX'):
elif arg.startswith('-Xm'):
elif arg.startswith('--exec_dir='):
exec_dir = arg.split('=')[1].strip('"').strip("'")
if not os.path.exists(exec_dir):
shutil.copytree(real_dirname(sys.argv[0]), exec_dir, symlinks=False, ignore=None)
# In the original shell script the test coded below read:
# if [ "$jvm_mem_opts" == "" ] && [ -z ${_JAVA_OPTIONS+x} ]
# To reproduce the behaviour of the above shell code fragment
# it is important to explictly check for equality with None
# in the second condition, so a null envar value counts as True!
if mem_opts == [] and getenv('_JAVA_OPTIONS') is None:
mem_opts = default_jvm_mem_opts
return (mem_opts, prop_opts, pass_args, exec_dir)
def main():
java = java_executable()
PeptideShaker updates files relative to the path of the jar file.
In a multiuser setting, the option --exec_dir="exec_dir"
can be used as the location for the peptide-shaker distribution.
If the exec_dir dies not exist,
we copy the jar file, lib, and resources to the exec_dir directory.
(mem_opts, prop_opts, pass_args, exec_dir) = jvm_opts(sys.argv[1:])
jar_dir = exec_dir if exec_dir else "/usr/share/java/"
if pass_args != [] and pass_args[0].startswith('eu'):
jar_arg = '-cp'
jar_arg = '-jar'
jar_path = os.path.join(jar_dir, jar_file)
java_args = [java] + mem_opts + prop_opts + [jar_arg] + [jar_path] + pass_args
if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment