Skip to content

Commit

Permalink
MiXCR execution script now passes java-specific options directly to JVM.
Browse files Browse the repository at this point in the history
This fixes #29
  • Loading branch information
dbolotin committed Oct 6, 2015
1 parent 7d877d8 commit 2fbd399
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_CURRENT
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
New feature: optional short column names in `export...` action to simplify further data analysis using data table processing libraries like Pandas or R/DataFrames. (`-s` / `--no-spaces` in `exportAlignments` and `exportClones`)
New export fields: `-defaultAnchorPoints` outputs positions of default anchor point in aligned reads or clonal sequence (this column is added to default output format), `-positionOf` outputs position of specified anchor point, `-lengthOf` outputs lengt of specified gene feature
MiXCR execution script now passes java-specific options directly to JVM (e.g. you can execute `mixcr -Xmx2g align ...`)
Added `V5UTRBeginTrimmed` anchor point, `V5UTR` gene feature renamed to `V5UTRGermline`, trimmed `V5UTR` gene feature added
Added `--filter-out-of-frames` and `--filter-stops` options in `exportClones`
minor: some column names in output tab-delimited files slightly changed
Expand Down
53 changes: 43 additions & 10 deletions mixcr
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,56 @@ case $os in
;;
esac

targetXmx=12000
mixcrArgs=()
javaArgs=()

if [[ $targetXmx -gt $maxMb ]];
then
targetXmx=$maxMb
fi
needXmxXms=true

while [[ $# > 0 ]]
do
key="$1"
shift
case $key in
-D*|-X*)
javaArgs+=(${key})

targetXms=$((${targetXmx}*2/3))
case $key in
-Xmx*|-Xms*)
needXmxXms=false
;;
esac

if [[ $targetXms -lt 2000 ]];
;;
*)
mixcrArgs+=(${key})
;;
esac
done

if [[ ${needXmxXms} == true ]]
then
targetXms=$targetXmx
targetXmx=12000

if [[ $targetXmx -gt $maxMb ]];
then
targetXmx=$maxMb
fi

javaArgs+=("-Xmx${targetXmx}m")

targetXms=$((${targetXmx}*2/3))

if [[ $targetXms -lt 2000 ]];
then
targetXms=$targetXmx
fi

javaArgs+=("-Xms${targetXms}m")
fi

jar=""

for j in "$DIR/../jar/mixcr.jar" "$DIR/mixcr.jar" "$DIR/target/mixcr-1.2-distribution.jar"
for j in "$DIR/../jar/mixcr.jar" "$DIR/mixcr.jar" $(ls -d -1 $DIR/target/* 2> /dev/null | grep distribution.jar)
do
if [[ -e "$j" ]];
then
Expand All @@ -67,4 +100,4 @@ then
exit 1
fi

$java -Dmixcr.command=mixcr -Xmx${targetXmx}m -Xms${targetXms}m -XX:+AggressiveOpts -jar $jar "${@:1}"
$java -Dmixcr.command=mixcr -XX:+AggressiveOpts "${javaArgs[@]}" -jar $jar "${mixcrArgs[@]}"

0 comments on commit 2fbd399

Please sign in to comment.