Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
bz-dev committed Feb 14, 2017
2 parents 5f2e49c + 5b411d6 commit 58f1abb
Showing 1 changed file with 44 additions and 1 deletion.
45 changes: 44 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,53 @@

[![Build Status](https://travis-ci.org/wingardium/spc-reader-java.svg?branch=master)](https://travis-ci.org/wingardium/spc-reader-java)

This java library provides functions that read and convert SPC files.
This java library provides functions that read and convert SPC files to TSV files.

## Usage

```
gradle clean jar fatJar
```
This will build and create two jar files in the `build/libs` directory: `spc-reader-java-1.0.0-ALPHA.jar` and `spc-reader-java-dist-1.0.0-ALPHA.jar`.

`spc-reader-java-1.0.0-ALPHA.jar` only contains the spc-reader-java classes, thus it requires external libraries to work properly.

`spc-reader-java-dist-1.0.0-ALPHA.jar` is the standalone library, which includes all the dependency libraries.

### Command Line Options
`spc-reader-java-dist-1.0.0-ALPHA.jar` is also runnable in the command line. Below are available options:

```
-h --help list all available command line options
-i --input input file path
-o --output [optional] output file path, if not set then output will be the same directory as input
-d --decimals [optional] number of decimals in converted tsv file, default value: 2
-p --peak [optional] enable peak group mode, format: true/false, default value: false
-s --pstart [required if -p is set to true] peak group range start value, inclusive
-e --pend [required if -p is set to true] peak group range end value, inclusive
```

### Dependency libraries
`spc-reader-java-1.0.0-ALPHA.jar` requires the following libraries:
- commons-lang3, version: 3.5
- commons-math3, version: 3.6.1
- commons-io, version: 2.5
- commons-cli, version: 1.3.1

### Peak Group Mode
The original data is exported if peak group mode is disabled.

The peak group mode sums values within a certain range of the peak point. Normally the peak point should be an integer number, and the range start/end value should be integer multiples of the scanning resolution.

The range start/end value must be greater than 0 and less than 1.

The sum of range start and end values must be less than 1 to avoid overlapped peak group range.

For example, if the scanning resolution is 0.05, and the peak range start/end values are set to 0.4/0.35, then for peak point 7, it sums values from 6.60 to 7.35, which equals to 8 data points before peak point, 7 data points after peak point, plus peak point itself.

## TODO
- Add header information into exported tsv file comment section
- Add range start/end values validation before process

## SPC File Format

Expand Down

0 comments on commit 58f1abb

Please sign in to comment.