Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 romping around the Monastery: (12)
As of 2015-07-28 09:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls