RuG/L04

Manuals

difsum

Description

combine several difference matrix files into one

Synopsis

difsum [-a] [-o filename] ( [^float] [float] difference-table-file ) ...

Options

-a
average output
-o filename
output file

Purpose

This program adds the values from several difference table files, and writes the result as a new difference table file. The tables in the input files should be of identical size, and have identical labels in the same order.

Usage

Values from all files mentioned as arguments will be summed.

If a file is prefixed with a value (must be positive, no scientific notation) starting with a carrot (no space), the values in the input are raised to the power of this value. (Useful for undoing the power scaling introduced by clustering with Ward's Method.)

If a file is prefixed with a value (must be positive, no scientific notation), the values in the input file are multiplied by this value, before added to the summed total. This is done after the input values have been raised to a power.

If the option -a was used, the summed total will be averaged, using the multiplication values as weights.

Comments will be added to the top of the output file, summarising the used options.

Examples

Sum up two difference table files:
    difsum file1.dif file2.dif > new.dif
The above is identical to this:
    difsum -o new.dif file1.dif file2.dif
Sum up three files. Raise the values in the first file to the power 1/3. Weigh the second and third file half:
    difsum ^.3333 file1.dif .5 file2.dif .5 file3.dif > new.dif
The same as the previous, but resulting in all output values being twice as large:
    difsum 2 ^.3333 file1.dif file2.dif file3.dif > new.dif
And this is exactly the same as the previous:
    difsum ^.3333 2 file1.dif file2.dif file3.dif > new.dif
Calculate the average between values in two files:
    difsum -a file1.dif file2.dif > new.dif
Count the values in the first file as 2/3, those in the second as 1/3:
    difsum .66667 file1.dif .33333 file2.dif > new.dif
The same as the previous:
    difsum -a 2 file1.dif file2.dif > new.dif