in reply to Re: trouble understanding boss's code
in thread trouble understanding boss's code
wow, thanks a lot, i shortened it significantly,
sub readdt2 { my $ifn = shift; open(my $IFH, "<$ifn") or die "cannot open file $ifn\n"; my $line; my @nt = ("A","C","G","T"); my %ret; my @tmp; for my $j(@nt) { $ret{$j} = []; $line = <$IFH>; chomp($line); @tmp = split(/\s+/,$line); for (my $i=0; $i<=$#tmp; $i++ ) { $ret{$j}[$i]= $tmp[$i] +0.0001; } } close($IFH); return(\%ret); }
but when i used a data dumper the numbers didnt add up to 1.00, "A" added up to 1.11, "T" added up to 1.04, "C" added up to .93, G added up to .92 does anything stick out to you?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: trouble understanding boss's code
by SuicideJunkie (Vicar) on Jul 20, 2011 at 18:51 UTC | |
by DanielM0412 (Acolyte) on Jul 20, 2011 at 19:04 UTC | |
by DanielM0412 (Acolyte) on Jul 20, 2011 at 19:11 UTC |