#!/usr/bin/perl -w
# calcconc.pl [filename] [start concentration]
#
# Script to calculate the concentration of GpC from the relative
# intensity
#
# To obtain the relative concentration, set start-concentration to 1
# (or 100 to obtain per cent)
#
# (c) 2001 Gunter Kuhnle
my $conc;
$file = $ARGV[0];
$a = $ARGV[1];
open(DATA, $file) or die "### Can't read $file!\n";
while ($daten = <DATA>)
{
@value = split(/\s/, $daten);
if ($value[1] < 0.22) { $conc = 0.6385 * $value[1] - 0.033108;}
else { $conc = 1.29146 * $value[1] - 0.180183;}
$conc *= $a;
print "$value[0]\t$conc\n";
}
close(DATA);