in reply to Maximal Parsimony Problem
# this heuristic seems to be faulty my $min_mm = scalar( uniq(@colbp) ) - 1;
To me this seems perfectly right. If you want to speed up things a bit more (this is only a micro optimization) you can use a hash in the first place:
my %chars; foreach my $site ( @{$tfbs} ) { my $bp = substr($site,$pos,1); $chars{$bp} = 1; } # this heuristic seems to be faulty my $min_mm = keys %chars - 1; push @mincol, $min_mm;
Instead I think that your sample output is wrong:
# is: 00100000302011000000100 # should be: 00100000301011000000100
If not, could you please explain how to get the 2 there?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Maximal Parsimony Problem
by neversaint (Deacon) on Sep 03, 2008 at 14:28 UTC | |
by moritz (Cardinal) on Sep 03, 2008 at 14:36 UTC | |
by lidden (Curate) on Sep 03, 2008 at 15:29 UTC |