Skip to content

Commit

Permalink
Merge branch 'release/v1.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed Jul 14, 2016
2 parents 2ed8cc7 + f38b9b9 commit dceb5a8
Show file tree
Hide file tree
Showing 32 changed files with 575 additions and 1,206 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "milib"]
path = milib
url = https://github.com/milaboratory/milib.git
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

MiTools 1.4 (14 Jul 2016)
========================

-- added new action: `mitools cut` to cut sequences to a fixed or random length (see help `mitools
cut -h`)


MiTools 1.3 ( 1 Feb 2016)
========================

Expand Down
1 change: 1 addition & 0 deletions milib
Submodule milib added at f551ba
146 changes: 146 additions & 0 deletions mitools
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
#!/bin/bash

java="java"

sedString="s/.*1\.\(.*\)\..*/\1/"
jVersion=$($java -version 2>&1 | grep version | awk '{ print $3 }' | sed $sedString)
if [[ $jVersion -lt 7 ]];
then
echo "Wrong version of java. Please use Java 7 or higher."
exit 1
fi

# Linux readlink -f alternative for Mac OS X
function readlinkUniversal() {
targetFile=$1

cd `dirname $targetFile`
targetFile=`basename $targetFile`

# iterate down a (possible) chain of symlinks
while [ -L "$targetFile" ]
do
targetFile=`readlink $targetFile`
cd `dirname $targetFile`
targetFile=`basename $targetFile`
done

# compute the canonicalized name by finding the physical path
# for the directory we're in and appending the target file.
phys_dir=`pwd -P`
result=$phys_dir/$targetFile
echo $result
}

os=`uname`
delta=100

dir=""

case $os in
Darwin)
freeBlocks=$(vm_stat | grep free | awk '{ print $3 }' | sed 's/\.//')
inactiveBlocks=$(vm_stat | grep inactive | awk '{ print $3 }' | sed 's/\.//')
speculativeBlocks=$(vm_stat | grep speculative | awk '{ print $3 }' | sed 's/\.//')
freeMb=$((($freeBlocks+$speculativeBlocks)*4096/1048576))
inactiveMb=$(($inactiveBlocks*4096/1048576))
maxMb=$((($freeMb+$inactiveMb-$delta)))
dir=$(dirname "$(readlinkUniversal "$0")")
;;
Linux)
rFreeMb=$(free -m | head -n 3 | tail -n 1 | awk '{ print $4 }')
maxMb=$(($rFreeMb-$delta))
dir="$(dirname "$(readlink -f "$0")")"
;;
*)
echo "Unknown OS."
exit 1
;;
esac

bin=${dir}/$0

jarBase="mitools"

appArgs=()
javaArgs=()

needXmxXms=true
otherJar=""

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

case $key in
-Xmx*|-Xms*)
needXmxXms=false
;;
esac

;;
-jar|-V)
otherJar="$1"
shift
;;
*)
appArgs+=("${key}")
;;
esac
done

if [[ ${needXmxXms} == true ]]
then
targetXmx=3000

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=""

if [[ -z "$otherJar" ]];
then
for j in "$dir/../jar/${jarBase}.jar" "$dir/${jarBase}.jar" $(ls -d -1 $dir/target/* 2> /dev/null | grep distribution.jar)
do
if [[ -e "$j" ]];
then
jar=$j
break
fi
done
else
for j in $(ls -1 ${dir}/* | grep "${jarBase}" | grep ".jar" | grep ${otherJar});
do
if [[ -e "$j" ]];
then
jar=$j
break
fi
done
fi

if [[ "$jar" == "" ]];
then
echo "No jar."
exit 1
fi

$java -Dapp.path=$dir -Dapp.command=mixcr -XX:+AggressiveOpts "${javaArgs[@]}" -jar $jar "${appArgs[@]}"
27 changes: 9 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

<groupId>com.milaboratory</groupId>
<artifactId>mitools</artifactId>
<version>1.3</version>
<version>1.4</version>
<packaging>jar</packaging>
<name>MiTools</name>
<url>http://milaboratory.com/</url>
<url>https://github.com/milaboratory/mitools</url>

<parent>
<groupId>org.sonatype.oss</groupId>
Expand Down Expand Up @@ -94,7 +94,13 @@
<dependency>
<groupId>com.milaboratory</groupId>
<artifactId>milib</artifactId>
<version>${project.version}</version>
<version>1.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.48</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.milaboratory</groupId>
Expand All @@ -115,16 +121,6 @@
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.30</version>
</dependency>
<dependency>
<groupId>cc.redberry</groupId>
<artifactId>pipe</artifactId>
<version>0.9.4</version>
</dependency>
</dependencies>

<properties>
Expand All @@ -135,11 +131,6 @@
<connection>scm:git:https://github.com/milaboratory/mitools.git</connection>
</scm>

<issueManagement>
<system>YouTrack</system>
<url>http://youtrack.milaboratory.com/</url>
</issueManagement>

<profiles>
<profile>
<id>release</id>
Expand Down
85 changes: 0 additions & 85 deletions src/main/java/com/milaboratory/core/PairedEndReadsLayout.java

This file was deleted.

29 changes: 0 additions & 29 deletions src/main/java/com/milaboratory/core/PairedTarget.java

This file was deleted.

27 changes: 0 additions & 27 deletions src/main/java/com/milaboratory/mitools/cli/Action.java

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/java/com/milaboratory/mitools/cli/ActionHelper.java

This file was deleted.

Loading

0 comments on commit dceb5a8

Please sign in to comment.