Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: implementation of formula in perl

by hdb (Monsignor)
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; }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1076516]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2017-10-18 09:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (243 votes). Check out past polls.

    Notices?