HTTPS SSH

ImatraNMR

ImatraNMR is a software for batch analysis and integration of multiple (quantitative) 1D and 2D NMR spectra. This repository contains the source code, which is pretty much old and messy Java. So beware.

  • Batch signal seeking, integration, spectrum imaging/export/reshaping/baseline correction
  • Results are written in plain text/CSV-files and standard PNG bitmap images.
  • Processing is batch oriented, controlled by simple script files. Commands can also be written straight to console or with simple/minimal GUI.
  • Written in Java, so should run anywhere tested with Windows 7 and Linux (latest Ubuntu LTS)

Supported file formats:

  • Bruker TopSpin
  • Varian VNMR/VNMRJ
  • UCSF (Sparky, rNMR)
  • SpinWorks
  • NMRPipe
  • ImatraNMR native .is/.isz format (used also by SimpeleNMR)
  • Mestrelab Mnova (1D only)
  • ASCII DmFit files from various processing software (1D only)

Installation

Requirements:

  • Java 1.6 (Tested with OpenJDK 8)
  • Apache Ant for building
  • Patience

Download and unpack the distribution from downloads section. Include the imatra in path by

tar -zxvf imatranmr_193_dist.tar.gz
cd dist
source env_imatra.sh

Then try to run a simple example:

cd examples
mkdir output
imatra s example_1d.iscr

Building

git clone https://vltrrr@bitbucket.org/vltrrr/imatranmr.git
cd imatranmr
ant clean; ant install
# then you can just use it same way as the built distribution
cd dist
source env_imatra.sh

Quick command reference

This is a list of all commands available in ImatraNMR 1.9.3 and is supplementary to the full program manual.

How to read

Numerical or textual arguments with free content are marked with less than and greater than -signs, so

align <start>:<end> <reference>

means that three ppm values are required, for example:

align -1.0:1.0 0.0

Optional and/or static arguments are marked with square bracets and with vertical bar between options, so

images [integ|seek]

means all of the following statements can be used:

images
images integ
images seek

However the optionality of these arguments is only fully described in the main manual. Blocks of code are marked with three periods:

if <text1> == <text2> ... end

which in real script could be something like:

if $variable1 == text
command1
command2
command3
end

Command list

Special

exit
run <scriptfile.iscr>
echo <string>
ver
mem
quiet [y|n|on|off|echo]

Variables and flow control

var <var_name> = <string>
var_clear
if <text1> == <text2> ... end
foreach queue ... end

Set

set
set 2d_mode [y|n]
set workdir <directory>
set outdir <directory>
set fileprefix <prefix>
set exportprefix <prefix>
set exportpkg [y|n]
reset
resetall

Loading/queuing

load <file> <format>
load <file> <format> q
load_dir <dir> <format>
load_dir <dir> <format> q
load2d <file> <format>
load2d <file> <format> q
load2d_dir <dir> <format>
load2d_dir <dir> <format> q
loadlist <listfile.isl>
list
clear
queue
queue_clear

Align / scale

align <start>:<end> <reference>
align <start>:<end> <ref> <start_id>:<end_id> <ref_id>
align_doublet <start>:<end> <reference>
scale <start>:<end>
scale <start>:<end> <start_id>:<end_id>
scale_height <start>:<end>
scale_height <start>:<end> <start_id>:<end_id>
scale_point <shift>
scale_point <shift_d> <shift_id>

Seeking

seek
seek_init
seek_seek
seek_write
seek_histog
seek_histog_init
seek_histog_seek
seek_histog_write

Seek configuration

seekcfg
seekcfg reset
seekcfg noiselimit <limit>
seekcfg autolimit <start>:<end> <mult>
seekcfg autolimit <strt>:<end> <strt_id>:<end_id> <mul>
seekcfg excl <start>:<end>
seekcfg excl <start>:<end> <start_id>:<end_id>
seekcfg incl <start>:<end>
seekcfg incl <start>:<end> <start_id>:<end_id>
seekcfg skiptole <s_tole>
seekcfg mergetole <m_tole>
seekcfg histogtole <h_tole>
seekcfg histogtole <h_tole> <h_toleid>
seekcfg histog_overlaplimit [y|n]
seekcfg simpleout [y|n]

Integration

integ
integ_init
integ_integ
integ_write
integ_single <start>:<end>
integ_single <start>:<end> <start_id>:<end_id>
integlist
integlist_load <integrallist.iil>
integlist_clear
integlist_loadhistog
integlist_bin <start>:<end> <bins>
integcfg
integcfg search_adjustarea [y|n]
integcfg pqnorm [y|n]

Reshaping and exporting spectra

export [is|txt|ucsf]
crop <start>:<end>
rscrop <start>:<end> <points>
resample <n>
slice_add <start>:<end>
slice_add <start>:<end> <searcs>:<searche> <align>
slice_list
slice_clear
slice
nuke <start>:<end>
blcorr
blcorr_drift
blcorr_smooth [window_size] [smooth_stdev]
blcorr_extract [window_size] [smooth_stdev]

Math operations and 2D projection

math_add
math_mult
math_mult_single <spectrum_index> <multiplier>
math_inv <spectrum_index>
math_autosub <startshift>:<endshift>
math_autosub <start_d>:<end_d> <start_id>:<end_id>
project_f1
project_f2
project_f1_sky
project_f2_sky
extract_f1 <startshift>:<endshift>
extract_f1 <shift>
extract_f2 <startshift>:<endshift>
extract_f2 <shift>
normalize
normalize_pq [median]

Images

images [integ|seek]
images_absscale <spectrum_number>
imgcfg
imgcfg reset
imgcfg size <x> <y>
imgcfg crop <start>:<end>
imgcfg crop <start>:<end> <start_id>:<end_id>
imgcfg scalearea <start>:<end>
imgcfg integlabels [y|n]
imgcfg ticw <width>
imgcfg ticw_id
imgcfg 2d_flip [y|n]
imgcfg 2d_colors [c|bw]
imgcfg 2d_limit <limit>
imgcfg 2d_colorf <factor>

Spectrum synthesis

synth_new <points> <width>
synth_zero <shift>
synth_peak <shift> <width> <area>
synth_noise <amount>
synth <name>

Other

sn
sn [signal_start:signal_end]
sn [signal_start:signal_end] [noise_start:noise_end]
sn [sstart_d:send_d] [sstart_id:send_id]
sn [sstart_d:send_d] [sstart_id:send_id] [nstart_d:nend_d] [nstart_id:nend_id]
fit_invrec <d1>;<d2>;<d3>;<dn>
fit_grec <d1>;<d2>;<d3>;<dn>

License

BSD 3-Clause. See: https://opensource.org/licenses/BSD-3-Clause

Copyright 2017 Valtteri Mäkelä

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.