Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: implementation of formula in perl

by hdb (Prior)
on Feb 28, 2014 at 10:25 UTC ( #1076516=note: print w/ replies, xml ) Need Help??


in reply to implementation of formula in perl

Not sure what you mean. Something like this?

use strict; use warnings; my @seqs = qw( DFGR----- ----AERGD DOGRGERG- ---QWERTY -----ER-- ---EF +BEGB -ASDF---- AFBDFBA-- -FGDFBD-- ); my $i=0; while ($seqs[0]) { my $col = join '', map { substr $_, 0, 1, '' } @seqs; my $na = $col =~ tr/A/A/; my $n = $col =~ tr/-/-/c; printf "%d: na=%d n=%d fau=%.2f\n", $i++, $na, $n, $na/$n; }


Comment on Re: implementation of formula in perl
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1076516]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (18)
As of 2014-12-18 15:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (58 votes), past polls