File: snpSift

package info (click to toggle)
snpeff 5.2.f%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 701,384 kB
  • sloc: java: 62,547; perl: 2,279; sh: 1,185; python: 744; xml: 507; makefile: 50
file content (47 lines) | stat: -rwxr-xr-x 1,177 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash

#---------------------------------------------------------------------------------------------------
#
# Wrapper for HomeBrew-science project 
#
# snpSift executable shell script
# https://pcingola.github.io/SnpEff/
# Extracts memory and system property Java arguments from the list of provided arguments
# (ie -Xms 1g -Xmx 4g)
#
# Source https://gist.github.com/chapmanb/8732049
# Created by: Brad Chapman
#---------------------------------------------------------------------------------------------------

jardir="$(cd "$(dirname "$0")" && cd ".." && pwd -P)"

java=java
if [ -e "$JAVA_HOME/bin/java" ]
then
	java="$JAVA_HOME/bin/java"
fi

default_jvm_mem_opts="-Xms1g -Xmx4g"
jvm_mem_opts=""
jvm_prop_opts=""
pass_args=""
for arg in "$@"; do
    case $arg in
        '-D'*)
            jvm_prop_opts="$jvm_prop_opts $arg"
            ;;
         '-Xm'*)
            jvm_mem_opts="$jvm_mem_opts $arg"
            ;;
         *)
            pass_args="$pass_args $arg"
            ;;
    esac
done

if [ "$jvm_mem_opts" == "" ]; then
    jvm_mem_opts="$default_jvm_mem_opts"
fi

exec $java $jvm_mem_opts $jvm_prop_opts -jar ${jardir}/SnpSift.jar $pass_args
exit