<commit_before>#!/bin/bash

## Parallel threads for vcf2ga conversion using linux
parallel="-Dga4gh.vcf2ga.parallel=4"

# If a specific java binary isn't specified search for the standard 'java' binary
if [ -z "$JAVACMD" ] ; then
  if [ -n "$JAVA_HOME"  ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
      # IBM's JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
    else
      JAVACMD="$JAVA_HOME/bin/java"
    fi
  else
    JAVACMD=`which java`
  fi
fi

# init hadoop to 0
hadoop=0
params=""

for i in "$@"
do
  if [[ $i =~ ^hdfs://* ]];
  then
  	hadoop=1
  	params+=" "${i:7}
  else
    params+=" "$i
  fi
done

export LD_LIBRARY_PATH=hpg-bigdata-core/native/:hpg-bigdata-core/native/third-party/avro-c-1.7.7/build/src/:hpg-bigdata-core/native/third-party/htslib/ 

if [ $hadoop -eq 1 ];
then
	echo "Executing in a Hadoop environment"
	hadoop jar hpg-bigdata-app/target/hpg-bigdata-app-0.1.0-jar-with-dependencies.jar $@
else
	echo "Executing in a local environment"
	$JAVACMD $parallel -jar hpg-bigdata-app/target/hpg-bigdata-app-0.1.0-jar-with-dependencies.jar $@
fi<commit_msg>Allow execution from other directories Get script path and add to execution command<commit_after>#!/bin/bash

## find script directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

## Parallel threads for vcf2ga conversion using linux
parallel="-Dga4gh.vcf2ga.parallel=4"

# If a specific java binary isn't specified search for the standard 'java' binary
if [ -z "$JAVACMD" ] ; then
  if [ -n "$JAVA_HOME"  ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
      # IBM's JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
    else
      JAVACMD="$JAVA_HOME/bin/java"
    fi
  else
    JAVACMD=`which java`
  fi
fi

# init hadoop to 0
hadoop=0
params=""

for i in "$@"
do
  if [[ $i =~ ^hdfs://* ]];
  then
  	hadoop=1
  	params+=" "${i:7}
  else
    params+=" "$i
  fi
done

hbc="$DIR/hpg-bigdata-core"
hba="$DIR/hpg-bigdata-app"

export LD_LIBRARY_PATH=$hbc/native/:$hbc/native/third-party/avro-c-1.7.7/build/src/:$hbc/native/third-party/htslib/ 

if [ $hadoop -eq 1 ];
then
	echo "Executing in a Hadoop environment"
	hadoop jar $hba/target/hpg-bigdata-app-0.1.0-jar-with-dependencies.jar $@
else
	echo "Executing in a local environment"
	$JAVACMD $parallel -jar $hba/target/hpg-bigdata-app-0.1.0-jar-with-dependencies.jar $@
fi
{'fraction_non_alphanumeric': 0.14987613542526837, 'fraction_numerical': 0.0152766308835673, 'mean_word_length': 3.3894927536231885, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3340270', 'n_tokens_mistral': 992, 'n_tokens_neox': 949, 'n_words': 227}