Skip to content

Commit

Permalink
Merge branch 'release/v1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbolotin committed Jun 7, 2017
2 parents dceb5a8 + f055a8b commit 00cd925
Show file tree
Hide file tree
Showing 8 changed files with 354 additions and 63 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: java

sudo: false

git:
submodules: false

before_install:
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
- git submodule update --init --recursive
- cd milib && mvn clean install -DskipTests -B && cd ..

jdk:
- openjdk7

cache:
directories:
- $HOME/.m2
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

MiTools 1.5 ( 7 Jun 2017)
========================

-- Memory-efficient `randomize` action for single-end and paired-end fastq files
-- Build host information now is saved to resulting binary artefact


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

Expand Down
61 changes: 60 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,68 @@ MiTools

MiTools: yet another Next Generation Sequencing (NGS) data processing tool (based on MiLib)

## Installation / Download

#### Using Homebrew on Mac OS X or Linux ([linuxbrew](http://linuxbrew.sh/))

brew tap milaboratory/all
brew install mitools

or just

brew install milaboratory/all/mitools

to upgrade already installed MiTools to the newest version:

brew update
brew upgrade mitools

#### Manual install (any OS)

* download latest MiTools version from [release page](https://github.com/milaboratory/mitools/releases/latest)
* unzip the archive
* add resulting folder to your ``PATH`` variable
* or add symbolic link for ``mitools`` script to your ``bin`` folder
* or use MiTools directly by specifying full path to the executable script

#### Requirements

* Any OS with Java support (Linux, Windows, Mac OS X, etc..)
* Java 1.7 or higher

## Usage

Cutting input fastq file to specified read length:

mitools cut -l 50 input.fastq.gz output.fastq.gz

Reverse-complement all reads:

mitools rc input.fastq.gz output.fastq.gz

Merge-overlap paired-end reads (like PEAR but works better in our experience; fast - based on [bitap](https://en.wikipedia.org/wiki/Bitap_algorithm) algorithm):

mitools merge input_R1.fastq.gz input_R2.fastq.gz output.fastq.gz

Split input file into chunks of 1M reads:

mitools split -c 1000000 input.fastq.gz output_{P}.fastq.gz

will produce ```output_0.fastq.gz, output_1.fastq.gz, ...``` files.

See ```mitools -h``` for available command paramenters and other useful actions.

## Documentation

See output of

mitools -h

for available actions.

## License

Copyright 2015 MiLaboratory.com
Copyright 2016 MiLaboratory.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion milib
Submodule milib updated from f551ba to f493f6
11 changes: 9 additions & 2 deletions mitools
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,17 @@ case $os in
dir=$(dirname "$(readlinkUniversal "$0")")
;;
Linux)
rFreeMb=$(free -m | head -n 3 | tail -n 1 | awk '{ print $4 }')
rFreeMb=$(free -m | grep Mem | awk '{ print $4 }')
maxMb=$(($rFreeMb-$delta))
dir="$(dirname "$(readlink -f "$0")")"
;;
FreeBSD)
freeBlocks=$(vmstat -s | grep -E 'free$' | awk '{ print $1 }')
inactiveBlocks=$(vmstat -s | grep inactive | awk '{ print $1 }')
freeMb=$(( ($freeBlocks+$inactiveBlocks)*4096/1048576 ))
maxMb=$(($freeMb-$delta))
dir=$(dirname "$(readlinkUniversal "$0")")
;;
*)
echo "Unknown OS."
exit 1
Expand Down Expand Up @@ -143,4 +150,4 @@ then
exit 1
fi

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

<groupId>com.milaboratory</groupId>
<artifactId>mitools</artifactId>
<version>1.4</version>
<version>1.5</version>
<packaging>jar</packaging>
<name>MiTools</name>
<url>https://github.com/milaboratory/mitools</url>
Expand All @@ -31,6 +31,11 @@
<relativePath/>
</parent>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<milib.version>1.8</milib.version>
</properties>

<description>
Yet another Java library for Next Generation Sequencing (NGS) data processing.
</description>
Expand All @@ -43,6 +48,38 @@
</license>
</licenses>

<dependencies>
<dependency>
<groupId>com.milaboratory</groupId>
<artifactId>milib</artifactId>
<version>${milib.version}</version>
</dependency>
<dependency>
<groupId>com.milaboratory</groupId>
<artifactId>milib</artifactId>
<version>${milib.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.beust</groupId>
<artifactId>jcommander</artifactId>
<version>1.48</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>

<developers>
<developer>
<id>dbolotin</id>
Expand Down Expand Up @@ -90,43 +127,6 @@
</developer>
</developers>

<dependencies>
<dependency>
<groupId>com.milaboratory</groupId>
<artifactId>milib</artifactId>
<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>
<artifactId>milib</artifactId>
<version>1.0.1</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
</dependencies>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<scm>
<connection>scm:git:https://github.com/milaboratory/mitools.git</connection>
</scm>
Expand Down Expand Up @@ -185,6 +185,47 @@

<build>
<plugins>
<plugin>
<!-- Workaround maven not being able to set a property conditionally -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>read_hostname</id>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<exportAntProperties>true</exportAntProperties>
<target>
<exec executable="hostname" failonerror="false" outputproperty="hostname"/>
<condition property="hostname" value="unknown">
<not>
<isset property="hostname"/>
</not>
</condition>
</target>
</configuration>
</execution>
<execution>
<id>delete_tokens</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete>
<fileset dir="${basedir}/src/main/java/" includes="*.tokens"/>
</delete>
</tasks>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
Expand All @@ -206,6 +247,7 @@
<configuration>
<properties>
<branch>${scmBranch}</branch>
<host>${hostname}</host>
</properties>
</configuration>
</execution>
Expand Down Expand Up @@ -239,27 +281,6 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<delete>
<fileset dir="${basedir}/src/main/java/" includes="*.tokens"/>
</delete>
</tasks>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/milaboratory/mitools/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public void handle(Signal signal) {
JCommanderBasedMain main = new JCommanderBasedMain("mitools",
new MergeAction(),
new TrimAction(),
new RandomizeAction(),
new RCAction(),
new RenameAction(),
new SplitAction(),
Expand All @@ -54,6 +55,8 @@ public void run() {
.append(mitools.getRevision())
.append("; branch=")
.append(mitools.getBranch())
.append("; host=")
.append(mitools.getHost())
.append(")")
.append("\n");

Expand Down
Loading

0 comments on commit 00cd925

Please sign in to comment.